Modify yum source and linuxyum source in Linux
The procedure is as follows:
Run the following command to view the yum package:
rpm -qa|grep yum
Run the following command to uninstall the original source
rpm -qa | grep yum | xargs rpm -e --nodeps
Download new yum package
wget http://centos.ustc.edu.cn/centos/6/os/i386/Packages/yum-3.2.29-22.el6.centos.noarch.rpmwget http://centos.ustc.edu.cn/centos/6/os/i386/Packages/yum-metadata-parser-1.1.2-16.el6.i686.rpm wget http://centos.ustc.edu.cn/centos/6/os/i386/Packages/yum-plugin-fastestmirror-1.1.30-10.el6.noarch.rpm
Run the following command to install the new yum package:
rpm -ivh yum-*
Download the configuration source of yum
wget http://docs.linuxtone.org/soft/lemp/CentOS-Base.repo
Modify the configuration source as follows:
[base]name=CentOS-6 - Basebaseurl=http://centos.ustc.edu.cn/centos/6/os/$basearch/gpgcheck=1gpgkey=http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-6#released updates[update]name=CentOS-6 - Updatesbaseurl=http://centos.ustc.edu.cn/centos/6/updates/$basearch/gpgcheck=1gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6#packages used/produced in the build but not released[cr]name=CentOS-6 - crbaseurl=http://centos.ustc.edu.cn/centos/6/cr/$basearch/gpgcheck=1gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6#additional packages that may be useful[extras]name=CentOS-6 - Extrasbaseurl=http://centos.ustc.edu.cn/centos/6/extras/$basearch/gpgcheck=1gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6#additional packages that extend functionality of existing packages[centosplus]name=CentOS-6 - Plusbaseurl=http://centos.ustc.edu.cn/centos/6/centosplus/$basearch/gpgcheck=1enabled=0gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6#contrib - packages by Centos Users[contrib]name=CentOS-6 - Contribbaseurl=http://centos.ustc.edu.cn/centos/6/contrib/$basearch/gpgcheck=1enabled=0gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6[fasttrack]name=CentOS-6 - fasttrackbaseurl=http://centos.ustc.edu.cn/centos/6/fasttrack/$basearch/gpgcheck=1enabled=0gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
Execute yum update in this directory for unified updates