note: CentOS 7.9 安裝網路卡驅動程式 intel e1000

2021100815:53


先更新系統、安裝相關程式:

yum install gcc make kernel-devel -y

yum update -y


下載 intelnet 官方的驅動程式
相關網頁:
https://www.intel.com.tw/content/www/tw/zh/download/14611/intel-network-adapter-driver-for-pcie-intel-gigabit-ethernet-network-connections-under-linux.html

cd /tmp
wget https://downloadmirror.intel.com/15817/eng/e1000e-3.8.4.tar.gz

zcat e1000e-3.8.4.tar.gz |tar xfv -
cd e1000e-3.8.4/src 
make
make src


 

make src 若出現錯誤訊息:
common.mk:85: *** Kernel header files not in any of the expected locations.
common.mk:86: *** Install the appropriate kernel development package, e.g.
common.mk:87: *** kernel-devel, for building kernel modules and try again.  Stop.

$ cd /usr/src 
$ ln -s /usr/src/kernels/3.10.0-1160.45.1.el7.x86_64 linux

  * 3.10.0-1160.45.1.el7.x86_64 是剛剛安裝的 linux 核心原始檔案目錄

然後再 make install 一次
$ make install


免重開機,直接啟用驅動程式:

$ modinfo e1000e


檢查驅動程式版本:

$ modinfo e1000e
filename:       /lib/modules/3.10.0-1160.45.1.el7.x86_64/updates/drivers/net/ethernet/intel/e1000e/e1000e.ko
version:        3.8.4-NAPI
license:        GPL
description:    Intel(R) PRO/1000 Network Driver
author:         Intel Corporation, <[email protected]>
  :: ::  ::

a