When I was learning linux, I didn't have a CD. to install software, I had to change the yum source on the Internet. Here we provide a NetEase yum source. 1. download the http://mirrors.163.com file to the centos help document for the CentOS6-Base-163.repo and store it in/etc/yum. repo. d. Centos6: wgethttp: // mirrors.163.com/
When I was learning linux, I didn't have a CD. to install software, I had to change the yum source on the Internet.
Here we provide a NetEase yum source.
1. download the http://mirrors.163.com file to the centos help document for the CentOS6-Base-163.repo and store it in/etc/yum. repo. d.
Centos 6: wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
Centos 5: wget http://mirrors.163.com/.help/CentOS5-Base-163.repo
Copy the downloaded file/etc/yum.repos.d
Directory.
2. First back up/etc/yum. repos. d/CentOS-Base-163.repo
cp CentOS6-Base-163.repo CentOS6-Base-163.repo.bak
3. edit the CentOS6-Base-163.repo file and change $ releasever to the centos version. here, redhat6.0 32-bit version is used as an example.
[root@Node2 yum.repos.d]# vi CentOS6-Base-163.repo# CentOS-Base.repo## The mirror system uses the connecting IP address of the client and the# update status of each mirror to pick mirrors that are updated to and# geographically close to the client. You should use this for CentOS updates# unless you are manually picking other mirrors.## If the mirrorlist= does not work for you, as a fall back you can try the# remarked out baseurl= line instead.##[base]name=CentOS-6 - Base - 163.combaseurl=http://mirrors.163.com/centos/6/os/i386/#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=osgpgcheck=1gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6#released updates[updates]name=CentOS-6 - Updates - 163.combaseurl=http://mirrors.163.com/centos/6/updates/i386/#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updatesgpgcheck=1gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6#additional packages that may be useful[extras]name=CentOS-6 - Extras - 163.combaseurl=http://mirrors.163.com/centos/6/extras/i386/#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extrasgpgcheck=1gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6#additional packages that extend functionality of existing packages[centosplus]name=CentOS-6 - Plus - 163.combaseurl=http://mirrors.163.com/centos/6/centosplus/i386/#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplusgpgcheck=1enabled=0gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6#contrib - packages by Centos Users[contrib]name=CentOS-6 - Contrib - 163.combaseurl=http://mirrors.163.com/centos/6/contrib/i386/#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contribgpgcheck=1enabled=0gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
4. Save the edited file and check whether the update is successful:
Yum clean all clear original cache yum makecache get yum list yum install vim *