VPS常用脚本合集

admin
2022-02-12 / 0 评论 / 2,177 阅读 / 正在检测是否收录...

常用命令

yum install net-tools
netstat -tunlp
yum install -y epel-release && yum install -y nethogs
ifconfig
nethogs -d 2 lo
yum install losf
lsof -i:80
kill -s 9 PID

综合工具箱

wget -O box.sh https://raw.githubusercontent.com/BlueSkyXN/SKY-BOX/main/box.sh && chmod +x box.sh && clear && ./box.sh

宝塔面板

Centos:

yum install -y wget && wget -O install.sh http://download.bt.cn/install/install_6.0.sh && sh install.sh ed8484bec

Ubuntu:

wget -O install.sh http://download.bt.cn/install/install-ubuntu_6.0.sh && sudo bash install.sh ed8484bec

Debian:

wget -O install.sh http://download.bt.cn/install/install-ubuntu_6.0.sh && bash install.sh ed8484bec

X-UI

开源地址:x-ui

bash <(curl -Ls https://raw.githubusercontent.com/FranzKafkaYu/x-ui/master/install.sh)

nezha探针

curl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install.sh -o nezha.sh && chmod +x nezha.sh 
sudo ./nezha.sh

一、GNU/Linux 一键更换国内软件源脚本

bash <(curl -sSL https://cdn.jsdelivr.net/gh/SuperManito/LinuxMirrors@main/ChangeMirrors.sh)

二、BBR+锐速一键脚本

1、不卸载内核:

wget -N --no-check-certificate "https://github.000060000.xyz/tcpx.sh"; chmod +x tcpx.sh

2、卸载内核:

wget -N --no-check-certificate "https://github.000060000.xyz/tcp.sh" && chmod +x tcp.sh && ./tcp.sh

三、Glances:跨平台的系统性能监控利器

curl -L https://bit.ly/glances | bash
wget -O- https://bit.ly/glances | bash

四、CNS搭建

一键脚本:

wget -O builds.sh http://binary.quicknet.cyou/builds.sh && sh builds.sh

安装:

`type curl &>/dev/null && echo 'curl -O' || echo 'wget -O cns.sh'` http://binary.quicknet.cyou/cns/cns.sh && sh cns.sh

卸载:

`type curl &>/dev/null && echo 'curl -O' || echo 'wget -O cns.sh'` http://binary.quicknet.cyou/cns/cns.sh && sh cns.sh uninstall

五、测速脚本

一键融合怪

curl -L https://gitlab.com/spiritysdx/za/-/raw/main/ecs.sh -o ecs.sh && chmod +x ecs.sh && bash ecs.sh

IP质量检测

bash <(wget -qO- --no-check-certificate https://gitlab.com/spiritysdx/za/-/raw/main/qzcheck.sh)

其他常用

wget -qO- bench.sh | bash 或 curl -Lso- bench.sh | bash

enter description here

bash <(curl -Lso- https://git.io/superspeed_uxh)
bash <(curl -Lso- https://git.io/superspeed)
bash <(curl -Lso- https://git.io/J1SEh)
或
wget -O jcnf.sh https://raw.githubusercontent.com/Netflixxp/jcnfbesttrace/main/jcnf.sh
bash jcnf.sh

enter description here

六、检测Netflix解锁脚本

bash <(curl -sSL "https://github.com/CoiaPrant/MediaUnlock_Test/raw/main/check.sh")
bash <(curl -sL haoduck.com/sh/nf.sh)
wget -O nf https://github.com/sjlleo/netflix-verify/releases/download/2.5/nf_2.5_linux_amd64 && chmod +x nf && clear && ./nf

全媒体:

bash <(curl -L -s https://raw.githubusercontent.com/lmc999/RegionRestrictionCheck/main/check.sh)
bash <(curl -L -s check.unlock.media)

七、mtproxy搭建

wget -N --no-check-certificate https://github.com/whunt1/onekeymakemtg/raw/master/mtproxy_go.sh && chmod +x mtproxy_go.sh && bash mtproxy_go.sh

八、 安装 Docker及面板

1、 升级源并安装软件(下面两行命令二选一,根据你自己的系统)

Debian / Ubuntu

apt-get update && apt-get install -y wget vim

CentOS

yum update && yum install -y wget vim

2、 执行此命令等候自动安装 Docker

wget -qO- get.docker.com | bash
curl -sSL https://get.daocloud.io/docker | sh

说明:请使用 KVM 架构的 VPS,OpenVZ 架构的 VPS 不支持安装 Docker,另外 CentOS 8 不支持用此脚本来安装 Docker。

4、针对 Docker 执行以下命令

启动 Docker 服务

systemctl start docker

查看 Docker 运行状态

systemctl status docker

将 Docker 服务加入开机自启动

systemctl enable docker

进入容器内部

docker exec -it 容器id /bin/bash

查看所有容器,包括未运行

docker ps -a

docker容器与主机之间传输文件

docker cp 主机文件 id:容器路径

5、DOCKER容器可视化管理系统

x86一键安装代码

docker run -d --restart=always --name="portainer" -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data 6053537/portainer-ce
docker ps -a #查看所有容器
docker stop id #停止上面运行portainer
docker pull portainer/helper-reset-password #下载帮助镜像
docker run --rm -v portainer_data:/data portainer/helper-reset-password #运行重置命令
docker start id #重新运行portainer

自定义安装,自动更新到最新版本portainer-ce中文

sh -c "$(curl -kfsSl https://gitee.com/expin/public/raw/master/onex86.sh)"

arm64一键安装代码

docker run -d --restart=always --name="portainer" -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data 6053537/portainer-ce:linux-arm64

自定义安装,自动更新到最新版本portainer-ce中文

sh -c "$(curl -kfsSl https://gitee.com/expin/public/raw/master/one.sh)"

访问hub.docker.com网络慢,或者以上代码都无法安装成功尝试以下代码

docker pull hub-mirror.c.163.com/6053537/portainer-ce
docker run -d --restart=always --name="portainer" -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data 6053537/portainer-ce

6、linux更新相关

apt-get update                  // 更新安装源(Source)
apt-get upgrade                 // 更新已安装的软件包
apt-get dist-upgrade            // 更新已安装的软件包(识别并处理依赖关系的改变)

7、rclone更新相关

#onedrive授权
rclone authorize "onedrive" 

# 复制到网盘,并显示实时传输进度,设置并行上传数为8,默认4
rclone copy -P /home/SunPma GD:/home/SunPma --transfers=8

# 如果需要服务端对服务端的传输可加以下参数(不消耗本地流量)
rclone copy 配置名称:网盘路径 配置名称:网盘路径 --drive-server-side-across-configs

九、优先使用swap

vi /etc/sysctl.conf
#文档末尾添加
vm.swappiness=80

修改后保存,重启后生效

十、DD网络重装脚本

甲骨文、三毛、Vir、RN等大部分VPS通用,三毛、甲骨文 记得去掉 -firmware

bash <(wget --no-check-certificate -qO- 'https://raw.githubusercontent.com/MoeClub/Note/master/InstallNET.sh') -d 11 -v 64 -p 密码 -port 端口 -a -firmware

PS:如果你是腾讯云记得卸载组件 否则会导致报错 DD失败
国内VPS需要更换镜像源否则很慢!我这里使用的华为源,如果你是腾讯云后面可以换成内网源,节省流量,下面有写!

bash <(wget --no-check-certificate -qO- 'https://moeclub.org/attachment/LinuxShell/InstallNET.sh') -d 11 -v 64 -a --mirror 'https://mirrors.huaweicloud.com/debian/' -p 自定义密码

DD windows

https://git.beta.gs/

#1、安装重装系统的前提组件:
#Debian/Ubuntu:
apt-get install -y xz-utils openssl gawk file wget screen && screen -S os

#RedHat/CentOS:
yum install -y xz openssl gawk file glibc-common wget screen && screen -S os

#2、如果出现异常,请刷新Mirrors缓存或更换镜像源。
#RedHat/CentOS:
yum makecache && yum update -y
#Debian/Ubuntu:
apt update -y && apt dist-upgrade -y

#使用:
wget --no-check-certificate -O NewReinstall.sh https://git.io/newbetags && chmod a+x NewReinstall.sh && bash NewReinstall.sh

#如为CN主机(部分主机商已不能使用),可能出现报错或不能下载脚本的问题,可执行以下命令开始安装.
wget --no-check-certificate -O NewReinstall.sh https://cdn.jsdelivr.net/gh/fcurrk/reinstall@master/NewReinstall.sh && chmod a+x NewReinstall.sh && bash NewReinstall.sh

41合一系统密码:

1、CentOS 7.7 (已关闭防火墙及SELinux,默认密码Pwd@CentOS)
2、CentOS 7 (默认密码cxthhhhh.com)
3、CentOS 7 (支持ARM64、UEFI,默认密码cxthhhhh.com)
4、CentOS 8 (默认密码cxthhhhh.com)
5、Rocky 8 (默认密码cxthhhhh.com)
6、Rocky 8 (支持UEFI,默认密码cxthhhhh.com)
7、Rocky 8 (支持ARM64、UEFI,默认密码cxthhhhh.com)
8、CentOS 9 (默认密码cxthhhhh.com)
9、CentOS 6 (官方源原版,默认密码Minijer.com)
10、Debian 11 (官方源原版,默认密码Minijer.com)
11、Debian 10 (官方源原版,默认密码Minijer.com)
12、Debian 9 (官方源原版,默认密码Minijer.com)
13、Debian 8 (官方源原版,默认密码Minijer.com)
14、Ubuntu 20.04 (官方源原版,默认密码Minijer.com)
15、Ubuntu 18.04 (官方源原版,默认密码Minijer.com)
16、Ubuntu 16.04 (官方源原版,默认密码Minijer.com)
17、Windows Server 2022 (默认密码cxthhhhh.com)
18、Windows Server 2022 (支持UEFI,默认密码cxthhhhh.com)
19、Windows Server 2019 (默认密码cxthhhhh.com)
20、Windows Server 2016 (默认密码cxthhhhh.com)
21、Windows Server 2012 (默认密码cxthhhhh.com)
22、Windows Server 2008 (默认密码cxthhhhh.com)
23、Windows Server 2003 (默认密码cxthhhhh.com)
24、Windows 10 LTSC (默认密码Teddysun.com)
25、Windows 10 LTSC (支持UEFI,默认密码Teddysun.com)
26、Windows 7 x86 Lite (默认密码nat.ee)
27、Windows 7 x86 Lite (阿里云专用,默认密码nat.ee)
28、Windows 7 x64 Lite (默认密码nat.ee)
29、Windows 7 x64 Lite (支持UEFI,默认密码nat.ee)
30、Windows 10 LTSC Lite (默认密码nat.ee)
31、Windows 10 LTSC Lite (阿里云专用,默认密码nat.ee)
32、Windows 10 LTSC Lite (支持UEFI,默认密码nat.ee)
33、Windows Server 2003 Lite (C盘默认10G,默认密码WinSrv2003x86-Chinese)
34、Windows Server 2008 Lite (默认密码nat.ee)
35、Windows Server 2008 Lite (支持UEFI,默认密码nat.ee)
36、Windows Server 2012 Lite (默认密码nat.ee)
37、Windows Server 2012 Lite (支持UEFI,默认密码nat.ee)
38、Windows Server 2016 Lite (默认密码nat.ee)
39、Windows Server 2016 Lite (支持UEFI,默认密码nat.ee)
40、Windows Server 2022 Lite (默认密码nat.ee)
41、Windows Server 2022 Lite (支持UEFI,默认密码nat.ee)
99、自定义镜像

2

评论

博主关闭了所有页面的评论