Chinaunix首页 | 论坛 | 博客
  • 博客访问: 9249478
  • 博文数量: 1669
  • 博客积分: 16831
  • 博客等级: 上将
  • 技术积分: 12594
  • 用 户 组: 普通用户
  • 注册时间: 2011-02-25 07:23
个人简介

柔中带刚,刚中带柔,淫荡中富含柔和,刚猛中荡漾风骚,无坚不摧,无孔不入!

文章分类

全部博文(1669)

文章存档

2023年(4)

2022年(1)

2021年(10)

2020年(24)

2019年(4)

2018年(19)

2017年(66)

2016年(60)

2015年(49)

2014年(201)

2013年(221)

2012年(638)

2011年(372)

分类: 云计算

2017-04-20 09:25:01

虚拟化环境需要克隆虚拟主机,新版RHEL7.1重新封装有些变化
下面以 “GUI服务器”环境进行
1
2
rm -rf /etc/ssh/ssh_host*
rm -rf /etc/udev/rules.d/70*



删除 /etc/sysconfig/network-scripts/ifcfg-eno16777736文件中的MAC以及UUID
1
2
3
4
5
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)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#/!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




封装完后启动如下:
 

 

 
 
阅读(955) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~