Centos7部署SSpanel_加速

yum系统更新

yum update

查看系统版本

cat /etc/redhat-release

输出如下则表示已升级到7.5

CentOS Linux release 7.5.1804 (Core)

安装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 --enablerepo=elrepo-kernel install kernel-ml -y

正常情况下将输出如下信息:

Transaction Summary
===================================================================================
Install 1 Package

Total download size: 46 M
Installed size: 205 M
Downloading packages:
kernel-ml-4.19.0-1.el7.elrepo.x86_64.rpm | 46 MB 00:00:19
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Warning: RPMDB altered outside of yum.
Installing : kernel-ml-4.19.0-1.el7.elrepo.x86_64 1/1
Verifying : kernel-ml-4.19.0-1.el7.elrepo.x86_64 1/1

Installed:
kernel-ml.x86_64 0:4.19.0-1.el7.elrepo

Complete!

安装完成后使用下面命令查看当前已安装的内核

awk -F\' '$1=="menuentry " {print i++ " : " $2}' /etc/grub2.cfg

返回

0 : CentOS Linux (4.19.0-1.el7.elrepo.x86_64) 7 (Core)
1 : CentOS Linux 7 Rescue ee7953a3b5944053a26f29daf8c71e2f (3.10.0-862.14.4.el7.x86_64)
2 : CentOS Linux (3.10.0-862.14.4.el7.x86_64) 7 (Core)
3 : CentOS Linux (3.10.0-862.3.2.el7.x86_64) 7 (Core)
4 : CentOS Linux (3.10.0-862.el7.x86_64) 7 (Core)
5 : CentOS Linux (0-rescue-4bbda2095d924b72b05507b68bd509f0) 7 (Core)

把CentOS Linux (4.19.0-1.el7.elrepo.x86_64) 7 (Core)内核设置为默认

grub2-set-default 0

重启

reboot

设置BBR

编辑

vi /etc/sysctl.conf

添加如下内容

net.core.default_qdisc = fq
net.ipv4.tcp_congestion_control = bbr

加载系统参数(正常情况下会输出我们之前加入的内容)

sysctl -p

验证bbr是否已经开启

1、如果

sysctl net.ipv4.tcp_available_congestion_control

返回

net.ipv4.tcp_available_congestion_control = reno cubic bbr

则成功

2、若

lsmod | grep bbr

返回形如如下形式的信息即成功

tcp_bbr                20480  2
文章作者: NiTian
文章链接: https://www.nitian1207.top/2019/08/03/Centos7部署SSpanel-加速/
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 NiTian的小窝
支付宝打赏
微信打赏