BOOTPROTO=staticONBOOT=yesIPADDR=192.168.2.152NETMASK=255.255.0.0GATEWAY=192.168.0.1DNS1=218.2.135.1DNS2=114.114.114.114
systemctl restart network.service
如果啟動network出錯,可能是NetworkManager的原因。
systemctl stop NetworkManager.service
systemctl stop firewalld.service #停止firewallsystemctl disable firewalld.service #禁止firewall開機啟動
vi /etc/selinux/config
#SELINUX=enforcing #注釋掉#SELINUXTYPE=targeted #注釋掉SELINUX=disabled #增加:wq! #保存退出
setenforce 0 #使配置立即生效(只在當前會話有效,重啟後失效)
http://www.bkjia.com/Linuxjc/1191923.html TechArticle