centos7的網卡重啟方法


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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM