分类: LINUX
2012-03-07 15:43:53
/etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.0.3
NETMASK=255.255.255.0
GATEWAY=192.168.0.1
使IP地址生效:
/sbin/ifdown eth0
/sbin/ifup eth0
配置dns解析
echo "nameserver 211.98.1.28">> /etc/resolv.conf
通知网关更新信息:
/etc/init.d/network restart