1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
| cd /var sudo dd if=/dev/zero of=swapfile bs=1024 count=2000000 sudo mkswap swapfile sudo swapon /var/swapfile echo /var/swapfile swap swap defaults 0 0 >> /etc/fstab cd ~
sudo apt update sudo apt upgrade sudo apt install curl wget -y
wget https://dev.mysql.com/get/mysql-apt-config_0.8.16-1_all.deb dpkg -i mysql-apt-config_0.8.16-1_all.deb
sudo apt update sudo apt install mysql
wget http://soft.vpser.net/lnmp/lnmp1.8beta.tar.gz -cO lnmp1.8beta.tar.gz && tar zxf lnmp1.8beta.tar.gz && cd lnmp1.8 && ./install.sh lnmp
wget -O - https://get.acme.sh sh -s email=你的邮箱地址
export CF_Key="我的CloudFlare API令牌" export CF_Email="我的CloudFlare账户邮箱" ~/.acme.sh/acme.sh --issue --dns dns_cf -d 待申请SSL的域名
sudo bash -c "$(curl -fsSL https://raw.githubusercontent.com/trojan-gfw/trojan-quickstart/master/trojan-quickstart.sh)" sudo cp /usr/local/etc/trojan/config.json /usr/local/etc/trojan/config.json.bak sudo vim /usr/local/etc/trojan/config.json
sudo systemctl restart trojan
sudo systemctl enable trojan
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
|