Error

C++博客 首页 新随笔 联系 聚合 管理
  217 Posts :: 61 Stories :: 32 Comments :: 0 Trackbacks

http://www.kaifajie.cn/os2/6223.html

1,修改静态网络配置
Java代码
[root@davidserver ~]# vim /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
BOOTPROTO="static"
HWADDR="00:0C:29:99:5A:3C"
NM_CONTROLLED="yes"
ONBOOT="yes"
TYPE="Ethernet"
UUID="1cb095a6-b832-4dc1-92e1-1a1a7a58abc8"
IPADDR="8.0.0.10"
BROADCAST="8.0.0.255"
NETMASK="255.255.255.0"
NETWORK="8.0.0.0"
GATEWAY="8.0.0.1"
IPV6INIT="no"
IPV6_AUTOCONF="no"

[root@davidserver ~]# vim /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
BOOTPROTO="static"
HWADDR="00:0C:29:99:5A:3C"
NM_CONTROLLED="yes"
ONBOOT="yes"
TYPE="Ethernet"
UUID="1cb095a6-b832-4dc1-92e1-1a1a7a58abc8"
IPADDR="8.0.0.10"
BROADCAST="8.0.0.255"
NETMASK="255.255.255.0"
NETWORK="8.0.0.0"
GATEWAY="8.0.0.1"
IPV6INIT="no"
IPV6_AUTOCONF="no"

2,修改DNS服务
Java代码
[root@davidserver ~]# vim/etc/resolv.conf
nameserver 8.0.0.1

[root@davidserver ~]# vim/etc/resolv.conf
nameserver 8.0.0.1

3,重启网卡
Java代码
[root@davidserver ~]# service network restart
Shutting down interface eth0: [ OK ]
Shutting down loopback interface: [ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface eth0: [ OK ]

[root@davidserver ~]# service network restart
Shutting down interface eth0: [ OK ]
Shutting down loopback interface: [ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface eth0: [ OK ]

输出以上信息,代表成功了

or

Java代码
[root@davidserver ~]# ifdown eth0; ifup eth0





///////////////////////////
vim /etc/sysconfig/network-scripts/ifcfg-eth0 

posted on 2013-02-16 16:14 Enic 阅读(118) 评论(0)  编辑 收藏 引用 所属分类: linux

只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理