linux FC10 FC 10 Fedora 10 static ip 无法访问外网 DNS Generated by NetworkManager

无法使用静态ip,不知怎么回事,还多了个Network Manager。。输入法也没有

反正现在搞定了,总结一下吧!

Oh,my god!FC 10!

 

1.打开终端,用su切换到超级用户模式,如下:
[neo@localhost ~]$ su
密码:
[root@localhost neo]#


2.执行gedit /etc/sysconfig/network-scripts/ifcfg-eth0,如下:
[root@localhost neo]#gedit /etc/sysconfig/network-scripts/ifcfg-eth0


我的参数设置如下:
# Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller
DEVICE=eth0
BOOTPROTO=static
ONBOOT=yes
USERCTL=yes
PEERDNS=yes
IPV6INIT=no
NM_CONTROLLED=yes
TYPE=Ethernet
IPADDR=192.168.0.3  #根据情况自己设吧!
NETMASK=255.255.255.0
HWADDR=00:1d:7d:e6:f5:42 #根据情况自己设吧!
GATEWAY=192.168.0.1 #根据情况自己设吧!

DNS1=202.106.0.20 #根据你的DNS,自己设吧!
DNS2=202.106.46.151
#must insert this two lines!!!!!!
(保存退出)


(

3.执行gedit /etc/resolv.conf,如:
[root@localhost neo]# gedit /etc/resolv.conf
可以看一眼,内容not need to change!:
# Generated by NetworkManager

。。。。

)


4.执行service network restart,,如:
[root@localhost neo]# service network restart


5.执行gedit /etc/rc.local,如:
[root@localhost neo]# gedit /etc/rc.local
我的参数设置:
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

route add -net 192.168.0.1 netmask 255.255.255.0 eth0 #也是,根据情况自己设!
route add default gw 192.168.0.1 eth0 #也是,根据情况自己设!
touch /var/lock/subsys/local

(保存退出)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值