快上网专注成都网站设计 成都网站制作 成都网站建设
成都网站建设公司服务热线:028-86922220

网站建设知识

十年网站开发经验 + 多家企业客户 + 靠谱的建站团队

量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决

CentOS6升级到CentOS7失败的解决办法

操作系统: CentOS6.10

成都创新互联公司坚持“要么做到,要么别承诺”的工作理念,服务领域包括:成都网站设计、成都网站建设、企业官网、英文网站、手机端网站、网站推广等服务,满足客户于互联网时代的平桥网站设计、移动媒体设计的需求,帮助企业找到有效的互联网解决方案。努力成为您成熟可靠的网络建设合作伙伴!

本系统源

#wget  -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo

1.查看当前CentOS版本

[root@sky9890 sky9890]# cat /etc/redhat-release 

CentOS release 6.10 (Final)

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自带的较新的助手,并安装老版,否则会报错。

#先删除旧版本

#yum erase openscap -y 

#以下无法连接

#yum install http://dev.centos.org/centos/6/upg/x86_64/Packages/openscap-1.0.8-1.0.1.el6.centos.x86_64.rpm -y   

#以下两个连接都有效

yum install ftp://ftp.pbone.net/mirror/ftp.scientificlinux.org/linux/scientific/6.5/x86_64/updates/fastbugs/openscap-1.0.8-1.el6_5.x86_64.rpm  -y   

yum install https://buildlogs.centos.org/centos/6/upg/x86_64/Packages/openscap-1.0.8-1.0.1.el6.centos.x86_64.rpm -y  

4.安装升级系统助手

#利用到upgrade.repo源

#yum install redhat-upgrade-tool preupgrade-assistant-contents -y  

5.检测是否可以升级

#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:56s)

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)

RedHat signed packages : 10/11 ...finished (time 00:00s)

CentOS signed packages : 11/11 ...finished (time 00:00s)

......

Tarball with results is stored here /root/preupgrade-results/preupg_results-200304120406.tar.gz .

The latest assessment is stored in directory /root/preupgrade .

Summary information:

We found some critical issues. In-place upgrade is not advised.

Read the file /root/preupgrade/result.html for more details.

Upload results to UI by command:

e.g. preupg -u http://127.0.0.1:8099/submit/ -r /root/preupgrade-results/preupg_results-*.tar.gz .

#以下的报错,主要原因是没有用最新的openscap软件包

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]

preupg: error: [Errno 2] No such file or directory: '/root/preupgrade/result.html'

6.导入CentOS7的key

#rpm --import http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-7

7.开始升级

#尝试过多个系统版本,均无法升级。

#centos-upgrade-tool-cli --network 7 --instrepo=http://vault.centos.org/centos/7.2.1511/os/x86_64/

setting up repos...

cmdline-instrepo                                                                                  

cmdline-instrepo/primary_db                                                                       

No upgrade available for the following repos: base extras updates upgrade.treeinfo                                                            

preupgrade-assistant risk check found EXTREME risks for this upgrade.

Run preupg --riskcheck --verbose to view these risks.

Continuing with this upgrade is not recommended.


标题名称:CentOS6升级到CentOS7失败的解决办法
当前地址:http://6mz.cn/article/pphjsh.html

其他资讯