CentOS7.5 开启BBR 安装SSR

2019-05-21 小惟 7

 #导入elrepo软件源的GPG公钥


rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org

#导入elrepo软件源


rpm -Uvh https://www.elrepo.org/elrepo-release-7.0-3.el7.elrepo.noarch.rpm

 #下载并安装新的内核


yum --enablerepo=elrepo-kernel install kernel-ml -y

#设定grub默认启动新内核


grub2-set-default 0

# 重启


reboot

#删除旧内核


yum -y remove kernel kernel-tools

#开启BBR


echo "net.core.default_qdisc=fq" >> /etc/sysctl.conf

echo "net.ipv4.tcp_congestion_control=bbr" >> /etc/sysctl.conf

sysctl -p

sysctl net.ipv4.tcp_available_congestion_control

lsmod | grep bbr

wget --no-check-certificate https://raw.githubusercontent.com/teddysun/shadowsocks_install/master/shadowsocksR.sh && chmod +x shadowsocksR.sh

./shadowsocksR.sh

按照提示设置安装


 


常用命令


启动    /etc/init.d/shadowsocks start

停止    /etc/init.d/shadowsocks stop

重启    /etc/init.d/shadowsocks restart

状态    /etc/init.d/shadowsocks status

文件路径


配置文件路径    /etc/shadowsocks.json

日志文件路径    /var/log/shadowsocks.log

代码安装目录    /usr/local/shadowsocks