下面由centos教程欄目給大家介紹centos7的網(wǎng)卡重啟方法,希望對需要的朋友有所幫助!
centos7的網(wǎng)卡重啟方法
1、centos6的網(wǎng)卡重啟方法:service network restart
centos7的網(wǎng)卡重啟方法:systemctl restart network
2、DNS配置文件:cat /etc/resolv.conf
設(shè)置主機和IP綁定信息:cat /etc/hosts
設(shè)置主機名:cat /etc/hostname
3、可以使用nmtui文本框方式修改IP
4、關(guān)閉防火墻并設(shè)置開機不啟動
查看防火墻狀態(tài):systemctl status firewalld.service
關(guān)閉:systemctl stop firewalld
開啟:systemctl start firewalld
開機自動關(guān)閉:systemctl disable firewalld
開機自動啟動:systemctl enable firewalld
查看開機是否啟動:chkconfig –list|grep network(RHLE6)
5、臨時和永久關(guān)閉Selinux
臨時關(guān)閉:
_getenforce Enforcing _setenforce 0 setenforce:SELinux is disabled
永久關(guān)閉:
_vim /etc/selinux/config