Solution to installation of CentOS Wired connection failure in AR8161
If your computer is installed with CentOS and you cannot use any lines of Special Products in Nanjing to access the Internet, run the following command:
lspci|
grep
-ieth
Result displayed on my terminal: 02: 00.0 Ethernet controller: Qualcomm Atheros AR8161 Gigabit Ethernet (rev 08)
Run the following command:
ifconfg
The connection displayed on the terminal does not contain eth0 or ethx (x represents 1 ~......) ,
If your computer terminal displays a similar appeal, you don't have to worry about it. This is because the NIC driver is not installed. Well, let me share my solution:
Note: The NIC of my computer is Atheros AR8161. Maybe your computer is not. Please download the driver related to you, but the installation methods are similar!
I am here to install the Atheros AR8161
Tools/Raw Materials
Required tools: Nic drivers related to your computer
Method/step
1. Download The Atheros AR8161 driver. The URL below is
Http://pan.baidu.com/s/1gd3hNvd
After the download, extract, decompress the Directory: alx-linux-v2.0.0.6
2. gcc is not installed in CentOS by default. You can execute gcc
If the terminal displays:
bash
:gcc:commannotfound
So it indicates that your computer has not installed gcc. At this time, execute the following command to install gcc
Run the following command:
yum
install
gcc
Wait until the gcc installation is complete.
3. Install kernel-headers and kernel-devel:
Run the following command on the terminal:
yum
install
kernel-headers-$(
uname
-r)kernel-devel-$(
uname
-r)-y
4. Switch the path to the unzipped file under the terminal, that is, switch the path to the folder alx-linux-v2.0.0.6.
Run cd./src/
Run the following command:
make
In this case, an alx. ko file is generated in the src folder.
Run the following command:
mkdir
/lib/modules/2
.6.32-358.6.2.el6.x86_64
/kernel/net/wired
You do not need to press the "complete" button. You only need to find your own kernel directory. This step only creates a wired directory. Therefore, you can use the "TAB" key to complete the configuration, it is important to find your own directory.
5. Copy alx. ko to the folder created in the previous step.
Run the following command:
vi
/lib/modules/2
.6.32-358.6.2.el6.x86_64
/modules
.networking
You don't have to press the "complete" button. You only need to find your own kernel directory. It is very important to find your own directory.
Add alx. ko to the first line of modules. networking.
6. Run the following command:
vi
/etc/sysconfig/modules/alx
.modules
Add the following content to alx. modules:
#!/bin/sh
if
[!-c
/dev/input/alx
.ko];
then
exec
/sbin/modprobe
alx>
/dev/null
2>&1
fi
CentOS Wired connection failure solution AR8161 Installation
CentOS Wired connection failure solution AR8161 Installation
7. Execute other commands:
First, run the following command:
depmod-a
Run the following command:
modprobealx
Now, the NIC driver installation is complete. Check whether your network is connected. What if my network is connected? ^_^
CentOS Wired connection failure solution AR8161 Installation