One. General idea of network card driver installation
1. First from the hardware installation, check the NIC itself failure
2. Check the NIC chip model (note that it is not a hardware brand)
3. Check if the system contains the corresponding model of the NIC driver
4. Check that the NIC driver is loaded
Lsmod command to view the module information loaded by the current system
If the NIC is not loaded, use the [modprobe module file] command to load
650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M00/99/89/wKioL1lJQ7OQPaF5AAF9rVJK_Tw675.png "title=" screen shot 2017-06-19 23.49.38.png "alt=" Wkiol1ljq7oqpaf5aaf9rvjk_tw675.png "/>
insmod/rmmod [option] Module name or module file load/unload system module, similar to Modprobe function
depmod [Options] Module name: Analyzing the dependencies of loading modules
650) this.width=650; "src=" Https://s5.51cto.com/wyfs02/M01/99/89/wKiom1lJQ8yAjA_xAADxKUsLPco576.png "title=" screen shot 2017-06-19 23.52.34.png "alt=" Wkiom1ljq8yaja_xaadxkuslpco576.png "/>
Two. Compiling and installing the NIC
Mode one: Rpm/source RPM driver package installation (with IBM X3650 server Broadcom NetXtreme II network adapter as an example)
Download the corresponding Server model network card driver from the IBM official website, use USB stick and other tools to upload to Linux server, then compile
RPM-IVH bnx2-<version>.src.rpm
Cd/root/rpmbuild
RPMBUILD-BB Specs/bnx2.spec
Install the compiled driver package
Cd/root/rpmbuild/rpms/x86_64
RPM-IVH bnx2-<version>.x86_64.rpm
After successful installation, the following path will be displayed:/lib/modules/<kernel_version>/extra/bnx2.ko
Copy the generated module files to the directory:/lib/modules/<kernel_version>/kernel/drivers/net
Load Driver
Insmod\
Or: Modprobe bnx2
See if the NIC driver module is loaded
Lsmod | grep bnx2 If the Bnx2 module is included in the command output, indicating that the NIC driver was successfully compiled
Activate the network card to see the network card status
Ifconfig eth0 up (NIC device name, eth0 for example)
Ifconfig-a
Mode two: Source code driver package installation method (Take Realtek rtl8168/8111 Nic as an example)
Download the source code package from the Realtek website, then the Linux system, create a directory, extract the source code package into this directory.
Mkdir/temp
Cd/temp
Tar jxvf r8168-8.aaa.bb.tar.bz2
Compile and install the source code
CD R8168.AAA.BB
Make clean modules
Make install
depmod-a//checking the dependencies between modules
Insmod./src/r8168.ko//Loading r8168 Module
Lsmod | grep r8168//Check whether the 8168 module is loaded
Installation of Linux network card drivers