虚拟机初始化脚本

more /etc/sysconfig/network-scripts/ifcfg-ens192

UUID=`uuidgen` && sed -i "/^UUID/cUUID=${UUID}" /etc/sysconfig/network-scripts/ifcfg-ens192

sed -i "/^IPADDR/cIPADDR=10.100.71.21" /etc/sysconfig/network-scripts/ifcfg-ens192

sed -i "/^Server/cServer21-Redis" /etc/hostname


echo -e "ALL:10.100.71.\nALL:202.198.16.168" >> /etc/hosts.allow

 

echo -e "ALL:ALL" >> /etc/hosts.deny

more /etc/sysconfig/network-scripts/ifcfg-ens192

posted @ 2020-05-06 16:30  乐乐和笑笑  阅读(209)  评论(0编辑  收藏  举报