一、centos6的網卡重啓方法:service network restart
centos7的網卡重啓方法:systemctl restart networklinux
二、DNS配置文件:cat /etc/resolv.conf
設置主機和IP綁定信息:cat /etc/hosts
設置主機名:cat /etc/hostnamevim
三、可使用nmtui文本框方式修改IPcentos
四、關閉防火牆並設置開機不啓動
查看防火牆狀態:systemctl status firewalld.service
關閉:systemctl stop firewalld
開啓:systemctl start firewalld
開機自動關閉:systemctl disable firewalld
開機自動啓動:systemctl enable firewalld
查看開機是否啓動:chkconfig --list|grep network(RHLE6)ide
五、臨時和永久關閉Selinux
臨時關閉:
_getenforce
Enforcingui
_setenforce 0
setenforce:SELinux is disabledcentos7
永久關閉:
_vim /etc/selinux/configrest