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

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

環境說明:html

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


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


# 掃描周圍無線wifi
iwlist scanning

下載驅動

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

安裝驅動

# 下載解壓
[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/79396793less

# 更新倉庫
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 聚焦於和硬件相關的軟件包,包括文件系統驅動、顯卡驅動、網絡驅動、聲卡驅動和攝像頭驅動等。spa

設置 grub2

內核安裝好後,須要設置爲默認啓動選項並重啓後纔會生效.net

# 查看系統上的全部能夠內核
# 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 舊內核的名字
相關文章
相關標籤/搜索