Bought a wireless card, model tl-wn823n, who knows there is no driver under CentOS
So I started the long journey of wireless internet.
Went through countless pits, solved one problem after another.
At the end of the ping, the sense of accomplishment was bursting.
The structure of the article is as follows:
1. Install kernel tool: Kernel-devel
2. Search network card model, install network card driver
3. Download the network tool and connect to the wireless network
1. Install Kernel Tools
Package required before loading: KERNEL-DEVEL,GCC
At first, I first installed the driver, found that the compilation is not, a reading the wrong information, said to be/usr/scr/kernel inside no corresponding file kernel file
So check the data, all involved in driver programming, will need to use the kernel header file
Get kernel header file requires Kernel-devel Toolkit
(To modify the kernel file, you need the kernel source code, kernel source, light kernel-devel is not enough)
To get the toolkit with the Yum command, be aware that you do not need to specify the corresponding version under CentOS6, CentOS7, yum will automatically install the appropriate version
Centos6:yum Install Kernel-devel
Centos7:yum Install Kernel-devel
(Some tutorials say you also need to install kernel-headers, in fact, Kernel-devel already contains kernel-headers)
2. Search network card model, install network card driver
NIC Model detection
After inserting the network card, enter the command:
Lsusb
A series of messages will appear, including:
Bus 001 Device 004:id 0bda:818b Realtek Semiconductor Corp.
is the wireless card information (ID will be different)
Record "0bda:818b"
Search for the appropriate driver on the network, keyword "ID 0bda:818b", "Chipset model"
Installing the NIC Driver
Nic driver is a xx.tar.gz compressed package after download
TAR-ZXVF xx.tar.gz, enter the directory and run its script
With the tools configured earlier, this step will compile, install
3. Download the network tool, connect the wireless network
Detect if the driver installation was successful
After the network card is installed, it is generally possible to operate the network via graphical interface.
But my side of the graphical interface is always unable to operate, so only manual internet access
Enter the command first to detect if the wireless card driver is installed:
Iwconfig
If you print out the network card, and the corresponding information, and instructions to complete the installation
Install wireless network operation appropriate Toolkit
Yum Install Wireless-tools
Yum Install Wpa_supplicant
Create a network configuration file, if you do not have a directory, create your own
Wpa_passphrase wifi-name wifi-pwd >>/etc/wpa_supplicant/wpa_supplicant.conf
Enable command
Wpa_supplicant-b-D wext-i wlan0-c/etc/wpa_supplicant/wpa_supplicant.conf
-B Background Run
-D mode selection, here to select the Universal
-I Network Name
-C Configuration File location
An error may occur when the command is enabled: IOCTL Siocsiwap operation not permitted wpa_supplicant
Don't worry about him, go ahead, enter Iwconfig, check if connected, if connected, continue
To obtain an IP address with DHCP:
Command dhclient wlan0 Get IP address
Wlan0 as the NIC noun
You can connect to the Internet right now.
Wireless network configuration, reference: http://www.cnblogs.com/wise-man/archive/2012/07/23/2604023.html
If you want the boot to start automatically
Add in/etc/rc.d/rc.local:
echo "Password" | sudo wpa_supplicant-b-d wext-i wlan0-c /etc/wpa_supplicant/wpa_supplicant.conf
echo "Password" | sudo dhclient wlan0
CentOS7, install NIC driver, command line manual connection WiFi Guide