配置IP地址

修改 /etc/sysconfig/network-scripts/ifcfg-eth0 文件

DEVICE=eth0
BOOTPROTO=static
IPADDR=xxx.xxx.xxxx.xxx
NETMASK=xxx.xxx.xxxx.xxx
GATEWAY=xxx.xxx.xxx.xxx
HWADDR=xx:xx:xx:xx:xx:xx
ONBOOT=yes
TYPE=Ethernet


service network restart 重启 network 服务

/etc/init.d/network restart 重启 network 服务

ifdown eth0    ifup eth0 重新加载网卡


设置DNS
/etc/resolv.conf
nameserver xxx.xxx.xxxx.xxx

猜你喜欢

转载自myaerie.iteye.com/blog/1221017