1、查看网卡UUID
nmcli con
2、修改网卡设备名称(删掉多余的,把当前的改成eth0)
vi /etc/udev/rules.d/70-persistent-net.rules
3、修改eth0
DEVICE="eth0"
BOOTPROTO="static"
IPADDR=10.2.1.16
NETMASK=255.255.255.0
BROADCAST=10.2.1.255
GATEWAY=10.2.1.1
DNS1=10.2.1.1
HWADDR="00:0C:33:66:F8:67"
IPV6INIT="yes"
NM_CONTROLLED="yes"
ONBOOT="yes"
TYPE="Ethernet"
4、修改network文件:
vi /etc/sysconfig/network
开启ipv4:
NETWORKING=yes
关闭ipV6:
NETWORKING_IPV6=no
配置主机名:
HOSTNAME=xxxx
阅读(947) | 评论(0) | 转发(0) |