centos7 静态ip配置

centos7 静态ip配置

1.

cd /etc/sysconfig/network-scripts
vi vi ifcfg-ens33

2. 修改

bootproto=static
onboot=yes

 

3. 添加

IPADDR=192.168.137.150
NETMASK=255.255.255.0
GATEWAY=192.168.137.2
DNS1=8.8.8.8

保存退出

4. 重启网络服务

systemctl restart network

 

posted on 2020-05-24 09:39  liguangming  阅读(136)  评论(0编辑  收藏  举报

导航