centos重啟網卡的方法:1、對于centos6的網卡重啟命令是“service network restart”;2、對于centos7的網卡重啟命令是“systemctl restart network”。
本教程操作環境:CentOS 7系統、Dell G3電腦。
centos重啟網卡的方法是什么?
1、centos6的網卡重啟方法:service network restart
? centos7的網卡重啟方法:systemctl restart network
?
2、DNS配置文件:cat /etc/resolv.conf
設置主機和IP綁定信息:cat /etc/hosts
設置主機名:cat /etc/hostname
?
3、可以使用nmtui文本框方式修改IP
?
4、關閉防火墻并設置開機不啟動
查看防火墻狀態:
systemctl?status?firewalld.service
關閉:
systemctl?stop?firewalld
開啟:
systemctl?start?firewalld
開機自動關閉:
systemctl?disable?firewalld
開機自動啟動:
systemctl?enable?firewalld
查看開機是否啟動:
chkconfig?--list|grep?network(RHLE6)
5、臨時和永久關閉Selinux
臨時關閉:
_getenforce Enforcing _setenforce?0 setenforce:SELinux?is?disabled
永久關閉:
_vim?/etc/selinux/config
相關推薦:《Linux視頻教程》
? 版權聲明
文章版權歸作者所有,未經允許請勿轉載。
THE END
喜歡就支持一下吧
相關推薦