标签:centos安装雷凌rt5370无线网卡驱动 rt5370网卡驱动安装
1、挂载光盘安装USB查看工具lsusb
[root@Centos-86 ~]# mkdir /mnt/cdrom
[root@Centos-86 ~]# mount /dev/cdrom /mnt/cdrom
mount: block device /dev/sr0 is write-protected, mounting read-only
或者接光驱后直接进入到光盘
[root@Centos-86 ~]# cd /media/CentOS_6.2_Final/
CentOS_BuildTag RELEASE-NOTES-en-US.html
.discinfo repodata/
EFI/ RPM-GPG-KEY-CentOS-6
EULA RPM-GPG-KEY-CentOS-Debug-6
GPL RPM-GPG-KEY-CentOS-Security-6
images/ RPM-GPG-KEY-CentOS-Testing-6
isolinux/ TRANS.TBL
Packages/ .treeinfo
然后进入/media/cdrom/Packages这个目录
[root@CentOS ~]# cd /media/cdrom/Packages/
光盘的RPM包都在这里,在这里
用ll |grep usb查询与usb相关的RPM包
[root@Centos-86 ~]# cd /media/CentOS_6.2_Final/Packages/
[root@Centos-86 Packages]# ll | grep usb
-rw-r--r-- 2 root root 91160 7月 3 2011 libertas-usb8388-firmware-5.110.22.p23-3.1.el6.noarch.rpm
-rw-r--r-- 5 root root 27992 7月 3 2011 libusb-0.1.12-23.el6.i686.rpm
-rw-r--r-- 3 root root 28268 7月 3 2011 libusb-0.1.12-23.el6.x86_64.rpm
-rw-r--r-- 4 root root 55228 7月 3 2011 libusb1-1.0.3-1.el6.i686.rpm
-rw-r--r-- 2 root root 55388 7月 3 2011 libusb1-1.0.3-1.el6.x86_64.rpm
-rw-r--r-- 4 root root 77956 7月 3 2011 libusb-devel-0.1.12-23.el6.i686.rpm
-rw-r--r-- 2 root root 77960 7月 3 2011 libusb-devel-0.1.12-23.el6.x86_64.rpm
-rw-r--r-- 2 root root 7104 7月 3 2011 rt73usb-firmware-1.8-7.el6.noarch.rpm
-rw-r--r-- 4 root root 59784 7月 3 2011 usbmuxd-1.0.2-1.el6.i686.rpm
-rw-r--r-- 2 root root 60472 7月 3 2011 usbmuxd-1.0.2-1.el6.x86_64.rpm
-rw-r--r-- 2 root root 73000 12月 9 2011 usbutils-003-4.el6.x86_64.rpm
-rw-r--r-- 2 root root 41324 12月 9 2011 xorg-x11-drv-sisusb-0.9.4-1.el6.x86_64.rpm
[root@Centos-86 Packages]# rpm -qlp usbutils-003-4.el6.x86_64.rpm
/usr/bin/lsusb
/usr/bin/lsusb.py
/usr/bin/usb-devices
/usr/bin/usbhid-dump
/usr/sbin/lsusb
/usr/share/doc/usbutils-003
/usr/share/doc/usbutils-003/AUTHORS
/usr/share/doc/usbutils-003/COPYING
/usr/share/doc/usbutils-003/ChangeLog
/usr/share/doc/usbutils-003/NEWS
/usr/share/doc/usbutils-003/README
/usr/share/man/man1/usb-devices.1.gz
/usr/share/man/man8/lsusb.8.gz
/usr/share/pkgconfig/usbutils.pc
[root@Centos-86 Packages]#
这里如果不能安装的话就用yum安装
装完后查看我们的usb设备
[root@Centos-86 Packages]# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 003: ID 148f:5370 Ralink Technology, Corp. RT5370 Wireless Adapter
Bus 002 Device 005: ID 0e8d:1806 MediaTek Inc.
可以看到Ralink雷凌无线网卡RT5370
2、无线网卡下载地址
http://forum.ubuntu.org.cn/download/file.php?id=156484
解压
[root@Centos-86 mysoft]# tar jxvf 2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO.bz2
重命名为5370
[root@Centos-86 mysoft]# mv 2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO 5370
[root@Centos-86 wireless]# mv /home/mysoft/5370/ /usr/local/src/5370
[root@Centos-86 wireless]# cd /usr/local/src/5370/
[root@Centos-86 5370]# ls
5370
[root@Centos-86 5370]# cd 5370
你会发现这是一个源文件而且没有configure配置工具
但是这里直接有makefile文件
直接make
直接make会报错
你会发现不能安装,这是因为没有开发环境
[root@CentOS rtl]# yum grouplist|less
安装开发工具
[root@Centos-86 5370]# yum groupinstall "Development tools" -y
3、安装RT5370驱动
make的时候还是出现了如下错误:
make[1]: Entering directory `/usr/local/src/STA/tools‘
gcc -g bin2h.c -o bin2h
make[1]: Leaving directory `/usr/local/src/STA/tools‘
/usr/local/src/STA/tools/bin2h
cp -f os/linux/Makefile.6 /usr/local/src/STA/os/linux/Makefile
make -C /lib/modules/2.6.32-220.el6.x86_64/build SUBDIRS=/usr/local/src/STA/os/linux modules
make: *** /lib/modules/2.6.32-220.el6.x86_64/build: 没有那个文件或目录。 停止。
make: *** [LINUX] 错误 2
什么原因呢:
解压驱动后,执行 make && make install 会反馈“make: *** /lib/modules/2.6.32-220.el6.x86_64/build: 没有那个文件或目录。 停止。”,但到 ls /lib/modules/22.6.32-220.el6.x86_64 却发现存在build,那到底是发生什么事呢?通过 ls -l /lib/modules/2.6.32-220.el6.x86_64/ 发现build是一个符号链接并指向/usr/src/kernels/2.6.32-220.el6.x86_64,但当前并没有该目录,因此使安装失败。 而/usr/src/kernels/中因为更新(yum install kernel-headers kernel-devel gcc*)等原因是/usr/src/kernels/2.6.32-504.23.4.el6.x86_64/
备注:由于内核的不同可能你这里的小版本号和我这里的不一样,比如不是220或者504
问题找到了,怎么解决呢?网上说安装什么kernel-headers kernel-devel gcc等,或者ln -s建立软连接,都没有用
我的办法:进入没有/usr/src/kernels/2.6.32-220.el6.x86_64那么就建立一个这样的目录,将/usr/src/kernels/2.6.32-504.23.4.el6.x86_64/内容复制到/usr/src/kernels/2.6.32-220.el6.x86_64中
[root@Centos-86 2.6.32-220.el6.x86_64]# cd /usr/src/
[root@Centos-86 src]# ls
debug kernels
[root@Centos-86 src]# cd kernels/
[root@Centos-86 kernels]# ls
2.6.32-504.23.4.el6.x86_64
[root@Centos-86 kernels]# cp 2.6.32-504.23.4.el6.x86_64/ 2.6.32-220.el6.x86_64/
cp: 略过目录"2.6.32-504.23.4.el6.x86_64/"
[root@Centos-86 kernels]# mkdir 2.6.32-220.el6.x86_64
[root@Centos-86 kernels]# cp -rf 2.6.32-504.23.4.el6.x86_64/* 2.6.32-220.el6.x86_64/
[root@Centos-86 kernels]# cd 2.6.32-220.el6.x86_64/
再到驱动解压目录下执行
make clean
make && make install
重启系统就好了
重启可以了
[root@Centos-86 ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 38:83:45:F2:17:ED
inet addr:192.168.4.99 Bcast:192.168.4.255 Mask:255.255.255.0
inet6 addr: fe80::3a83:45ff:fef2:17ed/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4444 errors:0 dropped:0 overruns:0 frame:0
TX packets:347 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:387267 (378.1 KiB) TX bytes:34166 (33.3 KiB)
Interrupt:17 Base address:0xe000
eth1 Link encap:Ethernet HWaddr 90:2B:34:70:B5:4C
inet addr:192.168.50.109 Bcast:192.168.50.255 Mask:255.255.255.0
inet6 addr: fe80::922b:34ff:fe70:b54c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:26 errors:0 dropped:0 overruns:0 frame:0
TX packets:73 errors:0 dropped:0 overruns:0 carrier:1
collisions:0 txqueuelen:1000
RX bytes:11511 (11.2 KiB) TX bytes:8184 (7.9 KiB)
Interrupt:30
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:12 errors:0 dropped:0 overruns:0 frame:0
TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:672 (672.0 b) TX bytes:672 (672.0 b)
ra0 Link encap:Ethernet HWaddr 00:0F:60:00:B0:4E
inet6 addr: fe80::20f:60ff:fe00:b04e/64 Scope:Link
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1539625 (1.4 MiB) TX bytes:112138 (109.5 KiB)
[root@Centos-86 ~]# iwconfig
lo no wireless extensions.
ra0 Ralink STA ESSID:"11n-AP" Nickname:"RT2870STA"
Mode:Auto Frequency=2.412 GHz Access Point: Not-Associated
Bit Rate:1 Mb/s
RTS thr:off Fragment thr:off
Encryption key:off
Link Quality=100/100 Signal level:-39 dBm Noise level:-39 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
eth0 no wireless extensions.
eth1 no wireless extensions.
4、安装iwconfig工具
加载光盘
#cd /media/cdrom/Packages/
#ll |grep -i wireless
-r--r--r--. 2 root root 94584 Jul 3 2011 wireless-tools-29-5.1.1.el6.i686.rpm
-r--r--r--. 2 root root 95848 Jul 3 2011 wireless-tools-29-5.1.1.el6.x86_64.rpm
#yum install wireless -y
参考文档:
1、 CentOS 下wireless搭建
http://www.iyunv.com/thread-17798-1-1.html
2、CentOS6.5菜鸟之旅:安装Realtek无线网卡驱动
http://www.cnblogs.com/fsjohnhuang/p/3903091.html
3、CentOS 6.5 安装无线网卡驱动
http://blog.sina.com.cn/s/blog_49d6d41c0101i0xi.html
本文出自 “飞翔的猪” 博客,请务必保留此出处http://thinkpig007.blog.51cto.com/971471/1672060
CentOS安装雷凌RT5370 Wireless Adapter无线网卡驱动
标签:centos安装雷凌rt5370无线网卡驱动 rt5370网卡驱动安装
原文地址:http://thinkpig007.blog.51cto.com/971471/1672060