分类: LINUX
2007-09-27 10:03:17
用vi编辑 /etc/sysconfig/network and /etc/sysconfig/network-scripts/ifcfg-eth0
1) /etc/sysconfig/network
NETWORKING = yes
FORWARD_IPV4 = yes
HOSTNAME = xxxx.com #你的主机名
GATEWAY = 123.123.123.123 #网关
GATEWAYDEV = eth0
2) /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE = eth0
IPADDR = xxx.xxx.xxx.xxx #你的IP地址
NETMASK = xxx.xxx.xxx.xxx #你的子网掩码
NETWORK = xxx.xxx.xxx.xxx #你的工作网络
BROADCAST = xxx.xxx.xxx.xxx #你的广播址
ONBOOT = yes
然后运行 /etc/sysconfig/network-scripts/ifup eth0 启动。
或者 service network restart