Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions wg_mult.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,13 @@ function install_wg(){
systemctl disable firewalld
install_tools "yum"
elif [ "$RELEASE" == "centos" ] && [ "$VERSION" == "8" ]; then
yum install -y yum-utils epel-release
yum-config-manager --setopt=centosplus.includepkgs="kernel-plus, kernel-plus-*" --setopt=centosplus.enabled=1 --save
sed -e 's/^DEFAULTKERNEL=kernel-core$/DEFAULTKERNEL=kernel-plus-core/' -i /etc/sysconfig/kernel
yum install -y kernel-plus wireguard-tools
#yum install -y yum-utils epel-release
#yum-config-manager --setopt=centosplus.includepkgs="kernel-plus, kernel-plus-*" --setopt=centosplus.enabled=1 --save
#sed -e 's/^DEFAULTKERNEL=kernel-core$/DEFAULTKERNEL=kernel-plus-core/' -i /etc/sysconfig/kernel
#yum install -y kernel-plus wireguard-tools
#doesn't work sometimes,use the method 2 via ELRepo's pre-built module
yum install elrepo-release epel-release
yum install kmod-wireguard wireguard-tools
sed -i "s/GRUB_DEFAULT=saved/GRUB_DEFAULT=0/" /etc/default/grub
grub2-mkconfig -o /boot/grub2/grub.cfg
systemctl stop firewalld
Expand Down