Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What if CentOS can't surf the Internet with cable?

2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains "what to do if CentOS cannot surf the Internet with cable". The content of the explanation in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "what to do if CentOS cannot access the Internet with cable".

If your computer cannot access the Internet with a cable after installing CentOS, execute this command: lspci | grep-I eth. My terminal displays the result: 02grep 00.0 Ethernet controller: Qualcomm Atheros AR8161 Gigabit Ethernet (rev 08), followed by another command: ifconfg, the terminal displays no eth0 or ethx (x stands for 1 ~ …...) If your computer terminal shows a similar situation of appeal, then don't worry, this is the network card driver is not installed, well, then let me share my solution.

Note: the network card of my computer is Atheros AR8161, maybe your computer is not this, so please download the driver related to you, but the installation methods are more or less the same! I am here to install Atheros AR8161.

1. Download the Atheros AR8161 driver. After downloading, decompress and decompress to get the directory: alx-linux-v2.0.0.6

2. CentOS does not have gcc installed by default. You can execute gcc.

If the terminal displays: bash: gcc: comman not found

Then your computer does not have gcc installed. Execute the following command to install gcc.

Execute command: yum install gcc

Wait for the gcc installation to complete.

3. Install kernel-headers and kernel-devel:

Execute the following command on the terminal:

Yum install kernel-headers-$ (uname-r) kernel-devel-$ (uname-r)-y

4. Switch the path under the terminal to the file you just extracted, and then switch the path to the folder alx-linux-v2.0.0.6.

Then execute the command: cd. / src/

Then execute the command: make now produces an alx.ko file in the src folder

Then execute the command: mkdir / lib/modules/2.6.32-358.6.2.el6.x86_64/kernel/net/wired do not need to type all, use the TAB key to complete, just find your own kernel directory, this step is just to create a wired directory, so using the TAB key to complete, find your own corresponding directory is very important

5. Copy alx.ko to the folder created in the previous step

Then execute the command: vi / lib/modules/2.6.32-358.6.2.el6.x86_64/modules.networking do not need to type all, use the TAB key to complete, as long as find their own kernel directory, find their corresponding directory is very important.

Add alx.ko in the first line of modules.networking, as shown below:

6. Execute the command: vi / etc/sysconfig/modules/alx.modules

Add the following to alx.modules:

#! / bin/sh

If [!-c / dev/input/alx.ko]; then

Exec / sbin/modprobe alx > / dev/null 2 > & 1

Fi

7. Finally, execute other orders:

First execute the command: depmod-a

Then execute the command: modprobe alx

Well, at this point, the installation of the network card driver is complete. Let's see if your network is connected. Anyway, mine is connected.

Thank you for your reading, the above is the content of "what to do if CentOS cannot access the Internet with cable". After the study of this article, I believe you have a deeper understanding of how CentOS can not access the Internet with cable, and the specific use still needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report