cat /etc/redhat-release
2、更新源
vim /etc/yum.repos.d/upgrade.repo
[upgrade] name=upgrade baseurl=https://buildlogs.centos.org/centos/6/upg/x86_64/ enable=1 gpgcheck=0
3、卸载6.x自带的openscap,并安装老版本
yum erase openscap yum install https://buildlogs.centos.org/centos/6/upg/x86_64/Packages/openscap-1.0.8-1.0.1.el6.centos.x86_64.rpm
yum install redhat-upgrade-tool preupgrade-assistant-contents
5、检测版本升级的风险,如果控制台输出了错误信息,需要查询下解决方案并解决
preupg -s CentOS6_7
6、更新系统
centos-upgrade-tool-cli --network 7 --instrepo=https://mirrors.tuna.tsinghua.edu.cn/centos-vault/7.2.1511/os/x86_64/ --force
cd /var/tmp wget https://mirrors.tuna.tsinghua.edu.cn/centos-vault/7.2.1511/isos/x86_64/CentOS-7-x86_64-DVD-1511.iso centos-upgrade-tool-cli --iso=./CentOS-7-x86_64-DVD-1511.iso
ln -s /usr/lib64/libsasl2.so.3.0.0 /usr/lib64/libsasl2.so.2 ln -s /usr/lib64/libpcre.so.1.2.0 /usr/lib64/libpcre.so.0
重启系统
原文:https://www.cnblogs.com/rubekid/p/15222431.html