云主机模板制作

################################
centos 6.5

yum 换成ali

主机名改成centos6

yum install qemu-guest-agent

删除网卡mac

清除网卡信息

/etc/udev/rules.d/70-persistent-net.rules

远程端口修改为2000

sed -i 's/#Port 22/Port 2000/g' /etc/ssh/sshd_config
service sshd restart

禁用selinux
sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
setenforce 0

添加防火墙允许

清除日志
echo > /var/log/wtmp
echo > /var/log/btmp
history -c

################################
2008 R2
远程端口修改为1234
封139和445
升级补丁
打开ping

2008-v2.img.qcow2
Win-2008-r2-v2

安装guset-agent
清除日志
修改默认密码为

################################
2008 R2 加 mssql 2008

2008-ms-v2.img.qcow2
Win-2008-r2-sql-08-v2

安装guset-agent
清除日志
修改默认密码为

################################
2008 R2 系统盘100g

远程端口修改为1234
封139和445
升级补丁
打开ping
安装guset-agent
清除日志
修改默认密码

################################

################################
2012 R2 系统盘100g

远程端口修改为
封139和445
升级补丁
打开ping
安装guset-agent
清除日志
修改默认密码为

################################

################################
centos 7
主机名改成centos7
hostnamectl set-hostname centos7

yum 换成163

yum install qemu-guest-agent

删除网卡mac

清除网卡信息

/etc/udev/rules.d/70-persistent-net.rules

远程端口修改为2000
sed -i 's/#Port 22/Port 2000/g' /etc/ssh/sshd_config
service sshd restart

禁用selinux
sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
setenforce 0

清除日志
echo > /var/log/wtmp
echo > /var/log/btmp
history -c

添加防火墙允许
firewall-cmd --zone=public --add-port=2000/tcp --permanent
firewall-cmd --reload

###############################

Centos yum源
1、备份
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
2、下载新的CentOS-Base.repo 到/etc/yum.repos.d/
CentOS 5
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo
CentOS 6
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
CentOS 7
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
3、之后运行yum makecache生成缓存

转载于:https://blog.51cto.com/46231571/2132428

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值