in Linux

Redhat use CentOS YUM source

As Redhat Enterprise Linux needs to be registered to use the yum source, managed to uninstalled the Redhat yum and installed the CentOS YUM source,

1, uninstall the yum source.

# rpm -aq | grep yum|xargs rpm -e --nodeps

2, install the CentOS yum and source.

# wget http://mirror.centos.org/centos/6/os/X86_64/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm
# wget http://mirror.centos.org/centos/6/os/X86_64/Packages/yum-metadata-parser-1.1.2-14.1.el6.i686.rpm
# wget http://mirror.centos.org/centos/6/os/X86_64/Packages/yum-3.2.27-14.el6.centos.noarch.rpm
# wget http://mirror.centos.org/centos/6/os/X86_64/Packages/yum-plugin-fastestmirror-1.1.26-1.el6.noarch.rpm


# rpm -ivh  python-iniparse-0.3.1-2.1.el6.noarch.rpm
# rpm -ivh  yum-metadata-parser-1.1.2-14.1.el6.i686.rpm
# rpm -ivh  yum-3.2.27-14.el6.centos.noarch.rpm  yum-plugin-fastestmirror-1.1.26-11.el6.noarch.rpm

3, change the YUM source to mirror.nus.edu.sg

# cd /etc/yum.repos.d/
# wget  http://mirrors.163.com/.help/CentOS6-Base-163.repo
# vim CentOS6-Base-163.repo

 

[base]
name=CentOS-$releasever - Base - nus.edu.sg
baseurl=http://mirror.nus.edu.sg/centos/6/os/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

#released updates
[updates]
name=CentOS-$releasever - Updates - nus.edu.sg
baseurl=http://mirror.nus.edu.sg/centos/6/updates/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras - nus.edu.sg
baseurl=http://mirror.nus.edu.sg/centos/6/extras/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus - nus.edu.sg
baseurl=http://mirror.nus.edu.sg/centos/6/centosplus/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib - nus.edu.sg
baseurl=http://mirror.nus.edu.sg/centos/6/contrib/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

Reference to this link:

http://blog.csdn.net/lengyisheng/article/details/9382417

Write a Comment

Comment