Rhel 5 升级为centos 5 并配置yum源

分类: LINUX

Rhel 5 升级为centos 5 并配置yum源

开发一台测试服务器原来用的是RHEL5,安装啊,更新包一点都不方便,整成CentOS 5吧,方便使用。

1.卸载掉原yum包
rpm -e yum-rhn-plugin-0.4.3-1.el5 yum-updatesd-3.0.1-5.el5 yum-3.0.1-5.el5 yum-metadata-parser-1.0-8.fc6 pirut-1.2.10-1.el5.noarch
rpm -e redhat-release-5Server-5.0.0.9 redhat-release-notes-5Server-5 �Cnodeps

2.下载安装CentOS中的yum包
mkdir yum
cd yum/
wget http://centos.ustc.edu.cn/centos/5/os/x86_64/CentOS/yum-3.2.8-9.el5.centos.1.noarch.rpm
wget http://centos.ustc.edu.cn/centos/5/os/x86_64/CentOS/yum-updatesd-0.9-2.el5.noarch.rpm
wget http://centos.ustc.edu.cn/centos/5/os/x86_64/CentOS/yum-metadata-parser-1.1.2-2.el5.x86_64.rpm
wget http://centos.ustc.edu.cn/centos/5/os/x86_64/CentOS/python-iniparse-0.2.3-4.el5.noarch.rpm
wget http://centos.ustc.edu.cn/centos/5/os/x86_64/CentOS/centos-release-5-2.el5.centos.x86_64.rpm
wget http://centos.ustc.edu.cn/centos/5/os/x86_64/CentOS/centos-release-notes-5.2-2.x86_64.rpm
rpm -Uvh *.rpm

3.导入RPM-GPG-KEY
rpm �Cimport http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5

4.修改一下源,改成centos.ustc.edu.cn,我用着速度很爽。

yum update/install

注意:用YUM安装软件会使32位和64位都安装上,这样会让系统显得很臃肿

用如下命令可排除i386和i686的rpm包
echo exclude=*.i?86 >> /etc/yum.conf

当然了,这样设置你可以保证今后可以不安装上32位的rpm包,那以前已经安装上的又该怎么办呢
其实还是可以用yum 删除掉的

yum remove *.i?86


搞定

�CEOF�C


你可能感兴趣的:(开发,服务器,下载安装)