Redhat linux server 5.5 上使用163的源来安装软件
首先需要确定系统架构
#uname -a
Linux m1-bk1 2.6.18-194.el5 #1 SMP Tue Mar 16 21:52:43 EDT 2010 i686 i686 i386 GNU/Linux
下载yum软件包
#cd /tmp
#wget http://mirrors.163.com/centos/5/os/i386/CentOS/yum-fastestmirror-1.1.16-21.el5.centos.noarch.rpm
#wget http://mirrors.163.com/centos/5/os/i386/CentOS/yum-3.2.22-40.el5.centos.noarch.rpm
#wget http://mirrors.163.com/centos/5/os/i386/CentOS/yum-metadata-parser-1.1.2-4.el5.i386.rpm
安装yum软件包
#rpm -ivh yum-fastestmirror-1.1.16-21.el5.centos.noarch.rpm
#rpm -ivh yum-3.2.22-40.el5.centos.noarch.rpm
#rpm -ivh yum-metadata-parser-1.1.2-4.el5.i386.rpm
导入证书
#rpm -import http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-5
让yum使用网易的源:
#cd /etc/yum.repos.d/
#wget http://mirrors.163.com/.help/CentOS-Base-163.repo
使用
#vi CentOS-Base-163.repo
在所有mirrorlist前面加上#,把所有$releasever替换成5,命令(:%s/$releasever/5/g) ,保存
#yum clean metadata
#yum makecache
使用163源安装软件:
#yum install -y vsftpd
于是yum就正常工作了,然后随手就更新一下,就OK了