Linux uses the system CD as the YUM Source

Source: Internet
Author: User

How to Use CentOS to mount the CD Linux Code # mkdir/media/cdrom # mount/dev/cdrom/media/cdrom yum source file description in/etc/yum. repos. d/There are CentOS-Base.repo and CentOS-Media.repo files in the Directory The CentOS-Base.repo records the Resource Information on the CD recorded by the Resource Information CentOS-Media.repo on the network, open the file with vi, contains the following line of code Linux Code # yum -- disablerepo = \ * -- enablerepo = c6-media [command] -- disablerepo = \ * indicates that all resources under the \ directory are not used -- enablerepo = c6-media Representation use the resource command example Linux Code # yum -- diablerepo = \ * -- enablerepo = c6-media install gcc Red Hat Enterprise Linux use method Mount CD Linux Code # mkdir/media/ cdrom # mount/dev/cdrom/media/cdrom edit the yum source file in/etc/yum. repos. d. Create a file and dvd in the directory. repo, and add the following code: Linux code [local-Server] baseurl = file: /// media/cdrom/Server enabled = 1 gpgcheck = 0 [local-HA] baseurl = file: /// media/cdrom/HighAvailability enabled = 1 gpgcheck = 0 [local = LB] baseurl = file: /// media/cdrom/LoadBalancer enabled = 1 gpgcheck = 0 [local-RS] baseurl = file: /// media/cdrom/ResilientStorage enabled = 1 gpgcheck = 0 update yum source Linux Code # curran by yum update

Related Article

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.