Last active
August 17, 2023 08:07
-
-
Save zenghongtu/f53013f9decbbaf733782cfd14bb950f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
cat > /etc/sysctl.conf <<EOF | |
net.ipv4.tcp_no_metrics_save=1 | |
net.ipv4.tcp_ecn=2 | |
net.ipv4.tcp_ecn_fallback = 1 | |
net.ipv4.tcp_frto=0 | |
net.ipv4.tcp_mtu_probing=0 | |
net.ipv4.tcp_rfc1337=1 | |
net.ipv4.tcp_sack=1 | |
net.ipv4.tcp_fack=1 | |
net.ipv4.tcp_window_scaling=1 | |
net.ipv4.tcp_adv_win_scale=2 | |
net.ipv4.tcp_moderate_rcvbuf=1 | |
net.ipv4.tcp_rmem=4096 65536 16777216 | |
net.ipv4.tcp_wmem=4096 65536 16777216 | |
net.core.rmem_max=16777216 | |
net.core.wmem_max=16777216 | |
net.ipv4.udp_rmem_min=8192 | |
net.ipv4.udp_wmem_min=8192 | |
net.core.default_qdisc=fq | |
net.ipv4.tcp_congestion_control=bbr | |
net.ipv4.conf.all.route_localnet=1 | |
net.ipv4.ip_forward=1 | |
net.ipv4.conf.all.forwarding=1 | |
net.ipv4.conf.default.forwarding=1 | |
EOF | |
sysctl -p |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.4/install.sh | bash | |
export NVM_DIR="$HOME/.nvm" | |
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm | |
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion | |
nvm install node | |
npm i -g pm2 | |
npm i -g @antfu/ni | |
echo 'done.' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment