close

引用: http://www.linuxdiyf.com/viewarticle.php?id=118958

這個是執行的命令
這個顏色是要根據情况改變的参数


1.打開terminal,用su切到root,如下:
su

2.執行gedit /etc/sysconfig/network-scripts/ifcfg-eth0,如下:
gedit /etc/sysconfig/network-scripts/ifcfg-eth0
參數設置如下:
# Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller
DEVICE=eth0
HWADDR=00:e0:4d:4d:cc:bd
ONBOOT=yes
BOOTPROTO=static
USERCTL=yes
PEERDNS=yes
IPV6INIT=no
NM_CONTROLLED=yes
TYPE=Ethernet
NETMASK=255.255.255.0
IPADDR=192.168.81.235
DNS1=202.114.0.242
DNS2=202.112.20.131
GATEWAY=202.114.6.25
(存檔關掉)
3.執行gedit /etc/resolv.conf
gedit /etc/resolv.conf
參數設置如下:
# Generated by NetworkManager(Domain Name---我只輸入一個)
nameserver 202.114.0.242
nameserver 202.112.20.131
(存檔關掉)
4.執行service network restart,,如:
service network restart
5.執行gedit /etc/rc.local,如:
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 202.114.6.0 netmask 255.255.255.0 eth0
route add default gw 202.114.6.25 eth0
touch /var/lock/subsys/local
(存檔關掉)

成功!!

arrow
arrow
    全站熱搜

    LittleChoCho 發表在 痞客邦 留言(0) 人氣()