First, configure the Yum source
NetEase (163) Yum Source is one of the best yum sources in the country, both speed and software version is very good, the Yum source is set to 163yum, can increase the speed of package installation and update, while avoiding some common software version cannot be found. Here's how to set it up:
1, enter the Yum source configuration directory
#cd/ETC/YUM.REPOS.D
2, the backup system comes with the Yum source
#mv Centos-base.repo CENTOS-BASE.REPO.BK
Download 163 NetEase's Yum Source:
#wget Http://mirrors.163.com/.help/CentOS6-Base-163.repo
3, after updating the Yum source, perform the following command to update the Yum configuration so that the operation takes effect immediately
#yum Makecache
4, in addition to NetEase, there are other good sources of Yum, such as Zhong Ke and Sohu, we can download according to their own needs
Zhong Ke's yum Source:
#wget Http://centos.ustc.edu.cn/CentOS-Base.repo
Sohu's Yum Source
#wget Http://mirrors.sohu.com/help/CentOS-Base-sohu.repo
In theory, these Yum source Redhat systems and fedora are also available, but are not tested and need to be tested yourself.
Second, install yum-downloadonly, download RPM package
Install yum-downloadonly plugin, download RPM package;
#wget-o/etc/yum.repos.d/centos-base.repo http://mirrors.aliyun.com/repo/Centos-5.repo#yum Install Yum-downloadonly#yum Install--downloadonly--downloaddir=/nginx.rpm pcre
If you do not download the Yum-downloadonly package, please check the attachment, unzip it after downloading, upload it to Linux, and install it.
Third, using the CentOS ISO to build local Yum source
#ls /etc/yum.repos.d/#CentOS-base.repo centos-media.repo#cp /etc/yum.repos.d/ centos-base.repo /etc/yum.repos.d/centos-base.repo.bak#vim /etc/yum.repos.d/centos-base.repo 1 [dvd] 2 name=install dvd 3 baseurl=file:///media/centos_6.5_final#iso-Mount Path 4 enable=1 5 gpgcheck=1# if the downloaded RPM package is checked for security 6 gpgkey=file:///etc/pki/rpm-gpg/rpm-gpg-key-centos-5#yum makecache Loaded plugins: fastestmirrorLoading mirror speeds from cached hostfiledvd | 1.1 kB 00:00 dvd/filelists | 2.9 mb 00:00 dvd/other | 9.1 mb 00:00 dvd/group | 920 kB 00:00 dvd/primary | 920 kB 00:00 dvd 2599/2599dvd 2599/ 2599dvd 2599/2599metadata cache created
CentOS Yum Source Configuration Tips