本文最后更新于 超过 1 年前,文中所描述的信息可能已发生改变。
综合管理工具
BlueSkyXN
使用方法:
wget -O box.sh https://raw.githubusercontent.com/BlueSkyXN/SKY-BOX/main/box.sh && chmod +x box.sh && clear && ./box.sh
ARM Beta(截止2023.7.1是beta版本):
wget -O box.sh https://raw.githubusercontent.com/BlueSkyXN/SKY-BOX/main/armbox.sh && chmod +x box.sh && clear && ./box.sh
查看脚本功能表
Linux命令
本地化处理
修改时区
bash
timedatectl set-timezone Asia/Shanghai
更改Linux服务器终端显示语言为中文
shell
wget -N --no-check-certificate https://raw.githubusercontent.com/FunctionClub/LocaleCN/master/LocaleCN.sh && bash LocaleCN.sh
系统支持
- Debian 8 / 9
- Ubuntu 14 / 16
- CentOS 6 / 7
DD脚本
MoeClub一键DD
记得修改自定义ssh端口和ssh密码。Debian:11
shell
bash <(wget --no-check-certificate -qO- 'https://raw.githubusercontent.com/MoeClub/Note/master/InstallNET.sh') -d 11 -v 64 -p "自定义root密码" -port "自定义ssh端口"
Ubuntu 20.04
shell
bash <(wget --no-check-certificate -qO- 'https://raw.githubusercontent.com/MoeClub/Note/master/InstallNET.sh') -u 20.04 -v 64 -p "自定义root密码" -port "自定义ssh端口"
网速/IO/性能测试
Bench.sh
你可以使用以下命令来查看您的 Linux 系统信息,还可以测试网络带宽及硬盘读写速率
shell
wget -qO- bench.sh | bash
# 或者
curl -Lso- bench.sh | bash
四网测速+延迟、抖动
shell
bash <(wget -qO- https://bench.im/hyperspeed)
媒体解锁测试
shell
bash <(curl -L -s https://raw.githubusercontent.com/lmc999/RegionRestrictionCheck/main/check.sh)
常用命令
配置IPV6 DNS
shell
echo -e "nameserver 2a01:4f8:c2c:123f::1" > /etc/resolv.conf
常用组件
ACME Offical
1. 安装
shell
curl https://get.acme.sh | sh
source ~/.bashrc
apt-get update && apt-get install socat -y
2. 申请证书
切换到letsencrypt
shell
acme.sh --set-default-ca --server letsencrypt
acme.sh --register-account -m my@example.com
# 使用standalone模式申请
acme.sh --issue -d i.yuming.com --standalone
使用DNS验证的方法
shell
acme.sh --issue --dns -d mydomain.com \
--yes-I-know-dns-manual-mode-enough-go-ahead-please
# add dns record and re-run with --renew
acme.sh --renew --dns -d mydomain.com \
--yes-I-know-dns-manual-mode-enough-go-ahead-please
默认证书存储在~/.acme.sh/
目录下
安装证书:
shell
acme.sh --install-cert -d mydomain.com \
--cert-file ~/cer.pem \
--key-file ~/key.pem \
--fullchain-file ~/fullchain.pem
Docker安装
新版docker自带docker compose组件
OFFICAL
shell
curl -fsSL curl -fsSL get.docker.com | sh
国内加速
bash
curl -sSL https://get.daocloud.io/docker | sh
X-UI Offical
shell
bash <(curl -Ls https://raw.githubusercontent.com/vaxilu/x-ui/master/install.sh)
hysteria-script
shell
wget -N --no-check-certificate https://gitlab.com/misakablog/hysteria-script/-/raw/main/hysteria.sh && bash hysteria.sh
Woiden 使用warp无法通过ipv4连接
shell
wg-quick down wgcf
sed -i "7 s/^/PostUp = ip -4 rule add from $(ip route get 1.1.1.1 | grep -oP 'src \K\S+') lookup main\n/" /etc/wireguard/wgcf.conf
sed -i "8 s/^/PostDown = ip -4 rule delete from $(ip route get 1.1.1.1 | grep -oP 'src \K\S+') lookup main\n/" /etc/wireguard/wgcf.conf
wg-quick up wgcf
BBR
来源:秋水逸冰
shell
wget --no-check-certificate -O /opt/bbr.sh https://github.com/teddysun/across/raw/master/bbr.sh
chmod 755 /opt/bbr.sh
/opt/bbr.sh
检查:
uname -r
#查看内核版本,显示为最新版就表示 OK 了
sysctl net.ipv4.tcp_available_congestion_control
#返回值一般为:net.ipv4.tcp_available_congestion_control = bbr cubic reno
#或者为:net.ipv4.tcp_available_congestion_control = reno cubic bbr
sysctl net.ipv4.tcp_congestion_control
#返回值一般为:net.ipv4.tcp_congestion_control = bbr
sysctl net.core.default_qdisc
#返回值一般为:net.core.default_qdisc = fq
lsmod | grep bbr
#返回值有 tcp_bbr 模块即说明 bbr 已启动。注意:并不是所有的 VPS 都会有此返回值,若没有也属正常。
WARP
Misaka(停止维护)
wget -N --no-check-certificate https://raw.githubusercontents.com/misaka-gh/Misaka-WARP-Script/master/misakawarp.sh && bash misakawarp.sh
p3terx
# Cloudflare WARP 一键配置脚本 功能菜单
bash <(curl -fsSL git.io/warp.sh) menu