首页 > 其他 > 详细

Centos7 重启网卡

时间:2020-06-28 11:48:00      阅读:65      评论:0      收藏:0      [点我收藏+]
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
1、 centos6的网卡重启方法:

service network restart

centos7的网卡重启方法:

systemctl restart network

2、DNS配置文件:cat /etc/resolv.conf

设置主机和IP绑定信息:cat /etc/hosts 
设置主机名:cat /etc/hostname

 
3、关闭防火墙并设置开机不启动

查看防火墙状态:systemctl status firewalld.service 
关闭:systemctl stop firewalld 
开启:systemctl start firewalld 
开机自动关闭:systemctl disable firewalld 
开机自动启动:systemctl enable firewalld 
查看开机是否启动:chkconfig --list|grep network(RHLE6)

4、临时和永久关闭Selinux

临时关闭: 
_getenforce 
Enforcing

_setenforce 0 
setenforce:SELinux is disabled

永久关闭:

_vim /etc/selinux/config

Centos7 重启网卡

原文:https://www.cnblogs.com/wangjian123/p/13201787.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!