1.更新系统

apt update -y && apt install -y curl socat wget sudo

2.修改vps时间

修改设置时区
修改到上海:

sudo timedatectl set-timezone Asia/Shanghai

查看当前时区

date -R

3.开启 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

显示:

sysctl net.ipv4.tcp_available_congestion_control
net.ipv4.tcp_available_congestion_control = bbr cubic reno

表示开启成功。

4.安装加速工具

预先准备

centos:yum install ca-certificates wget -y && update-ca-trust force-enable
debian/ubuntu:apt-get install ca-certificates wget -y && update-ca-certificates

不卸载内核版本

wget -O tcpx.sh "https://github.com/ylx2016/Linux-NetSpeed/raw/master/tcpx.sh" && chmod +x tcpx.sh && ./tcpx.sh

卸载内核版本

wget -O tcp.sh "https://github.com/ylx2016/Linux-NetSpeed/raw/master/tcp.sh" && chmod +x tcp.sh && ./tcp.sh 

5.Linux VPS 添加 Swap 虚拟内存

wget https://raw.githubusercontent.com/zhucaidan/swap.sh/main/swap.sh && bash swap.sh

6.禁用IPV6

vi /etc/sysctl.conf
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
net.ipv6.conf.eth0.disable_ipv6 = 1
sysctl -p

7.x-ui

目前在使用

bash <(curl -Ls https://raw.githubusercontent.com/vaxilu/x-ui/master/install.sh)
bash <(curl -Ls https://raw.githubusercontent.com/FranzKafkaYu/x-ui/master/install.sh)