歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux綜合 >> 學習Linux >> Centos7 網絡配置

Centos7 網絡配置

日期:2017/3/3 17:37:20   编辑:學習Linux

Centos7 網絡配置


熱度2 評論 132 www.BkJia.Com 網友分享於: 2017-02-10 07:02:08 浏覽數42482次

Centos7 網絡配置


配置網卡

BOOTPROTO=staticONBOOT=yesIPADDR=192.168.2.152NETMASK=255.255.0.0GATEWAY=192.168.0.1DNS1=218.2.135.1DNS2=114.114.114.114

重啟network

systemctl restart network.service

如果啟動network出錯,可能是NetworkManager的原因。

停止NetworkManager

systemctl stop NetworkManager.service

關閉防火牆

systemctl stop firewalld.service #停止firewallsystemctl disable firewalld.service #禁止firewall開機啟動

關閉selinux

vi /etc/selinux/config

#SELINUX=enforcing #注釋掉#SELINUXTYPE=targeted #注釋掉SELINUX=disabled #增加:wq! #保存退出

setenforce 0 #使配置立即生效(只在當前會話有效,重啟後失效)

http://www.bkjia.com/Linuxjc/1191923.html TechArticle

Copyright © Linux教程網 All Rights Reserved