centos6在线升级到centos7

配置软件源
vi /etc/yum.repos.d/upgrade.repo  
[upgrade]
name=upgrade  
baseurl=http://dev.centos.org/centos/6/upg/x86_64/  
enable=1  
gpgcheck=0  
安装工具
yum -y install preupgrade-assistant-contents redhat-upgrade-tool preupgrade-assistant  
升级前检查潜在问题
preupg  
开始升级
rpm –import http://mirrors.163.com/centos/7.2.1511/os/x86_64/RPM-GPG-KEY-CentOS-7  
redhat-upgrade-tool –network 7.0 –instrepo http://mirrors.163.com/centos/7.2.1511/os/x86_64/ –force