常用配置
开启TCP BBR拥塞控制协议
echo "net.core.default_qdisc=fq" >> /etc/sysctl.conf
echo "net.ipv4.tcp_congestion_control=bbr" >> /etc/sysctl.conf
sysctl -p
lsmod | grep bbr # 若出现tcp_bbr字样,则表明设定成功
禁用IPV6
echo "net.ipv6.conf.all.disable_ipv6 = 1" >> /etc/sysctl.conf
echo "net.ipv6.conf.default.disable_ipv6 = 1" >> /etc/sysctl.conf
echo "net.ipv6.conf.lo.disable_ipv6 = 1" >> /etc/sysctl.conf
sysctl -p
ip a | grep inet6 # 如果没有显示任何ipv6地址,则已经完成禁用
修改系统时区
date -R # 查看当前时间和时区
rm -rf /etc/localtime
ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime # 时区改为上海
date -R # 查看修改后时间和时区
添加SWAP虚拟内存
参考我的另一篇内容
测试脚本
Bench
包含:
-
显示当前测试的各种系统信息
-
下载测速
-
IO测试(测试三次,并显示平均值)
脚本命令使用方法:
wget -qO- bench.sh | bash
curl -Lso- bench.sh | bash
SuperBench
包含:
-
I/O测试,更改了原来默认的测试的内容,采用小文件,中等文件,大文件,分别测试IO性能,然后取平均值。
-
速度测试替换成了 Superspeed 里面的测试,第一个默认节点是,Speedtest 默认,其他分别测试到中国电信,联通,移动,各三个不同地区的速度。
-
增加
GEOIP
信息,包含国家,地区,机房,AS
号,分享模式,方便分享测试结果等功能。
使用方法:
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/superbench.sh | bash
yabs.sh
提供硬件信息,测试硬盘和网络速度,CPU跑分(Geekbench)
项目地址:https://github.com/masonr/yet-another-bench-script
使用方法:
curl -sL yabs.sh | bash
wget -qO- yabs.sh | bash
指定参数:
curl -sL yabs.sh | bash -s -- -flags
Flag | Description |
---|---|
-b | Forces use of pre-compiled binaries from repo over local packages |
-f/-d | Disables the fio (disk performance) test |
-i | Disables the iperf (network performance) test |
-g | Disables the Geekbench (system performance) test |
-n | Skips the network information lookup and print out |
-h | Prints the help message with usage, flags detected, and local package (fio/iperf) status |
-r | Reduces the number of iperf locations (Scaleway/Clouvider LON+NYC) to lessen bandwidth usage |
-4 | Runs a Geekbench 4 test and disables the Geekbench 6 test |
-5 | Runs a Geekbench 5 test and disables the Geekbench 6 test |
-9 | Runs both the Geekbench 4 and 5 tests instead of the Geekbench 6 test |
-6 | Re-enables the Geekbench 6 test if any of the following were used: -4, -5, or -9 (-6 flag must be last to not be overridden) |
-j | Prints a JSON representation of the results to the screen |
-w |
Writes the JSON results to a file using the file name provided |
-s |
Sends a JSON representation of the results to the designated URL(s) (see section below) |
SuperSpeed
测试VPS到电信、联通、移动各个地区的下载速度和上传速度
GitHub 地址:https://github.com/zq/superspeed
使用方法:
bash <(curl -Lso- https://git.io/superspeed.sh)
流媒体检测
bash <(curl -L -s https://raw.githubusercontent.com/lmc999/RegionRestrictionCheck/main/check.sh)
或
bash <(curl -L -s media.ispvps.com)
路由检测
- mtrtrace
curl https://raw.githubusercontent.com/zhucaidan/mtr_trace/main/mtr_trace.sh | bash
- backtrace
curl https://raw.githubusercontent.com/zhanghanyun/backtrace/main/install.sh -sSf | sh
- nexttrace
项目地址:https://github.com/nxtrace/Ntrace-core
# 一键安装脚本
bash <(curl -Ls https://raw.githubusercontent.com/sjlleo/nexttrace/main/nt_install.sh)
# 使用方法(更多用法参考github)
nexttrace [ip]
nexttrace --fast-trace
nexttrace --table [ip]
融合怪测试脚本
GitHub项目地址:GitHub - spiritLHLS/ecs: VPS融合怪服务器测评脚本
融合怪命令
curl -L https://gitlab.com/spiritysdx/za/-/raw/main/ecs.sh -o ecs.sh && chmod +x ecs.sh && bash ecs.sh
或
curl -L https://github.com/spiritLHLS/ecs/raw/main/ecs.sh -o ecs.sh && chmod +x ecs.sh && bash ecs.sh
或
bash <(wget -qO- bash.spiritlhl.net/ecs)
IP质量检测
- IP质量检测,含多家数据库查询,含黑名单查询
- 含
IPV4
和IPV6
检测,含ASN和地址查询 - 含25端口的邮箱可达性检测,如果某个邮箱可达,则可搭建邮局
bash <(curl -Ls IP.Check.Place)
或
bash <(wget -qO- --no-check-certificate https://gitlab.com/spiritysdx/za/-/raw/main/qzcheck.sh)
或
bash <(wget -qO- bash.spiritlhl.net/ecs-ipcheck)
或
bash <(wget -qO- --no-check-certificate https://raw.githubusercontent.com/spiritLHLS/ecs/main/qzcheck.sh)