环境:rhel 6.4
rhel Linux如果要使用网络源,需要订购红帽公司的RHN服务....
[[email protected] ~]# 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 [[email protected] ~]# [[email protected] ~]# rpm -qa | grep yum | xargs rpm -e --nodeps [[email protected] ~]# rpm -qa | grep yum [[email protected] ~]#
[[email protected] ~]# 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 [[email protected] ~]# 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 [[email protected] ~]# wget http://ftp.nara.wide.ad.jp/pub/Linux/centos/6/os/x86_64/Packages/yum-3.2.29-73.el6.centos.noarch.rpm [[email protected] ~]# 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 [[email protected] ~]# wget http://ftp.nara.wide.ad.jp/pub/Linux/centos/6/os/x86_64/Packages/python-urlgrabber-3.9.1-11.el6.noarch.rpm
[[email protected] ~]# rpm -Uvh python-urlgrabber-3.9.1-11.el6.noarch.rpm [[email protected] ~]# rpm -ivh python-iniparse-0.3.1-2.1.el6.noarch.rpm [[email protected] ~]# rpm -ivh yum-metadata-parser-1.1.2-16.el6.x86_64.rpm [[email protected] ~]# 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
[[email protected] ~]# wget http://mirrors.163.com/.help/CentOS6-Base-163.repo [[email protected] ~]# cd /etc/yum.repos.d/ [[email protected] yum.repos.d]# cp ~/CentOS6-Base-163.repo ./rhel-source.repo [[email protected] yum.repos.d]# sed -i ‘s/\$releasever/6/g‘ CentOS6-Base-163.repo [[email protected] yum.repos.d]# yum clean all [[email protected] 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 [[email protected] yum.repos.d]#
[[email protected] yum.repos.d]# yum -y install vim lrzsz
更换163源成功。
[[email protected] ~]# rpm -ivh epel-release-6-8.noarch.rpm
epel rpm下载:
https://fedoraproject.org/wiki/EPEL/zh-cn
时间: 2024-12-21 12:44:03