The virtual machine configuration CD is a Yum source

Source: Internet
Author: User

Most of the time, the CDs we use for our systems are enough to serve as our source of software. However, how to configure the CD to become Yum's software source, let the yum command to find this place, in order to install the software.

First mount the disc on the virtual machine

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/5A/D7/wKiom1T9sJqwyWc9AAFEND-IeM0058.jpg "title=" Qq20150309223847.png "alt=" Wkiom1t9sjqwywc9aafend-iem0058.jpg "/>

After mounting, we'll use the Mount command in the virtual machine to see the disc that was just mounted,

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/5A/D7/wKiom1T9sTrQv3wfAAHakg7xyuk907.jpg "title=" Qq20150309224148.png "alt=" Wkiom1t9strqv3wfaahakg7xyuk907.jpg "/>

The line that is underlined is the disc we just mounted.

/dev/scd0 This is the device that represents the disc, Umount or mount.

/media/rhel_5.5 i386 DVD Type iso9660 This is the CD-ROM mount directory. And then in the parentheses is the permission.

At this point, we umount the disc with a command and then mount it again. Mount to the media directory.

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/5A/D2/wKioL1T9tAKROaVHAAG8YX2nztw438.jpg "title=" Qq20150309224858.png "alt=" Wkiol1t9takroavhaag8yx2nztw438.jpg "/>

Mount-o Ro/dev/scd0/media where-o-ro indicates what mode to mount, RO indicates read only (readonly)

Follow the device that you want to mount, and in the following folder, under which directory to mount.

Through the picture, we can see that we re-mount the CD (mount) to the system.


At this point, we successfully completed the CD-ROM, and then modify the Yum source configuration file. Yum Source configuration file under the/etc/yum.repo.d/directory, we can get LS to this directory.

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/5A/D2/wKioL1T9tWaDz7kSAABhEjBO58c384.jpg "title=" Qq20150309225451.png "alt=" Wkiol1t9twadz7ksaabhejbo58c384.jpg "/>

You can see a file with a. Repo suffix, which is the configuration file for the Yum source. This file was built when the system was installed, and we deleted it and wrote a configuration file ourselves.

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/5A/D7/wKiom1T9tRbgTQoZAAChxTsmHss315.jpg "title=" Qq20150309225818.png "alt=" Wkiom1t9trbgtqozaachxtsmhss315.jpg "/>

Write some configuration information:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/5A/D7/wKiom1T9tjfQz9-uAAFm24vFdpU990.jpg "title=" Qq20150309230305.png "alt=" Wkiom1t9tjfqz9-uaafm24vfdpu990.jpg "/>

After writing, save exit.


This time is complete, you can use the Yum List command to test.

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/5A/D7/wKiom1T9trOR20yiAAMQCliVU9U798.jpg "title=" Qq20150309230513.png "alt=" Wkiom1t9tror20yiaamqclivu9u798.jpg "/>

When you see this information is configured, you can see the last side with a DVD, this is our configuration file [DVD] this thing. This can also be written casually.


So far, we've configured Yum's software source.


However, when the system restarted, our Yum command could not find the source of the software, this time re-uninstalled and then mounted. Remember to mount it under the media directory because our Yum source configuration file is written in File:///media/Server


All right, it's done!



This article is from the "focus on Java,linux Technology" blog, please be sure to keep this source http://wuqinglong.blog.51cto.com/9087037/1618834

The virtual machine configuration CD is a Yum 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.