centos7升級核心 ,wireguard優化
阿新 • • 發佈:2022-05-11
一、centos7升級核心
uname -r 檢視核心版本
升級前
升級後
參考連結: https://www.cnblogs.com/rick-zhang/p/14944510.html
# 啟用 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 --enablerepo=elrepo-kernel install kernel-ml vi /etc/default/grub 修改GRUB_DEFAULT=0 # 重新建立核心配置 grub2-mkconfig -o /boot/grub2/grub.cfg reboot
2、wireguard優化
核心升級後,wireguard無法啟動,報錯資訊如下
# wg-quick up /etc/wireguard/wg0.conf [#] ip link add wg0 type wireguard RTNETLINK answers: Operation not supported Unable to access interface: Protocol not supported [#] ip link delete dev wg0 Cannot find device "wg0"
參考連結:https://www.wireguard.com/install/
重新安裝後恢復
yum install yum-utils epel-release yum-config-manager --setopt=centosplus.includepkgs=kernel-plus --enablerepo=centosplus --save sed -e 's/^DEFAULTKERNEL=kernel$/DEFAULTKERNEL=kernel-plus/' -i /etc/sysconfig/kernel yum install kernel-plus wireguard-tools reboot