截止文章发布时候,centos官方已经停止了对Centos6的支持,无法通过官方渠道下载升级助手插件了。
如果你通过yum命令报错404的情况,请通过
但是当你解决404问题后,依然会发现,安装升级助手出现另外一个提示。
[root@bbs ~]# yum install redhat-upgrade-tool preupgrade-assistant-contents -y
已加载插件:fastestmirror, security
设置安装进程
Loading mirror speeds from cached hostfile
No package redhat-upgrade-tool available.
No package preupgrade-assistant-contents available这个时候你可以通过在线安装RMP包解决。
`[root@bbs ~]# yum install https://buildlogs.centos.org/centos/6/upg/x86_64/Packages/preupgrade-assistant-1.0.2-33.0.3.el6.centos.x86_64.rpm -y
[root@bbs ~]# yum install https://buildlogs.centos.org/centos/6/upg/x86_64/Packages/preupgrade-assistant-contents-0.5.13-1.0.5.el6.centos.noarch.rpm -y
[root@bbs ~]# yum install https://buildlogs.centos.org/centos/6/upg/x86_64/Packages/preupgrade-assistant-ui-1.0.2-33.0.3.el6.centos.x86_64.rpm -y
[root@bbs ~]# yum install https://buildlogs.centos.org/centos/6/upg/x86_64/Packages/redhat-upgrade-tool-0.7.22-3.el6.centos.noarch.rpm -y
安装完成后,再运行
```[root@bbs ~]# preupg -s CentOS6_7
Preupg tool doesn't do the actual upgrade.
Please ensure you have backed up your system and/or data in the event of a failed upgrade that would require a full re-install of the system from installation media.
Do you want to continue? y/n
y
Gathering logs used by preupgrade assistant:
All installed packages : 01/11 ...finished (time 00:00s)
All changed files : 02/11 ...finished (time 01:12s)
Changed config files : 03/11 ...finished (time 00:00s)
All users : 04/11 ...finished (time 00:00s)
All groups : 05/11 ...finished (time 00:00s)
Service statuses : 06/11 ...finished (time 00:00s)
All installed files : 07/11 ...finished (time 00:02s)
All local files : 08/11 ...finished (time 00:05s)
.
.
.
如果升级检测过程中提示:
Assessment finished (time 00:00s)
I/O warning : failed to load external entity "/usr/share/openscap/xsl/security-guide.xsl"
compilation error: file /usr/share/preupgrade/xsl/preup.xsl line 40 element import
xsl:import : unable to load /usr/share/openscap/xsl/security-guide.xsl
I/O warning : failed to load external entity "/usr/share/openscap/xsl/oval-report.xsl"
compilation error: file /usr/share/preupgrade/xsl/preup.xsl line 41 element import
xsl:import : unable to load /usr/share/openscap/xsl/oval-report.xsl
I/O warning : failed to load external entity "/usr/share/openscap/xsl/sce-report.xsl"
compilation error: file /usr/share/preupgrade/xsl/preup.xsl line 42 element import
xsl:import : unable to load /usr/share/openscap/xsl/sce-report.xsl
OpenSCAP Error:: Could not parse XSLT file '/usr/share/preupgrade/xsl/preup.xsl' [oscapxml.c:416]
Unable to open file /root/preupgrade/result.html
Usage: preupg [options]相信大家都有百度过,由于openscap的版本太高,所以需要降级。
[root@bbs ~]# yum downgrade openscap降级openscap后,再执行升级检测即可成功
升级检测通过后,在线下载centos7镜像,或者通过sftp本地上传。
先导入RPM签名证书
[root@bbs ~]# rpm --import https://mirrors.ustc.edu.cn/epel/RPM-GPG-KEY-EPEL-7然后执行升级
[root@bbs ~]# centos-upgrade-tool-cli --iso=/root/CentOS-7-x86_64-DVD-2009.iso
##本地升级[root@bbs ~]# centos-upgrade-tool-cli --network 7 --instrepo=http://mirror.centos.org/centos/7/os/x86_64
##在线升级升级完成后,重启进入新系统。
[root@bbs ~]# setup
[root@bbs ~]# reboot如果挂了的话,那就只能恭喜了!