免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 2809 | 回复: 11
打印 上一主题 下一主题

[网络配置] RHEL5网卡驱动安装老出错,肿么回事,求回复,大虾们 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2012-07-30 17:54 |只看该作者 |倒序浏览
求支招,大虾们:
   我的网卡型号是RTL8111/8168B。我从瑞昱官网下载了r8168-8.031.00.tar.bz2的驱动包

  步骤如下:
   uname -r         
    2.6.18-8.el5
    rpm -qa|grep kernel
   kernel-headers-2.6.18-8.el5
   kernel-2.6.18-8.el5
   rpm -qa|grep gcc
   libgcc-4.1.1-52.el5
   接下来就是挂载U盘,将驱动包cp到/usr/tmp,然后解压
  tar -jxvf r8168-8.031.00.tar.bz2
   cd r8168-8.031.00
   cd src
   可是当执行make时出现错误,停止
  make -C /lib/modules/uname-r/build  SUBDIRS=/var/tmp/r8168-8.031.00/src  clean

  make: *** /lib/modules/2.6.18-8.el5/build:没有那个目录或文件。停止

  make: *** [clean]  错误2

我刚学linux,求大虾指点

论坛徽章:
0
2 [报告]
发表于 2012-07-30 18:17 |只看该作者
是不是少了個目錄?

论坛徽章:
20
CU大牛徽章
日期:2013-03-13 15:29:072015亚冠之阿尔希拉尔
日期:2015-09-12 09:33:562015年亚冠纪念徽章
日期:2015-09-22 17:12:202015亚冠之本尤德科
日期:2015-10-29 16:18:18神斗士
日期:2015-11-23 13:37:23青铜圣斗士
日期:2015-12-07 10:14:28平安夜徽章
日期:2015-12-26 00:06:3015-16赛季CBA联赛之佛山
日期:2016-01-18 08:59:06shanzhi
日期:2016-06-17 17:59:3115-16赛季CBA联赛之同曦
日期:2016-11-03 14:43:552015七夕节徽章
日期:2015-08-21 11:06:17丑牛
日期:2014-12-30 16:06:17
3 [报告]
发表于 2012-07-30 19:04 |只看该作者
需要进src目录吗


有README 安装说明,可以先看下对照操作。

论坛徽章:
0
4 [报告]
发表于 2012-07-31 09:35 |只看该作者
本帖最后由 zjhxmjl 于 2012-07-31 09:37 编辑
chenj2012 发表于 2012-07-30 17:54
求支招,大虾们:
   我的网卡型号是RTL8111/8168B。我从瑞昱官网下载了r8168-8.031.00.tar.bz2的驱动包
...

解压并运行(前提chmod +x)我提供给你的script,将信息贴上来
  1. getinfo.sh network
复制代码

getinfo.sh.zip

2.09 KB, 下载次数: 7

论坛徽章:
13
15-16赛季CBA联赛之同曦
日期:2016-01-28 19:52:032015亚冠之北京国安
日期:2015-10-07 14:28:19NBA常规赛纪念章
日期:2015-05-04 22:32:03处女座
日期:2015-01-15 19:45:44卯兔
日期:2014-10-28 16:17:14白羊座
日期:2014-05-24 15:10:46寅虎
日期:2014-05-10 09:50:35白羊座
日期:2014-03-12 20:52:17午马
日期:2014-03-01 08:37:27射手座
日期:2014-02-19 19:26:54子鼠
日期:2013-11-30 09:03:56狮子座
日期:2013-09-08 08:37:52
5 [报告]
发表于 2012-07-31 09:52 |只看该作者
驱动包如下:
r8168-8.031.00.tar.bz2 (66.43 KB, 下载次数: 16)
下载地址:
http://www.realtek.com.tw/DOWNLO ... amp;GetDown=false#2

  1. > tar -jxvf r8168-8.031.00.tar.bz2
  2. x r8168-8.031.00/
  3. x r8168-8.031.00/src/
  4. x r8168-8.031.00/src/r8168_n.c
  5. x r8168-8.031.00/src/rtl_eeprom.h
  6. x r8168-8.031.00/src/Makefile_linux24x
  7. x r8168-8.031.00/src/r8168_asf.h
  8. x r8168-8.031.00/src/rtl_eeprom.c
  9. x r8168-8.031.00/src/rtltool.c
  10. x r8168-8.031.00/src/r8168.h
  11. x r8168-8.031.00/src/Makefile
  12. x r8168-8.031.00/src/r8168_asf.c
  13. x r8168-8.031.00/src/rtltool.h
  14. x r8168-8.031.00/Makefile
  15. x r8168-8.031.00/autorun.sh
  16. x r8168-8.031.00/README
  17. > cd r8168-8.031.00
  18. > ls
  19. Makefile        README                autorun.sh        src
  20. > more README
  21. <Requirements>

  22.         - Kernel source tree (supported Linux kernel 2.6.x and 2.4.x)
  23.         - For linux kernel 2.4.x, this driver supports 2.4.20 and latter.
  24.         - Compiler/binutils for kernel compilation

  25. <Quick install with proper kernel settings>
  26.         Unpack the tarball :
  27.                 # tar vjxf r8168-8.aaa.bb.tar.bz2

  28.         Change to the directory:
  29.                 # cd r8168-8.aaa.bb

  30.         If you are running the target kernel, then you should be able to do :

  31.                 # ./autorun.sh  (as root or with sudo)

  32.         You can check whether the driver is loaded by using following commands.

  33.                 # lsmod | grep r8168
  34.                 # ifconfig -a

  35.         If there is a device name, ethX, shown on the monitor, the linux
  36.         driver is loaded. Then, you can use the following command to activate
  37.         the ethX.

  38.                 # ifconfig ethX up

  39.                 ,where X=0,1,2,...

  40. <Set the network related information>
  41.         1. Set manually
  42.                 a. Set the IP address of your machine.

  43.                         # ifconfig ethX "the IP address of your machine"

  44.                 b. Set the IP address of DNS.

  45.                    Insert the following configuration in /etc/resolv.conf.
  46.                
  47.                         nameserver "the IP address of DNS"

  48.                 c. Set the IP address of gateway.

  49.                         # route add default gw "the IP address of gateway"

  50.         2. Set by doing configurations in /etc/sysconfig/network-scripts
  51.            /ifcfg-ethX for Redhat and Fedora, or /etc/sysconfig/network
  52.            /ifcfg-ethX for SuSE. There are two examples to set network
  53.            configurations.

  54.                 a. Fixed IP address:
  55.                         DEVICE=eth0
  56.                         BOOTPROTO=static
  57.                         ONBOOT=yes
  58.                         TYPE=ethernet
  59.                         NETMASK=255.255.255.0
  60.                         IPADDR=192.168.1.1
  61.                         GATEWAY=192.168.1.254
  62.                         BROADCAST=192.168.1.255

  63.                 b. DHCP:
  64.                         DEVICE=eth0
  65.                         BOOTPROTO=dhcp
  66.                         ONBOOT=yes      

  67. <Modify the MAC address>
  68.         There are two ways to modify the MAC address of the NIC.
  69.         1. Use ifconfig:

  70.                 # ifconfig ethX hw ether YY:YY:YY:YY:YY:YY

  71.            ,where X is the device number assigned by Linux kernel, and
  72.                   YY:YY:YY:YY:YY:YY is the MAC address assigned by the user.

  73.         2. Use ip:

  74.                 # ip link set ethX address YY:YY:YY:YY:YY:YY

  75.            ,where X is the device number assigned by Linux kernel, and
  76.                   YY:YY:YY:YY:YY:YY is the MAC address assigned by the user.


复制代码

论坛徽章:
0
6 [报告]
发表于 2012-07-31 10:43 |只看该作者
@gbcbooks 呵呵,每次都在那卡住了,不知如何是好啊。

论坛徽章:
0
7 [报告]
发表于 2012-07-31 11:01 |只看该作者
回复 4# zjhxmjl


    谢谢!!!!!!!
  
  不过我还是不知道如何下手做,能具体点吗?呵呵,先谢谢了!!!!!!!!

论坛徽章:
0
8 [报告]
发表于 2012-07-31 11:04 |只看该作者
回复 3# yun_88


    谢谢,不过还是没搞定,错不知道在哪,纠结

论坛徽章:
21
白羊座
日期:2013-08-23 15:49:17金牛座
日期:2013-10-08 17:00:03处女座
日期:2013-10-12 11:54:11CU十二周年纪念徽章
日期:2013-10-24 15:41:34午马
日期:2013-11-27 14:07:21巨蟹座
日期:2013-12-04 10:56:03水瓶座
日期:2013-12-04 15:58:00亥猪
日期:2014-05-24 16:02:3115-16赛季CBA联赛之辽宁
日期:2016-11-07 13:52:53戌狗
日期:2013-08-23 16:15:31白羊座
日期:2013-08-24 21:59:24巨蟹座
日期:2013-08-25 16:34:24
9 [报告]
发表于 2012-07-31 11:08 |只看该作者
README  说的很清楚啊。

论坛徽章:
0
10 [报告]
发表于 2012-07-31 11:50 |只看该作者
    还是没搞定啊,不知道是不是内核包没有装全
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP