Last update at :2024-02-03,Edit by888u
This article uses Virmach’s cheapest VPS of $5/year for testing. For VPS evaluation, please see the following article:
#CHEAPVPS#5 dollars a year 1 core 128M 5G 250G 1Gbps Los Angeles: virmach
This tutorial uses Debian as an example: The first step is to reinstall a pure system provided by non-commercial companies
First, reinstall Debian 7/8 in the Virmach control panel. If so, there is no need to install it, in preparation for reinstalling the folk pure system below. Download script
wget --no-check-certificate -qO InstallNET.sh 'https://moeclub.org/attachment/LinuxShell/InstallNET.sh' && chmod a+x InstallNET.shRuisu, reinstall to Debian 7 32-bit
bash InstallNET.sh -d 7 -v 32 -a
BBR, reinstall to Debian 8 64-bit
bash InstallNET.sh -d 8 -v 64 -a
The default password for SSH login is: Vicer
Explanation, this installed system will automatically add swap virtual memory twice the physical memory, 128×2=256 256 virtual memory is enough. For VPS with small memory, it is still necessary to use swap!
The second step, kernel parameter optimization
1. Increase the maximum number of system file descriptors
Edit the file limits.conf vi /etc/security/limits.conf Finally, add two lines to add the command:
* soft nofile 51200 *hard nofile 51200If you find that the contents of the limits.conf file already exist, please modify it to the above.
Edit file profile Finally, add a new line to add the command. vi /etc/profile
ulimit -SHn 51200
Restart after modification and check whether the command takes effect: ulimit -n
2. Adjust kernel parameters Modify the configuration file sysctl.conf vi /etc/sysctl.conf Finally, add a new line to add the command:
fs.file-max = 51200 net.core.rmem_max = 67108864 net.core.wmem_max = 67108864 net.core.rmem_default = 65536 net.core.wmem_default = 65536 net.core.netdev_max_backlog = 4096 net.core.somaxconn = 4096 net.ipv4.tcp_syncookies = 1 net.ipv4.tcp_tw_reuse = 1 net.ipv4.tcp_tw_recycle = 0 net.ipv4.tcp_fin_timeout = 30 net.ipv4.tcp_keepalive_time = 1200 net.ipv4.ip_local_port_range = 10000 65000 net.ipv4.tcp_max_syn_backlog = 4096 net.ipv4.tcp_max_tw_buckets = 5000 net.ipv4.tcp_fastopen = 3 net.ipv4.tcp_rmem = 4096 87380 67108864 net.ipv4.tcp_wmem = 4096 65536 67108864 net.ipv4.tcp_mtu_probing = 1 net.ipv4.tcp_congestion_control = hybla vm.min_free_kbytes = 5120 vm.overcommit_memory = 1 vm.panic_on_oom = 1 vm.swappiness = 80 vm.vfs_cache_pressure = 200The third step, install BBR or Ruisu
1. Violent BBR Reference: https://github.com/tcp-nanqinlang/wiki/wiki/general Installation:
wget https://github.com/tcp-nanqinlang/general/releases/download/3.4.2.1/tcp_nanqinlang-fool-1.3.0.sh bash tcp_nanqinlang-fool-1.3.0.sh2. Rapid speed Installation:
wget --no-check-certificate -O appex.sh https://raw.githubusercontent.com/0oVicero0/serverSpeeder_Install/master/appex.sh && chmod x appex.sh && bash appex.sh installRuisu optimization parameters: Edit file: vi /appex/etc/config
initialCwndWan="65" shaperEnable="0" SmBurstMS="20" shortRttMS="90"Just change the value to the one above. Restart Ruisu /appex/bin/serverSpeeder.sh restart
Ruisu users must choose, otherwise they will explode. Debian or Ubuntu next click to install the libev version
To simplify it further, it is to uninstall apt-get remove rsyslog At the same time, be sure to modify the SSH port.
For VPS with small memory, I strongly recommend installing a 32-bit system.
Recommended site searches: Hong Kong virtual host, foreign virtual host, Zhenjiang high-defense server, IP address query, domain name query, Guangzhou server rental, virtual host control panel, purchase of high-defense server, domain name price, US host rental,
p>
发表评论