提示,在升级前,做好备份。做好备份,怎么强调都不为过!
下面操作均在root权限下进行。
首先,清除所有软件包
# yum clean all
然后使用下面命令列出所有要升级的软件包:
# yum list updates
升级CentOS 5.6到 5.7:
# yum update
最后重启服务器,使升级生效:
# reboot
重启后,验证是否已经升级到CentOS 5.7 :
# cat /etc/RedHat-release
CentOS release 5.7 (Final)
或者
# lsb_release -a
LSB Version: :core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID: CentOS
Description: CentOS release 5.7 (Final)
Release: 5.7
Codename: Final
或
# rpm -q centos-release
centos-release-5-7.el5.centos