【Root权限】Root权限
sudo -i

【Root密码修改】
bash <(curl -Ls
baoqihui/script
raw/main/root.sh)


wget -N –no-check-certificate https://raw.githubusercontent.com/Misaka-blog/root-login/main/root.sh && bash root.sh

【更新系统,开放端口】
bash <(curl -Ls
baoqihui/script
raw/main/init.sh)

【dns64】
cp /etc/resolv.conf{,.bak}; echo -e “nameserver 2a00:1098:2b::1\nnameserver 2a01:4f9:c010:3f02::1\nnameserver 2a01:4f8:c2c:123f::1\nnameserver 2a00:1098:2c::1” > /etc/resolv.conf

【安装相关依赖】
centos系统下
yum update -y
yum check-update
yum -y update && yum -y upgrade

CentOS 7 自动更新设置
yum -y install yum-cron
安装好Cron后,编辑/etc/yum/yum-cron.conf文件,将如下选项设为yes既可。
download_updates = yes
apply_updates = yes

ubuntu系统下
apt-get install sudo
apt update -y
apt-get update -y && apt-get install curl -y
apt install wget curl sudo vim git -y

【Ubuntu系统依赖升级】
apt update -y && apt upgrade -y && apt-get dist-upgrade -y

【修改系统时间】
dpkg-reconfigure tzdata

【修复 Hax Ubuntu 20.04 更新问题】
wget -N https://raw.githubusercontents.com/tpe28/notes/master/haxu20.sh && bash haxu20.sh

【删除、关闭、打开各自系统的无用附件、防火墙、端口及规则】

删除甲骨文多余附件
systemctl stop oracle-cloud-agent
systemctl disable oracle-cloud-agent
systemctl stop oracle-cloud-agent-updater
systemctl disable oracle-cloud-agent-updater

【卸载甲骨文监控】
snap remove oracle-cloud-agent

【关闭防火墙】
停止firewall
systemctl stop firewalld.service
禁止firewall开机启动
systemctl stop firewalld.service
systemctl disable firewalld.service

【开放所有端口】
iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT
iptables -F

【Ubuntu镜像默认设置了Iptable规则,关闭它】
apt-get purge netfilter-persistent
reboot
或者强制删除
rm -rf /etc/iptables && reboot

【关闭防火墙】关闭防火墙
systemctl stop firewalld.service && systemctl disable firewalld.service

【甲骨文云开启IPV6】
参考https://51.ruyo.net/17105.html

【甲骨文保活脚本】
参考
spiritLHLS/Oracle-server-keep-alive-script

curl -L https://gitlab.com/spiritysdx/Oracle-server-keep-alive-script/-/raw/main/oalive.sh -o oalive.sh && chmod +x oalive.sh && bash oalive.sh

【Wulabing Vmess搭建】
sudo apt install -y curl

wget -N –no-check-certificate -q -O install.sh “https://raw.githubusercontent.com/wulabing/V2Ray_ws-tls_bash_onekey/master/install.sh” && chmod +x install.sh && bash install.sh

【Mack-a 八合一脚本搭建】
参考
mack-a/v2ray-agent
https://www.v2ray-agent.com/archives/1679107451697
wget -P /root -N –no-check-certificate “https://raw.githubusercontent.com/mack-a/v2ray-agent/master/install.sh” && chmod 700 /root/install.sh && /root/install.sh

删除 apache,要先运行这个,nginx才能用,才能申请到证书
apt-get -y purge $(dpkg -l | grep apache2 | awk ‘{print $2}’)

Nginx伪装站点目录
/usr/share/nginx/html

【x-ui搭建】
bash <(curl -Ls https://raw.githubusercontents.com/vaxilu/x-ui/master/install.sh)

【证书申请】
bash <(curl -Ls
baoqihui/script
raw/main/cert.sh)

【Hysteria搭建】
参考
emptysuns/Hi_Hysteria
bash <(curl -fsSL https://git.io/hysteria.sh)
bash <(wget -qO- https://raw.githubusercontent.com/emptysuns/Hi_Hysteria/main/server/install.sh)

【Sing-box搭建】
参考
fscarmen/sing-box
bash <(wget -qO- https://raw.githubusercontent.com/fscarmen/sing-box/main/sing-box.sh)

【BBR加速(系统自带BBR)】
参考:https://xanmod.org/

wget -O tcp.sh “
ylx2016/Linux-NetSpeed
raw/master/tcp.sh"
&& chmod +x tcp.sh && ./tcp.sh

或#首先先更新下系统,然后安装依赖组建:
apt-get update
apt-get update && apt-get install -y wget curl

之后开启原生BBR:

echo “net.core.default_qdisc=fq” >> /etc/sysctl.conf
echo “net.ipv4.tcp_congestion_control=bbr” >> /etc/sysctl.conf
sysctl -p

检测是否正常开启BBR:

sysctl net.ipv4.tcp_available_congestion_control
lsmod | grep bbr

【OpenVZ/Lxc BBR】
参考https://bobqu.cyou/2020/11/25/43.html
wget –no-cache -O lkl-haproxy.sh
mzz2017/lkl-haproxy
raw/master/lkl-haproxy.sh
&& bash lkl-haproxy.sh

【tcp优化加速脚本】
wget http://sh.nekoneko.cloud/tools.sh -O tools.sh && bash tools.sh

【Linux VPS一键添加/删除swap脚本】
wget https://www.moerats.com/usr/shell/swap.sh && bash swap.sh

【MTPorxy】

bash <(curl -sL https://storage.googleapis.com/tiziblog/mt_setup.sh)

bash <(wget -qO- https://git.io/mtg.sh)
(参考
cutelua/mtg-dist)


curl -o MTProtoProxyInstall.sh -L https://git.io/fjo34 && bash MTProtoProxyInstall.sh
(参考
HirbodBehnam/MTProtoProxyInstaller)

【流媒体检测】
全流媒体检测
参考
lmc999/RegionRestrictionCheck

bash <(curl -L -s check.unlock.media)

bash <(curl -L -s media.ispvps.com)

bash <(curl -Ls unlock.moe)

Netflix检测
wget -O nf
sjlleo/netflix-verify
releases/download/v3.1.0/nf_linux_amd64
&& chmod +x nf && ./nf

bash <(curl -sSL https://raw.githubusercontent.com/xb0or/nftest/main/netflix.sh)

ChatGPT检测
bash <(curl -Ls https://cdn.jsdelivr.net/gh/missuo/OpenAI-Checker/openai.sh)

bash <(curl -Ls https://cpp.li/openai)

【Warp】
FSCARMEN (https://gitlab.com/fscarmen/warp/) :

首次运行 wget -N https://gitlab.com/fscarmen/warp/-/raw/main/menu.sh && bash menu.sh
日常维护 warp
P3TERX (
P3TERX/warp.sh) :

首次运行 bash <(curl -fsSL git.io/warp.sh) menu
WARP-GO (https://gitlab.com/fscarmen/warp/) :

首次运行 wget -N https://gitlab.com/fscarmen/warp/-/raw/main/warp-go.sh && bash warp-go.sh
日常维护 warp-go
MISAKA (https://gitlab.com/Misaka-blog/warp-script) :

首次运行 wget -N https://gitlab.com/Misaka-blog/warp-script/-/raw/main/warp.sh && bash warp.sh
日常维护 bash warp.sh
【查询IP】

查询本机外网IPv4地址
curl -4 ip.sb

curl 4.ipw.cn

查询本机外网IPv6地址
curl -6 ip.sb

curl 6.ipw.cn

测试网络是IPv4还是IPv6访问优先(访问IPv4/IPv6双栈站点,如果返回IPv6地址,则IPv6访问优先)
curl ip.sb

curl test.ipw.cn

curl bgp.ink

【优选IP】

【better-cloudflare-ip】
curl https://proxy.freecdn.workers.dev/?url=https://raw.githubusercontent.com/badafans/better-cloudflare-ip/master/shell/cf.sh -o cf.sh && chmod +x cf.sh && ./cf.sh

【CloudflareSpeedTest】

如果是第一次使用,则建议创建新文件夹(后续更新请跳过该步骤)
mkdir CloudflareST

进入文件夹(后续更新,只需要从这里重复下面的下载、解压命令即可)
cd CloudflareST

下载 CloudflareST 压缩包(自行根据需求替换 URL 中 [版本号] 和 [文件名])
wget -N
XIU2/CloudflareSpeedTest
releases/download/v2.0.2/CloudflareST_linux_amd64.tar.gz

注意!国内下载时,建议把 URL 中的 github.com 替换为 download.fastgit.org (镜像站) 以避免下载失败
解压(不需要删除旧文件,会直接覆盖,自行根据需求替换 文件名)
tar -zxf CloudflareST_linux_amd64.tar.gz

赋予执行权限
chmod +x CloudflareST

运行(不带参数)
./CloudflareST

运行(带参数示例)
./CloudflareST -dd -tll 90

【融合测试】
bash <(wget -qO- –no-check-certificate https://gitlab.com/spiritysdx/za/-/raw/main/ecs.sh)

【HyperSpeed 全面测速版(魔改SuperSpeed )】
bash <(curl -Lso- https://bench.im/hyperspeed)

【SuperSpeed 全面测速版】
bash <(curl -Lso- https://git.io/Jlkmw)

【SuperBench测试脚本】
wget -qO- –no-check-certificate https://raw.githubusercontent.com/oooldking/script/master/superbench.sh | bash

或者

curl -Lso- -no-check-certificate https://raw.githubusercontent.com/oooldking/script/master/superb

【VPS三网回程路由测试】
wget -qO- git.io/autobesttrace | bash

curl https://raw.githubusercontent.com/zhanghanyun/backtrace/main/install.sh -sSf | sh

wget -N –no-check-certificate https://raw.githubusercontent.com/Chennhaoo/Shell_Bash/master/AutoTrace.sh && chmod +x AutoTrace.sh && bash AutoTrace.sh

【测IP质量(IP黑还是白)(含IPV4和IPV6)】
bash <(wget -qO- –no-check-certificate
spiritLHLS/ecs
raw/main/qzcheck.sh)

【IP质量检测】
bash <(curl -sL IP.Check.Place)

【Speedtest测速】
apt install speedtest-cli
speedtest

sudo apt-get install curl
curl -s https://packagecloud.io/install/repositories/ookla/speedtest-cli/script.deb.sh | sudo bash
sudo apt-get install speedtest
speedtest

【iperf3 测试 VPS 本地连接最大速度】
CentOS
yum -y install iperf3

Ubuntu
apt-get -y install iperf3

iperf3 -s -p 5201

【查看lxc母鸡创建了多少个容器】
ls /sys/devices/virtual/block

查看各个容器的信息,还可以查看自己在第几个(列表最后面有斜扛的),有些lxc可能不会列出来
lsblk

【解决debain11上ssh一开始慢的问题】
systemctl mask systemd-logind
pam-auth-update

第二个命令出来的界面,按键盘下键移到第二个,按空格键取消选中,然后回车即可。退出ssh再连就可以实现秒进了。

【清除系统日志】
sudo apt-get autoclean -y && sudo apt-get clean -y && sudo apt-get autoremove -y && sudo apt-get install deborphan -y && sudo rm -rvf /var/cache/apt/ /var/lib/apt/lists/ /tmp/* && sudo find /var/log/ -type f | xargs sudo rm -rvf && sudo rm -rvf ~/.bash_history ~/.zsh_history && history -c

最后修改:2024 年 07 月 23 日
如果觉得我的文章对你有用,请随意赞赏