满意答案

1、保证网络是通的,设置网络地址及dns

设置dns

# vi /etc/resolv.conf

nameserver 202.96.134.133

nameserver 202.96.128.68

设置网络地址

# vi /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0

BOOTPROTO=static

TYPE=Ethernet

HWADDR=xx:xx:xx:xx:xx:xx (网卡mac地址,不用改)

IPADDR=x.x.x.x(ip地址)

NETMASK=x.x.x.x(子网掩码)

NETWORK=x.x.x.x(网络地址)

GATEWAY=x.x.x.x(网关地址)

ONBOOT=yes(开机自启动)

2、设置完成后,重启网络服务

# service network restart

3、判断是否网络畅通

# ping www.baidu.com

PING www.a.shifen.com (115.239.210.27) 56(84) bytes of data.

64 bytes from 115.239.210.27: icmp_seq=1 ttl=54 time=9.76 ms

64 bytes from 115.239.210.27: icmp_seq=2 ttl=54 time=10.6 ms

64 bytes from 115.239.210.27: icmp_seq=3 ttl=54 time=9.47 ms

64 bytes from 115.239.210.27: icmp_seq=4 ttl=54 time=9.43 ms

64 bytes from 115.239.210.27: icmp_seq=5 ttl=54 time=9.71 ms

64 bytes from 115.239.210.27: icmp_seq=6 ttl=54 time=9.52 ms

正常返回如上信息,表示网络正常,可打开网页

00分享举报

Logo

更多推荐