CentOS7 Configuring the local Yum source

Source: Internet
Author: User

Most of the software needed to download DVDs from CentOS7 official website, so you can configure Yum source as local DVD without network, download fast, software is stable.
1. If you are using a virtual machine, mount the DVD's ISO file in the virtual machine.
2. Create a new mount point with the following command and mount the modify Yum source configuration

mkdir /media/CentOSMount -T Auto/dev/cdrom/media/centos

You can view the mounted results by using the command mount as follows:


3. Modify the Yum source configuration to back up the Centos-base.repo files

cd/etc/Yumrepos.d/cp Centos-base.repo Centos-base.repo.bak


Modify the contents of the Centos-base.repo, annotate all mirrorlist properties in the document, open the BaseURL property annotation, and set the BaseURL property value to the mount point
baseurl=file:///media/centos/

As shown in the following:


Save, exit Edit.
4. Empty all source information that Yum already exists

Yum Clean All


5. View all software for a local source

Yum List


6. If you want to resume using the source on the network, rename the Centos-base.repo.bak again to Centos-base.repo.
7. Note that after the system restarts, you need to mount it manually again, and if necessary, you can set the/media/centos to mount automatically. A new row is added to the/etc/fstab configuration file, indicating that the/media/centos is automatically mounted. As shown below:

CentOS7 Configuring the local Yum source

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.