将redhat as5 升级为 centos 5
时间:2011-01-25 来源:杂草丛
2. 如果存在请逐一全部删除
# rpm -e --nodeps 组件包名称
3. 安装Centos升级组件包
# su root
# rpm -Uvh --nodeps *.rpm
wget http://mirrors.163.com/centos/5.5/os/i386/CentOS/python-iniparse-0.2.3-4.el5.noarch.rpm
wget http://mirrors.163.com/centos/5.5/os/i386/CentOS/yum-3.2.22-26.el5.centos.noarch.rpm
wget http://mirrors.163.com/centos/5.5/os/i386/CentOS/yum-fastestmirror-1.1.16-14.el5.centos.1.noarch.rpm
wget http://mirrors.163.com/centos/5.5/os/i386/CentOS/yum-metadata-parser-1.1.2-3.el5.centos.i386.rpm
4. 创建并编辑yum升级源配置文件
# su root
# mkdir -p /etc/yum.repos.d/
# vi /etc/yum.repos.d/CentOS-Base.repo
[base]
name=CentOS-$releasever - Base
baseurl=http://mirrors.163.com/centos/5.5/os/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-5
#released updates
[update]
name=CentOS-$releasever - Updates
baseurl=http://mirrors.163.com/centos/5.5/updates/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-5
#packages used/produced in the build but not released
[addons]
name=CentOS-$releasever - Addons
baseurl=http://mirrors.163.com/centos/5.5/addons/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-5
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
baseurl=http://mirrors.163.com/centos/5.5/extras/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-5
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
baseurl=http://mirrors.163.com/centos/5.5/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-5
#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib
baseurl=http://mirrors.163.com/centos/5.5/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-5
5. yum update
相关阅读 更多 +