服务器有两个网口,上面的网口对应eth0下面的对应eth1,要将联网的网线插在eth1第二个网口,避免更改eth0的固定ip
1. 配置ip,此处将eth0的ip设置为192.168.0.110,实验室网络不能更改eth0的ip固定地址,只能更改eth1,按照eth0方法更改eth1为192.168.0.111
2. 重启网卡
/etc/init.d/network restart
server network restart
3. 运行报错 failed, 关闭NetworkManager, service NetworkManager stop
4. ifconfig 后没有出现eth1,修改eth1网卡的配置文件,将onboot=‘no’
vim /etc/sysconfig/network-scripts/ifcfg-eth0
改为yes后重启网络
/etc/init.d/network restart
5. ping eth1的IP,如果可以ping通,打开浏览器尝试