环境:rhel 6.4
rhel Linux如果要使用网络源,需要订购红帽公司的RHN服务....
[root@localhost ~]# rpm -qa | grep yum yum-rhn-plugin-0.9.1-43.el6.noarch yum-metadata-parser-1.1.2-16.el6.x86_64 yum-3.2.29-40.el6.noarch [root@localhost ~]# [root@localhost ~]# rpm -qa | grep yum | xargs rpm -e --nodeps [root@localhost ~]# rpm -qa | grep yum [root@localhost ~]#
[root@localhost ~]# wget http://ftp.nara.wide.ad.jp/pub/Linux/centos/6/os/x86_64/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm [root@localhost ~]# wget http://ftp.nara.wide.ad.jp/pub/Linux/centos/6/os/x86_64/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm [root@localhost ~]# wget http://ftp.nara.wide.ad.jp/pub/Linux/centos/6/os/x86_64/Packages/yum-3.2.29-73.el6.centos.noarch.rpm [root@localhost ~]# wget http://ftp.nara.wide.ad.jp/pub/Linux/centos/6/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-37.el6.noarch.rpm [root@localhost ~]# wget http://ftp.nara.wide.ad.jp/pub/Linux/centos/6/os/x86_64/Packages/python-urlgrabber-3.9.1-11.el6.noarch.rpm
[root@localhost ~]# rpm -Uvh python-urlgrabber-3.9.1-11.el6.noarch.rpm [root@localhost ~]# rpm -ivh python-iniparse-0.3.1-2.1.el6.noarch.rpm [root@localhost ~]# rpm -ivh yum-metadata-parser-1.1.2-16.el6.x86_64.rpm [root@localhost ~]# rpm -ivh yum-3.2.29-73.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-37.el6.noarch.rpm
使用163的Centos源:
http://mirrors.163.com/.help/centos.html
阿里云Centos源:
http://mirrors.aliyun.com/help/centos
[root@localhost ~]# wget http://mirrors.163.com/.help/CentOS6-Base-163.repo [root@localhost ~]# cd /etc/yum.repos.d/ [root@localhost yum.repos.d]# cp ~/CentOS6-Base-163.repo ./rhel-source.repo [root@localhost yum.repos.d]# sed -i ‘s/\$releasever/6/g‘ CentOS6-Base-163.repo [root@localhost yum.repos.d]# yum clean all [root@localhost yum.repos.d]# yum makecache Loaded plugins: fastestmirror, product-id, subscription-manager This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register. Determining fastest mirrors base | 3.7 kB 00:00 base/group_gz | 226 kB 00:00 base/filelists_db | 6.4 MB 00:22 base/primary_db | 4.7 MB 00:14 base/other_db | 2.8 MB 00:06 extras | 3.4 kB 00:00 extras/filelists_db | 38 kB 00:00 extras/prestodelta | 1.3 kB 00:00 extras/primary_db | 37 kB 00:00 extras/other_db | 51 kB 00:00 updates | 3.4 kB 00:00 updates/filelists_db | 585 kB 00:02 updates/prestodelta | 49 kB 00:00 updates/primary_db | 749 kB 00:02 updates/other_db | 8.4 MB 00:43 Metadata Cache Created [root@localhost yum.repos.d]#
[root@localhost yum.repos.d]# yum -y install vim lrzsz
更换163源成功。
[root@localhost ~]# rpm -ivh epel-release-6-8.noarch.rpm
epel rpm下载:
https://fedoraproject.org/wiki/EPEL/zh-cn
本文出自 “鹏城-酱油瓶” 博客,谢绝转载!
原文地址:http://yfshare.blog.51cto.com/8611708/1825280