标签:rhel7.1 rhel7 centos7 linux centos7.1 rhel
虚拟化环境需要克隆虚拟主机,新版RHEL7.1重新封装有些变化
下面以 “GUI服务器”环境进行
rm -rf /etc/ssh/ssh_host* rm -rf /etc/udev/rules.d/70*
删除 /etc/sysconfig/network-scripts/ifcfg-eno16777736文件中的MAC以及UUID
cat /dev/null > /etc/machine-id rm -rf /etc/hostname systemctl enable initial-setup-graphical.service systemctl enable firstboot-graphical.service cat /dev/null > /etc/sysconfig/firstboot
可以写如下脚本执行即可:(关闭防火墙,关闭SElinux)
#/!bin/bash systemctl stop firewalld.service sleep 3 systemctl disable firewalld.service sed -n ‘s/=enforcing/=permissive/‘ /etc/selinux/config setenforce 0 rm -rf /etc/ssh/ssh_host* rm -rf /etc/udev/rules.d/70* sed ‘/^MAC/d‘ "$(find /etc/ -name ‘ifcfg\-eno*‘ -o -name ‘ifcfg\-eth*‘)" sed ‘/^UUID/d‘ "$(find /etc/ -name ‘ifcfg\-eno*‘ -o -name ‘ifcfg\-eth*‘)" cat /dev/null > /etc/machine-id rm -rf /etc/hostname systemctl enable initial-setup-graphical.service systemctl enable firstboot-graphical.service cat /dev/null > /etc/sysconfig/firstboot init 0
封装完后启动如下:
本文出自 “知识改变命运科技改变生活” 博客,请务必保留此出处http://leoshi.blog.51cto.com/152597/1658137
标签:rhel7.1 rhel7 centos7 linux centos7.1 rhel
原文地址:http://leoshi.blog.51cto.com/152597/1658137