Use CD to build Yum source on Linux os __linux

Source: Internet
Author: User
Tags gpg

Question: If there is no network, how to use the Yum source.

Answer: Use CD to build Yum source

Build steps:

1. Mount CD

Mkdir/mnt/cdrom #建议挂载点
mount/dev/cdrom/mnt/cdrom/#挂载光盘

2, the network Yum source failure

Cd/etc/yum.repos.d/#进入yum源目录
MV Centos-base.repo Centos-base.repo.bak #修改yum源文件后缀名, making it ineffective

3, make the CD Yum source effective

VI Centos-media.repo

-[C6-media]
-name=centos-$releasever-media-
baseurl=file:///mnt/cdrom/	#地址为你自己的光盘挂载地址
-#        file:///media/cdrom/
-#        file:///media/cdrecorder/	#注释这两个不存在的地址
gpgcheck=1
enabled=0	# Change the enable=1 to enable=0 and let the Yum source configuration file take effect
gpgkey=file:///etc/pki/rpm-gpg/rpm-gpg-key-centos-6
Actual operation:



Encountered an error:

Cannot retrieve repository metadata (Repomd.xml) for Repository:c6-media. Please verify its path and try again


Workaround:

As long as the centos-media.repo inside of the enable=1 changed to Enable=0 can be, that is, let this file invalid bar.


Run Result:



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.