Wireless-AC 8265 & CentOS7 無線網卡驅動安裝


Wireless-AC 8265 & CentOS7 無線網卡驅動安裝

環境說明:

  • 系統 CentOS7
  • 內核: 3.xxx
  • 硬件: Wireless-AC 8265
# 查看網卡信息
lsusb


# 確認網卡的版本
lspci | grep Network


# 掃描周圍無線wifi
iwlist scanning

下載驅動

Inger官方無線驅動下載
在這里插入圖片描述

安裝驅動

# 下載解壓
[root@fdm ~]# tar -zxvf iwlwifi-8265-ucode-22.361476.0.tgz 
iwlwifi-8265-ucode-22.361476.0/
iwlwifi-8265-ucode-22.361476.0/LICENSE.iwlwifi-8265.ucode
iwlwifi-8265-ucode-22.361476.0/iwlwifi-8265-22.ucode
iwlwifi-8265-ucode-22.361476.0/README.iwlwifi-8265-ucode
[root@fdm ~]# cd iwlwifi-8265-ucode-22.361476.0/
# 將文件復制到指定目錄 /lib/firmware/
[root@fdm iwlwifi-8265-ucode-22.361476.0]# cp -i iwlwifi-8265-22.ucode /lib/firmware/

由於當前內核版本 3.10, 要求內核版本 4.6+,所以需要升級內核

# 查看內核 uname -r
3.10.0-514.26.2.el7.x86_64

升級內核

升級內核詳細查看參考鏈接: https://blog.csdn.net/kikajack/article/details/79396793

# 更新倉庫
yum -y update
# 啟用 ELRepo 倉庫
rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm
# 查看可用的系統內核包
yum --disablerepo="*" --enablerepo="elrepo-kernel" list available
# 在yum的elrepo源中有ml和lt兩種內核,其中ml(mainline)為最新版本的內核,lt為長期支持的內核。

# ELRepo官網說,可以用fastestmirror的插件,讓yum在更新時先根據ping值進行判斷,然后從最快響應的地址下載。
# sudo yum -y install install yum-plugin-fastestmirror


# 安裝最新內核
yum --enablerepo=elrepo-kernel install kernel-ml

ELRepo 倉庫是基於社區的用於企業級 Linux 倉庫,提供對 RedHat Enterprise (RHEL) 和 其他基於 RHEL的 Linux 發行版(CentOS、Scientific、Fedora 等)的支持。
ELRepo 聚焦於和硬件相關的軟件包,包括文件系統驅動、顯卡驅動、網絡驅動、聲卡驅動和攝像頭驅動等。

設置 grub2

內核安裝好后,需要設置為默認啟動選項並重啟后才會生效

# 查看系統上的所有可以內核
# sudo awk -F\' '$1=="menuentry " {print i++ " : " $2}' /etc/grub2.cfg
0 : CentOS Linux (4.15.6-1.el7.elrepo.x86_64) 7 (Core)
1 : CentOS Linux (3.10.0-514.26.2.el7.x86_64) 7 (Core)
2 : CentOS Linux (3.10.0-327.el7.x86_64) 7 (Core)
3 : CentOS Linux (0-rescue-f9d400c5e1e8c3a8209e990d887d4ac1) 7 (Core)

# 設置 grub2
通過 grub2-set-default 0 命令設置
sudo grub2-set-default 0

# 編輯 /etc/default/grub 文件

# vi /etc/default/grub
設置 GRUB_DEFAULT=0,表示使用上一步的 awk 命令顯示的編號為 0 的內核作為默認內核

> GRUB_TIMEOUT=5
> GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
> GRUB_DEFAULT=0  
> GRUB_DISABLE_SUBMENU=true
> GRUB_TERMINAL_OUTPUT="console"
> GRUB_CMDLINE_LINUX="crashkernel=auto console=ttyS0 console=tty0 panic=5"
> GRUB_DISABLE_RECOVERY="true"
> GRUB_TERMINAL="serial console"
> GRUB_TERMINAL_OUTPUT="serial console"
> GRUB_SERIAL_COMMAND="serial --speed=9600 --unit=0 --word=8 --parity=no --stop=1"

# 生成 grub 配置文件並重啟
sudo grub2-mkconfig -o /boot/grub2/grub.cfg
sudo reboot

# 驗證內核
# uname -r
4.15.6-1.el7.elrepo.x86_64

刪除舊的內核

查詢一下系統已安裝的內核

rpm -qa | grep kernel
sudo yum remove -y 舊內核的名字


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM