Centos6模板
IPTABLES/SELINUX
# iptalbes -F
# service iptables save
或
# /etc/init.d/iptables stop
# chkconfig iptables off
# setenforce 0
NETWORK
保证网卡都是eth0 :
#/etc/init.d/NetworkManager stop
#chkconfig NetworkManager off
# >/etc/udev/rules.d/70-persistent-net.rules
#vim /etc/sysconfig/network-scripts/ifcfg-eth0 (删除mac,uuid)
#vim /etc/sysconfig/network-scripts/ifcfg-eth1 (删除mac,uuid)
DEVICE=eth0
TYPE=Ethernet
ONBOOT=yes
BOOTPROTO=dhcp
#/etc/init.d/network restart
配置YUM
时间同步
#yum install chrony -y
#systemctl start chronyd
#systemctl enable chronyd
#vim /etc/chrony.conf
server 192.168.2.148 iburst
allow 192.168/16
# chronyc sources
SSH连接
优化SSH连接速度
注:重启生效
# vim /etc/ssh/sshd_config
UseDNS no
GSSAPIAuthentication no
密钥认证
#ssh-keygen -t rsa
#ssh-copy-id -i 192.168.10.6
Centos7模板
# cat /etc/sysconfig/network-scripts/ifcfg-enp0s3
DEVICE=eth0
TYPE=Ethernet
ONBOOT=yes
BOOTPROTO=dhcp
#mv /etc/sysconfig/network-scripts/ifcfg-enp0s3 /etc/sysconfig/network-scripts/ifcfg-eth0
#tail -3 /etc/default/grub #红色是添加内容
GRUB_CMDLINE_LINUX="rd.lvm.lv=centos/swap vconsole.font=latarcyrheb-sun16 rd.lvm.lv=centos/root crashkernel=auto vconsole.keymap=us rhgb quiet net.ifnames=0 biosdevname=0"
GRUB_DISABLE_RECOVERY="true
#grub2-mkconfig -o /boot/grub2/grub.cfg
#reboot
当克隆机出现网络问题时,处理方式如下:
- 编辑相关网卡配置文件,删除其中的"身份证"-->UUID
- # rm -rf /etc/udev/rules.d/70-persistent-ipoib.rules
-------------------------------------------------------------
转载请保留此段声明,且在文章页面明显位置给出原文链接,谢谢!
------------------------------------------------------------------------------
如果觉得这篇文章对你有小小的帮助的话,记得在右下角点个“推荐”哦,博主在此感谢!
------------------------------------------------------------------------------