1、看看系统:
uname -a
Linux hostname 2.6.18-92.el5 #1 SMP Tue Apr 29 13:16:15 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux cat /etc/redhat-release Red Hat Enterprise Linux Server release 5.2 (Tikanga) 2、卸载掉自带的yum:
rpm -aq|grep yum|xargs rpm -e --nodeps 3、 下载centos的安装包
4、生成/etc/yum.repos.d/CentOS-Base.repo 文件,内容如下:
[base] name=CentOS-5 - Base baseurl=http://ftp./centos/5/os/x86_64/ gpgcheck=1 gpgkey=http://ftp./centos/RPM-GPG-KEY-centos5 #released updates [update] name=CentOS-5 - Updates baseurl=http://ftp./centos/5/updates/x86_64/ gpgcheck=1 gpgkey=http://ftp./centos/RPM-GPG-KEY-centos5 #packages used/produced in the build but not released [addons] name=CentOS-5 - Addons baseurl=http://ftp./centos/5/addons/x86_64/ gpgcheck=1 gpgkey=http://ftp./centos/RPM-GPG-KEY-centos5 #additional packages that may be useful [extras] name=CentOS-5 - Extras baseurl=http://ftp./centos/5/extras/x86_64/ gpgcheck=1 gpgkey=http://ftp./centos/RPM-GPG-KEY-centos5 #additional packages that extend functionality of existing packages [centosplus] name=CentOS-5 - Plus baseurl=http://ftp./centos/5/centosplus/x86_64/ gpgcheck=1 enabled=0 gpgkey=http://ftp./centos/RPM-GPG-KEY-centos5 #contrib - packages by Centos Users [contrib] name=CentOS-5 - Contrib baseurl=http://ftp./centos/5/contrib/x86_64/ gpgcheck=1 enabled=0 gpgkey=http://ftp./centos/RPM-GPG-KEY-centos5 5、换了一个Key
|
|