One, attach the ISO image to the CD/DVD drive
650) this.width=650; "Src=" Https://s4.51cto.com/oss/201710/30/fb34509fada37a347f73d836366f67a9.jpg-wh_500x0-wm_3 -wmp_4-s_3625218389.jpg "title=" 1.jpg "alt=" Fb34509fada37a347f73d836366f67a9.jpg-wh_ "/>
Second, re-boot into the system
1. To see if the mount succeeds, if it contains/dev/cdrom, the Mount succeeds
650) this.width=650; "Src=" Https://s1.51cto.com/oss/201710/30/5e68c2bce8dceb1c87fb109aa38b5b0a.jpg-wh_500x0-wm_3 -wmp_4-s_950448102.jpg "title=" 2.jpg "alt=" 5e68c2bce8dceb1c87fb109aa38b5b0a.jpg-wh_ "/>
2. Create mount directory:/mnt/cdrom/and mount it to the current directory
Mkdir/mnt/cdrom/mount-t Iso9660-r/dev/cdrom/mnt/cdrom
Note: where-t iso9660 indicates that the file format is ISO standard,-R indicates read-only mode,/dev/cdrom is the optical drive device, and/mnt/cdrom is a custom directory.
ls/mnt/cdrom/
650) this.width=650; "Src=" Https://s2.51cto.com/oss/201710/30/f74adced42291f89242481487245c66a.png-wh_500x0-wm_3 -wmp_4-s_581859214.png "title=" 3.png "alt=" F74adced42291f89242481487245c66a.png-wh_ "/>
You can see the files inside the ISO
3. Configure the Yum source
Back up the files in the/etc/yum.repos.d/, recreate a Iso.repo file,
Vi/etc/yum.repos.d/iso.repo
and write the following content
[Public_ol6_latest] #可改变name =oracle linux-base #可改变baseurl =file:///mnt/cdrom/gpgkey=file:///mnt/cdrom/ Rpm-gpg-key-oraclegpgcheck=1enabled=1
Save,
Final execution
Yum Repolist
To see if it was successful. Then you can indulge in yum install!
This article is from the "Lefteva" blog, make sure to keep this source http://lefteva.blog.51cto.com/11892835/1977301
Linux uses ISO image as Yum installation source