»úÆ÷̫У¬ÒÔÖÁÓÚÏÖÓеÄLinux°æ±¾ÎÞ·¨Èϳö£¬±ÈÈç»úÆ÷ÕÒ²»µ½Íø¿¨£¬ÕâʱºòÔõô°ìÄØ£¿
±ð¼±£¬Ê×ÏÈÄãÐèÒªÖªµÀÍø¿¨ÊÇʲôÐͺŵģ¬ÒÔ±¾ÊµÑéÊÒйºÈëµÄµçÄÔΪÀý£¬ËüµÄÍø¿¨ÊǼ¯³ÉµÄ£¬ÐͺÅÊÇRealtek RTL8168/8111 PCI-E Gigabit Ethernet NIC¡£È»ºóÎÒÃǵ½RealtekµÄ¹Ù·½ÍøÕ¾È¥ÏÂÔØÏàÓ¦µÄLinuxÇý¶¯³ÌÐòr8168-8.005.00.tar.bz2£¬°´ÕÕ˵Ã÷°²×°¡£
Unpack the tarball :
# tar vjxf r8168-8.aaa.bb.tar.bz2
Change to the directory:
# cd r8168-8.aaa.bb
If you are running the target kernel, then you should be able to do :
# make clean modules (as root or with sudo)
# make install
# /sbin/depmod -a
# /sbin/insmod ./src/r8168.ko (or r8168.o in linux kernel 2.4.x)
You can check whether the driver is loaded by using following commands.
# /sbin/lsmod | grep r8168(¿´¿´ÓÐûÓмÓÔØÍø¿¨Çý¶¯)
# /sbin/ifconfig -a(¿´¿´ÓÐûÓÐÏà¹ØÍø¿¨±»Æô¶¯µÄÐÅÏ¢)
If there is a device name, ethX, shown on the monitor, the linux
driver is loaded. Then, you can use the following command to activate
the ethX.
# ifconfig ethX up
,where X=0,1,2,...
1. Set manually
a. Set the IP address of your machine.
# ifconfig ethX "the IP address of your machine"
b. Set the IP address of DNS.
Insert the following configuration in /etc/resolv.conf.
nameserver "the IP address of DNS"
c. Set the IP address of gateway.
# route add default gw "the IP address of gateway"
2. Set by doing configurations in /etc/sysconfig/network-scripts
/ifcfg-ethX for Redhat and Fedora, or /etc/sysconfig/network
/ifcfg-ethX for SuSE. There are two examples to set network
configurations.
a. Fix IP address:
DEVICE=eth0
BOOTPROTO=static
ONBOOT=yes
TYPE=ethernet
NETMASK=255.255.255.0
IPADDR=192.168.1.1
GATEWAY=192.168.1.254
BROADCAST=192.168.1.255
2. Ð޸ģº££vi /etc/hosts£¬ÔÚ¸ÃÎı¾ÖУ¬Ôö¼ÓÁ½ÐУº
127.0.0.1 localhost.localdomain localhost
192.168.4.101 node3£¨¸ù¾Ý»úÆ÷±¾ÉíÇé¿öÉèÖã©
Ð޸ģºvi /etc/hosts.equiv£¬Ôö¼ÓÒ»ÐУº(Èç¹ûûÓиÃÎı¾£¬¿É½¨Á¢Ò»¸ö)
node3
3. Æô¶¯ssh·þÎñ
´ó²¿·ÖµÄLinux°æ±¾Ó¦¸Ã¶¼»á×Ô´ø¸Ã³ÌÐò
££ssh-keygen
££cd .ssh
££cp id_rsa.pub authorized_keys
££ssh node3£¨Èç¹û³É¹¦£¬»áÏÔʾÉϴεǽµÄʱ¼ä£¬ node3ÊÇÖ÷»úÃû£©
¸½¼ÓÐÅÏ¢£º
ifup eth0¿´¿´ÄÜ·ñÆô¶¯eth0
lsmod¿´¿´ÓÐûÓмÓÔØÍø¿¨Çý¶¯
dmesg¿´¿´ÓÐûÓÐÍø¿¨Æô¶¯Ê±µÄ´íÎóÐÅÏ¢