Linux uses ISO image as Yum installation source

Source: Internet
Author: User
Tags yum repolist

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.