VPS安装SSR-锐速-BBR-rinetd加速

VPS这里我讲两种:

OpenVz:
可安装:rinetd加速

KVM:
可安装:锐速、BBR。
注:由于内核要求不同,所以锐速和BBR仅能二选一。

安装:针对于Centos7:

多用户管理面板|ss-panel魔改脚本-一键脚本

yum install screen wget -y &&screen -S ss wget -N --no-check-certificate https://raw.githubusercontent.com/mmmwhy/ss-panel-and-ss-py-mu/master/ss-panel-v3-mod.sh && chmod +x ss-panel-v3-mod.sh && bash ss-panel-v3-mod.sh

BBR安装:

1. yum系统更新(更新到7.3)
yum update
2.查看系统版本
cat /etc/redhat-release

输出如下,则表示已升级到7.3

CentOS Linux release 7.3.1611 (Core)
3.安装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: 39 M
Installed size: 169 M
Downloading packages:
kernel-ml-4.9.0-1.el7.elrepo.x86_64.rpm                    |  39 MB   00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Warning: RPMDB altered outside of yum.
  Installing : kernel-ml-4.9.0-1.el7.elrepo.x86_64                          1/1
  Verifying  : kernel-ml-4.9.0-1.el7.elrepo.x86_64                          1/1

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

Complete!
4.更新grub文件并重启(reboot后,ssh会断开,稍等一会儿重新连接)
egrep ^menuentry /etc/grub2.cfg | cut -f 2 -d \'
grub2-set-default 0
reboot
5.开机后查看内核是否已更换为4.9
uname -r

输出如下内容则表示内核4.9已经启动了

4.9.0-1.el7.elrepo.x86_64
6.开启bbr
vi /etc/sysctl.conf

添加如下内容

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

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

sysctl -p
7.确定bbr已经开启

a.若

sysctl net.ipv4.tcp_available_congestion_control

返回

net.ipv4.tcp_available_congestion_control = bbr cubic reno

则成功

b.若

lsmod | grep bbr

返回形如

tcp_bbr                16384  1

则成功

Centos和Ubuntu一键BBR:

wget –no-check-certificate https://github.com/teddysun/across/raw/master/bbr.sh

chmod +x bbr.sh

./bbr.sh

锐速破解版一键安装包

centos6 更换为锐速支持的内核:
rpm -ivh http://soft.91yun.org/ISO/Linux/CentOS/kernel/kernel-firmware-2.6.32-504.3.3.el6.noarch.rpm
rpm -ivh http://soft.91yun.org/ISO/Linux/CentOS/kernel/kernel-2.6.32-504.3.3.el6.x86_64.rpm --force
centos7 更换为锐速支持的内核:
rpm -ivh http://soft.91yun.org/ISO/Linux/CentOS/kernel/kernel-3.10.0-229.1.2.el7.x86_64.rpm --force
查看内核更换是否成功:
rpm -qa | grep kernel
重启查看内核更换是否成功:
reboot
uname -r
锐速破解版安装方法:
wget -N --no-check-certificate https://raw.githubusercontent.com/91yun/serverspeeder/master/serverspeeder-all.sh && bash serverspeeder-all.sh
锐速破解版卸载方法:
chattr -i /serverspeeder/etc/apx* && /serverspeeder/bin/serverSpeeder.sh uninstall -f
查看锐速启动状态
/serverspeeder/bin/serverSpeeder.sh status

rinetd加速:

wget --no-check-certificate https://raw.githubusercontent.com/linhua55/lkl_study/master/get-rinetd.sh
如果你加速唯一一个端口,直接输入bash get-rinetd.sh
输入vi get-rinetd.sh,按i进入编辑状态(加入需要加速的端口)
echo "2. Generate /etc/rinetd-bbr.conf"
cat <<EOF > /etc/rinetd-bbr.conf
# bindadress bindport connectaddress connectport
0.0.0.0 443 0.0.0.0 443
0.0.0.0 80 0.0.0.0 80
EOF
sudo bash get-rinetd.sh
返回rinetd-bbr started即加速成功

发表评论