静态IP设置:


1、涉及文件文件:

①/etc/sysconfig/network-script/ifcfg-ens33

②/etc/resolv.conf

2、修改:

//ifcfg-ens33

BOOTPROTO=static

IPADDR=192.168.153.120

PREFIX=24

GATEWAY=192.168.153.2

DNS=192.168.153.2

ONBOOT=yes

//resolv.conf

nameserver=192.168.153.2

3、重启网卡

service network restart

4、测试:①ifconfig查看是否修改成功②ping一下百度

注:网卡管理

service server_name status

service network status

service network start

service network stop

service network restart