centos7的網(wǎng)卡重啟方法
1、centos6的網(wǎng)卡重啟方法:service network restart
centos7的網(wǎng)卡重啟方法:systemctl restart network
2、DNS配置文件:cat /etc/resolv.conf
設(shè)置主機(jī)和IP綁定信息:cat /etc/hosts
設(shè)置主機(jī)名:cat /etc/hostname
3、可以使用nmtui文本框方式修改IP
4、關(guān)閉防火墻并設(shè)置開機(jī)不啟動
查看防火墻狀態(tài):systemctl status firewalld.service
關(guān)閉:systemctl stop firewalld
開啟:systemctl start firewalld
開機(jī)自動關(guān)閉:systemctl disable firewalld
開機(jī)自動啟動:systemctl enable firewalld
查看開機(jī)是否啟動: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