网上有人说用centos6.6的版本升级到7比较好 使用dev的教程需要把域名改为buildlogs
测试中使用的是6.10最新版
升级有风险 升级有风险 升级有风险 不是100%成功
yum remove -y openscap && yum install -y http://buildlogs.centos.org/centos/6/upg/x86_64/Packages/openscap-1.0.8-1.0.1.el6.centos.x86_64.rpm cat>/etc/yum.repos.d/upgradetool.repo<<EOF [upg] name=CentOS-$releasever - Upgrade Tool baseurl=http://buildlogs.centos.org/centos/6/upg/x86_64/ gpgcheck=1 enabled=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 EOF yum install -y redhat-upgrade-tool preupgrade-assistant preupgrade-assistant-contents yes | preupg -s CentOS6_7 #rpm --import http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-7 rpm --import https://mirrors.aliyun.com/centos/7/os/x86_64/RPM-GPG-KEY-CentOS-7 #redhat-upgrade-tool-cli --network 7 --cleanup-post --instrepo=http://vault.centos.org/centos/7.2.1511/os/x86_64/ --addrepo=CentOS7=http://mirror.centos.org/centos/7/os/x86_64/ redhat-upgrade-tool-cli --network 7 --cleanup-post --instrepo=http://mirrors.aliyun.com/centos-vault/7.0.1406/os/x86_64 --addrepo=CentOS7=http://mirror.centos.org/centos/7/os/x86_64/ # 需要.treeinfo 里面有upgrade #http://vault.centos.org/centos/7.2.1511/os/x86_64/.treeinfo 参考 https://www.dionipe.id/blog/upgrading-centos-6-to-centos-7 https://qiita.com/kuroki_roku/items/38d5fe0d757349c70cd8 http://www.kvm.la/tag/%E5%8D%87%E7%BA%A7/
升级后ssh默认没启动
systemctl start sshd
systemctl enable sshd