How to change the Yum source in Linux to local download

Source: Internet
Author: User
Tags gpg

The Yum installation software in CentOS is very convenient and can solve the software dependency problem on its own. But there are a lot of people in the study need to install software but there is no network situation, very embarrassing. This article describes how to change the Yum source to local (take VMware as an example)

    1. Modify the/etc/fstab file as follows:

      650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/6B/89/wKiom1UvvnCBZxEjAAFMivOFO9Q234.jpg "title=" Fstab.png "alt=" wkiom1uvvncbzxejaafmivofo9q234.jpg "/> Execution mount-a hangs on disc mirroring to/media directory

2. Create a new file Repo.back directory under the/etc/yum.repos.d/directory and move all files to the Repo.back directory

Then create a new Local.repo file under this directory and modify the contents as follows

[Email protected] ~]# Vim/etc/yum.repos.d/local.repo

[Local]name=local-basebaseurl=file:///mediagpgcheck=0gpgkey=file:///etc/pki/rpm-gpg/rpm-gpg-key-centos-6

3. Execute yum Clean all to empty the package directory cache, then yum install Vim test can be installed locally


Congratulations! The local Yum source installation software is now implemented





This article is from the "Anka" blog, make sure to keep this source http://anka0501.blog.51cto.com/10129669/1633647

How to change the Yum source in Linux to local download

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.