修改配置文件
1 | vim /etc/sysconfig/network-scripts/ifcfg-eth0 |
- 将“BOOTPROTO=dhcp”改为“BOOTPROTO=static”
- 将“ONBOOT=no”改为“ONBOOT=yes”
未修改前
1 | TYPE="Ethernet" |
修改后
1 | TYPE="Ethernet" |
重启网络
1 | /etc/init.d/network restart |
1 | vim /etc/sysconfig/network-scripts/ifcfg-eth0 |
1 | TYPE="Ethernet" |
1 | TYPE="Ethernet" |
1 | /etc/init.d/network restart |