0%
Docker,等
Docker:
Docker一键安装
1
| curl -fsSL https://get.docker.com | bash -s docker
|
docker-compose安装
1
| apt install docker-compose -y
|
Speedtest魔改版
1
| docker run --name=speedtest -p 8081:80 -e TITLE="测试" -d jaydenlee2019/speedtest
|
WatchTower自动更新镜像
1 2 3 4 5
| docker run -d \ --name watchtower \ --restart unless-stopped \ -v /var/run/docker.sock:/var/run/docker.sock \ containrrr/watchtower -c
|
查看日志
1
| docker logs -f -t --tail 20 docker名
|
acme证书部署
1 2 3 4
| apt install socat curl https://get.acme.sh | sh wget https://raw.githubusercontent.com/NZESupB/Profile/main/autoacme.sh bash autoacme.sh
|
screen后台运行
1 2 3 4 5 6 7 8
| screen -S newScreen
screen -r newScreen
screen -ls
|
Python:
pip重装
1 2
| curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py python3 get-pip.py --force-reinstall
|
Host:
GitHub改host
1 2
| 140.82.112.4 github.com 199.232.68.133 raw.githubusercontent.com
|
GitHub镜像
1 2
| https://github.com.cnpmjs.org https://download.fastgit.org
|
UFW:
1 2 3 4 5 6 7 8 9 10
| apt update && apt install ufw -y
vim /etc/default/ufw
ufw enable
ufw deny 6739
|
Nodejs:
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
| apt update && apt install nodejs npm -y
npm cache clean -f
npm i -g pm2
npm i -g n
n latest
n stable
n ls
n v12.10.0
n
n rm 10.16.0
n lts
n prune
npm uninstall n -g
|
Nodejs卸载:
1 2 3 4 5 6 7 8 9
| npm uninstall npm -g
rm -rf /usr/local/bin/npm /usr/local/share/man/man1/node* ~/.npm rm -rf /usr/local/lib/node* rm -rf /usr/local/bin/node* rm -rf /usr/local/include/node*
apt purge nodejs npm apt autoremove
|
Swap:
1 2
| wget https://www.moerats.com/usr/shell/swap.sh && bash swap.sh
|