CentOS 7 網絡卡重啟方法

2021-08-26 17:48:48 字數 870 閱讀 2284

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

Centos7 網絡卡配置

進入網絡卡配置檔案目錄 cd etc sysconfig network scripts編輯配置檔案 vim ifcfg ens33type ethernet proxy method none browser only no bootproto static 使用靜態ip位址,預設為dhcp ip...

CentOS7網絡卡配置

安裝完centos之後,通過ip addr命令檢視ip資訊 root localhost yum.repos.d ip addr 1 lo mtu 65536 qdisc noqueue state unknown group default qlen 1000 link loopback 00 0...

CentOS7網絡卡配置

安裝完centos之後,通過ip addr命令檢視ip資訊 root localhost yum.repos.d ip addr 1 lo mtu 65536 qdisc noqueue state unknown group default qlen 1000 link loopback 00 0...