CentOS6.5升级到CentOS7,centos6.5centos7


redhat提供了一个redhat-upgrade-tool的升级工具;

[1]配置软件源

#vim/etc/yum.repos.d/upgrade.repo

[upgrade]

name=upgrade

baseurl=http://dev.centos.org/centos/6/upg/x86_64/

enable=1

gpgcheck=0

[2]安装软件工具

yum-yinstallpreupgrade-assistant-contentsredhat-upgrade-toolpreupgrade-assistant

[3]升级前检查潜在问题

#preupg

Preupgtooldoesn'tdotheactualupgrade.

Pleaseensureyouhavebackedupyoursystemand/ordataintheeventofafailedupgrade

thatwouldrequireafullre-installofthesystemfrominstallationmedia.Doyouwanttocontinue?y/n

y

Gatheringlogsusedbypreupgradeassistant:

Allinstalledpackages:01/10...finished(time00:00s)

Allchangedfiles:02/10...finished(time00:40s)

Changedconfigfiles:03/10...finished(time00:00s)

Allusers:04/10...finished(time00:00s)

Allgroups:05/10...finished(time00:00s)

Servicestatuses:06/10...finished(time00:00s)

Allinstalledfiles:07/10...finished(time00:01s)

Alllocalfiles:08/10...finished(time00:03s)

Allexecutablefiles:09/10...finished(time00:00s)

RedHatsignedpackages:10/10...finished(time00:00s)

Assessmentofthesystem,runningchecks/SCEscripts:

001/100...done(ConfigurationFilestoReview)

002/100...done(FileListsforManualMigration)

003/100...done(BaculaBackupSoftware)

004/100...done(MySQLconfiguration)

005/100...done(MigrationoftheMySQLdatastack)

006/100...done(GeneralchangesindefaultMySQLimplementation)

007/100...done(PostgreSQLupgradecontent)

Assessmentfinished(time00:00s)

Resulttablewithchecksandtheirresultsformaincontents:

------------------------------------------------------------------------------------------

|Systemkickstart|notapplicable|

|YUM|notapplicable|

|CheckforusageofdangerousrangeofUID/GIDs|notapplicable|

|IncorrectusageofreservedUID/GIDs|notapplicable|

|NISypbindconfigfilesback-up|notapplicable|

|NISMakefileback-up|notapplicable|

|NISservermapscheck|notapplicable|

|NISserverMAXUIDandMAXGIDlimitscheck|notapplicable|

|NISserverconfigfileback-up|notapplicable|

------------------------------------------------------------------------------------------

Tarballwithresultsisstoredhere/root/preupgrade-results/preupg_results-140716022514.tar.gz.

Thelatestassessmentisstoredindirectory/root/preupgrade.

UploadresultstoUIbycommand:

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

[4]开始升级

#rpm--importhttp://centos.excellmedia.net/7.0.1406/os/x86_64/RPM-GPG-KEY-CentOS-7

正常的运行以上命令可以升级完成;

#redhat-upgrade-tool--network7.0--instrepohttp://centos.excellmedia.net/7.0.1406/os/x86_64/

这强制的就显得有点不友好了,生产环境慎用;

更新到这一步:

settinguprepos...

.treeinfo|1.1kB00:00

gettingbootimages...

vmlinuz-redhat-upgrade-tool|4.7MB01:38

initramfs-redhat-upgrade-tool.img|32MB14:45

settingupupdate...

findingupdates100%[=====================================================================================================]

(1/272):acl-2.2.51-12.el7.x86_64.rpm|81kB00:00

(2/272):attr-2.4.46-12.el7.x86_64.rpm|66kB00:00

(3/272):audit-2.3.3-4.el7.x86_64.rpm|223kB00:01

(4/272):audit-libs-2.3.3-4.el7.x86_64.rpm|77kB00:00

(5/272):authconfig-6.2.8-8.el7.x86_64.rpm|399kB00:08

(6/272):basesystem-10.0-7.el7.centos.noarch.rpm|5.0kB00:00

(7/272):bash-4.2.45-5.el7.x86_64.rpm|1.0MB00:17

(270/272):yum-plugin-fastestmirror-1.1.31-24.el7.noarch.rpm|28kB00:03

(271/272):zlib-1.2.7-13.el7.x86_64.rpm|89kB00:06

(272/272):zlib-devel-1.2.7-13.el7.x86_64.rpm|49kB00:01

settingupsystemforupgrade

Finished.Reboottostartupgrade.

#reboot

[5]升级完成:

#cat/etc/redhat-release

CentOSLinuxrelease7.0.1406(Core)

本文出自 “西伯利亚·狼” 博客,请务必保留此出处http://kernal.blog.51cto.com/8136890/1532150

相关内容

    暂无相关文章