Linux-网络配置文件

阅读 57

2022-02-06

编辑网络配置文件

vim /etc/sysconfig/network-scripts/ifcfg-ens33
TYPE=Ethernet
BOOTPROTO=static
DEVICE=ens33
ONBOOT=yes
IPADDR=192.168.4.10
GATEWAY=192.168.4.2
NETMASK=255.255.255.0
DNS1=223.5.5.5
DNS2=223.6.6.6

重启网络

systemctl restart network

关闭防火墙和selinux:

systemctl status firewalld.service #查看状态
systemctl stop firewalld。service
systemctl disable firewalld。service
vim /etc/selinux/config
#:set nu显示序列号
#修改第七行,永久关闭selinux
SELINUX=disabled

重启虚拟机生效

reboot

精彩评论(0)

0 0 举报