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)
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