更新 'RNinitial.sh'

main
AhFei 2023-01-13 00:50:12 +08:00
parent 78e706cff7
commit 17b2a756f2
1 changed files with 8 additions and 1 deletions

View File

@ -4,6 +4,12 @@
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH export PATH
# step 0: prepare
github_project="docker/compose"
tag=$(wget -qO- -t1 -T2 "https://api.github.com/repos/${github_project}/releases/latest" | grep "tag_name" | head -n 1 | awk -F ":" '{print $2}' | sed 's/\"//g;s/,//g;s/ //g')
# step 1: install # step 1: install
echo "net.core.default_qdisc=fq" >> /etc/sysctl.conf #修改系统变量 echo "net.core.default_qdisc=fq" >> /etc/sysctl.conf #修改系统变量
echo "net.ipv4.tcp_congestion_control=bbr" >> /etc/sysctl.conf #修改系统变量 echo "net.ipv4.tcp_congestion_control=bbr" >> /etc/sysctl.conf #修改系统变量
@ -12,9 +18,10 @@ sysctl net.ipv4.tcp_available_congestion_control #执行
apt -y install sudo wget curl ufw screen vim git python3-pip apt -y install sudo wget curl ufw screen vim git python3-pip
curl -fsSL https://get.docker.com | bash -s docker >${PWD}/step1 2>&1 curl -fsSL https://get.docker.com | bash -s docker >${PWD}/step1 2>&1
curl -L https://github.com/docker/compose/releases/download/v2.12.2/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose && chmod +x /usr/local/bin/docker-compose curl -L https://github.com/docker/compose/releases/download/${tag}/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose && chmod +x /usr/local/bin/docker-compose
echo "step 1: install has finished" echo "step 1: install has finished"
# step 2: localize # step 2: localize
useradd -d /home/skf -m SkF%16_6 useradd -d /home/skf -m SkF%16_6
usermod -s /bin/bash SkF%16_6 usermod -s /bin/bash SkF%16_6