How to install the Realtek wireless network card driver in CentOS 6.5

  • 2020-05-12 06:40:15
  • OfStack

1. Preparation before installation

[a] check the installation of the wireless card driver (check by looking at the installation of the network interface)

Enter under the virtual terminal:


#> iwconfig

If the following information is displayed, it means that the wireless network card driver is not installed


lo no wireless extensions. #  Local loop interface  eth0 no wireless extensions. #  Ethernet interface 

If the following information is displayed, it means that it has been installed


lo no wireless extension. eth0 no wireless extension. wlan0 Nickname: Mode:Managed Frequency=2.462 GHz Access Point: 8C:21:0A:57:C8:CA Bit Rate=300 Mb/s Retry:on RTS thr:off Fragment thr:off Power Management period:0us mode:All packets received Link Quality=100/100 Signal level=-48 dBm Noise level=-120 dBm Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0 Tx excessive retries:0 Invalid misc:0 Missed beacon:0

[b] query the wireless card chip information

Enter under the virtual terminal:


#> lspci | grep -i network

You can get the information of the wireless card chip. Mine is RTL8191SEvB

Note: if input lspci | grep -i eth , to get the Ethernet network card information

[c] query the kernel version

Enter under the virtual terminal:


#> uname -r

The kernel information is available. Mine is 2.6.32-431.el6.x86_64

After getting the above information, we can go to the official website to download the driver!

2. Install the driver

After decompression drive, execute make && make install Will feedback" make: *** /lib/modules/2.6.32-431.el6.x86_64/build:没有那个文件或目录 ", but to ls /lib/modules/2.6.32-431.el6.x86_64/ But what happened when build was found to exist? through ls -l /lib/modules/2.6.32-431.el6.x86_64/ Find that build is a symbolic link and points to it /usr/src/kernels/2.6.32-358.el6.x86_64 , but the directory is not currently available, so the installation failed.

Solution: execute yum install kernel-headers kernel-devel gcc* , and execute after the installation is complete make clean and make && make install After that, restart the system.

After rebooting, you will find that the wireless network card has been started, but you can't find any hot spots. At this point, restart it again!

3. The configuration DNS

At this time, the driver has been done, but still can not go online, ping1 under baidu did not return ip, that must be the problem of DNS. perform sudo vim /etc/resolv.conf , just add nameserver.

4. Introduction of relevant knowledge

1. lo (loopback interface) :

As a virtual network interface, a system or application program is created without driver control for sending and receiving packets within the system. (system interprocess communication)

2. linux-headers: development header file for linux

3. linux-devel: contains the header file, link library and configuration file of linux, etc. Since the wireless card driver calls some functions of the kernel, linux-devel is needed when compiling the wireless card driver (make && make install)

conclusion
Finally can surf the Internet, after the study is convenient 1 point. Or you might wonder, how did you download it before? When the phone ACTS as a wireless receiver, the usb can connect directly to the Internet. When you execute iwconfig, you will see the network interface of usb0.


Related articles: