第一步:修改主机名
$ vi /etc/sysconfig/network
第二步:
$ vi /etc/udev/rules.d/70-persistent-net.rules
注:
①注释掉第一网卡驱动红色标注地方
②修改第二个网卡驱动name=“eth0”
# PCI device 0x1022:0x2000 (pcnet32)
#SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:ac:0c:#39", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
# PCI device 0x1022:0x2000 (pcnet32)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:95:4a:d3", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
#SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:ac:0c:#39", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
# PCI device 0x1022:0x2000 (pcnet32)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:95:4a:d3", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
第三步:
$ vi /etc/sysconfig/network-scripts/ifcfg-eth0
删除UUID,HWADRR
修改
DEVICE=eth0
TYPE=Ethernet
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=static
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="System eth0"
IPADDR=192.168.8.109
GATEWAY=192.168.8.2
第四步:
$ reboot
重启机器
第五步:
修改 /etc/hosts
第六步:
关闭防火墙,SELINUX
service iptables stop
service ip6tables stop
chkconfig iptables off
chkconfig ip6tables off
vi /etc/selinux/config
SELINUX=disabled