堪萨斯垃圾场10刀杜甫调教


前言

最近自己用自己调的监控抢了个NOCIX的10刀特价杜甫(16G RAM 128G SSD + 2T HDD + 1Gbps 无限流量) (16G RAM 240G SSD + 2T HDD + 1Gbps 无限流量),仅以此贴记录下自己进行的一些调教,供后人参考

以下内容皆基于Ubuntu 20.04.4 系统,不保证全部系统适用

机器配置

Bandwidth	1Gbit Port: Unmetered
Processor	FX-4350 Quad-Core
Ram	16 GiB
Disk	240 GB 2 TB

上来就进行一个硬盘寿命的检测(sda是固态,sdbHDD)

smartctl -s on --all /dev/sda1 | grep Power_On_Hours
smartctl -s on --all /dev/sdb1 | grep Power_On_Hours

result:

20746
68237

好家伙,属实老盘了,不亏是垃圾场啊(所以建议不要存重要数据)

固态型号:Phison Driven OEM SSDs (smartctl读出来就是群联的SSD , 部分其他脚本读出来是SATA SSD)

HDD型号:TOSHIBA DT01ACA200

硬盘测速:

SATA SSD:
  +-----------+-----------+----------+-----------+----------+
  | 测试项目  | 读取 IOPS | 读取速度 | 写入 IOPS | 写入速度 |
  +-----------+-----------+----------+-----------+----------+
  | Seq-Q32T1 |      1904 | 238 MB/s |      1886 | 235 MB/s |
  | Seq       |       230 | 230 MB/s |       223 | 223 MB/s |
  | 4K-Q32T1  |     33159 | 129 MB/s |     19530 |  76 MB/s |
  | 4K        |      7839 |  30 MB/s |     14791 |  57 MB/s |
  +-----------+-----------+----------+-----------+----------+

HDD:
  +-----------+-----------+----------+-----------+----------+
  | 测试项目  | 读取 IOPS | 读取速度 | 写入 IOPS | 写入速度 |
  +-----------+-----------+----------+-----------+----------+
  | Seq-Q32T1 |       904 | 113 MB/s |       894 | 111 MB/s |
  | Seq       |       115 | 115 MB/s |       117 | 117 MB/s |
  | 4K-Q32T1  |       157 | 630 KB/s |       168 | 675 KB/s |
  | 4K        |        73 | 294 KB/s |       169 | 679 KB/s |
  +-----------+-----------+----------+-----------+----------+

进行一个显卡配置的查

lspci | grep -i vga

result

01:05.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] RS780L [Radeon 3000]

其余配置

CPU:4C AMD FX(tm)-4350 Quad-Core Processor
主板:GA-78LMT-S2P
内存:2条8G 1600MHZ
网卡:Intel Corporation 82574L Gigabit Network Connection
声卡:Advanced Micro Devices, Inc. [AMD/ATI] SBx00 Azalia (Intel HDA)

5IP配置

打开以下路径文件

/etc/netplan/01-netcfg.yaml

修改为如下格式(addresses下面的修改为分配给自己的5个IP,在机器相关的mail里有)

network:
  version: 2
  renderer: networkd
  ethernets:
    enp2s0:
      addresses:
      - 1.1.1.1/29
      - 1.1.1.2/29
      - 1.1.1.3/29
      - 1.1.1.4/29
      - 1.1.1.5/29
      gateway4: x.x.x.x
      nameservers:
          #search: [ nocix.net ]
          addresses:
              - "8.8.8.8"
              - "8.8.4.4"
              - "1.1.1.1"
              #- "127.0.0.1"

然后运行netplan try检测配置是否有问题;最后运行netplan apply应用。然后用ip a查看是否分配5个IP。

至于IPV6则需要发工单要,我的是要了之后就自动配置好了就懒得管了,要自己修改IPV6的去网上搜教程吧(

刷PT建议别用5IP,会有多个客户端的情况

环境配置

中文环境配置

安装CN语言包

apt-get update && apt-get install language-pack-zh-hans

修改配置/etc/default/locale为以下内容,且不能有多余空格

LANG="zh_CN.UTF-8"
LANGUAGE="zh_CN:zh"
LC_NUMERIC="zh_CN"
LC_TIME="zh_CN"
LC_MONETARY="zh_CN"
LC_PAPER="zh_CN"
LC_NAME="zh_CN"
LC_ADDRESS="zh_CN"
LC_TELEPHONE="zh_CN"
LC_MEASUREMENT="zh_CN"
LC_IDENTIFICATION="zh_CN"
LC_ALL="zh_CN.UTF-8"

修改环境/etc/environment,原来有一行 PATH=… 不要动,新建一行粘贴以下内容

LANG="zh_CN.UTF-8"
LANGUAGE="zh_CN:zh"
LC_NUMERIC="zh_CN"
LC_TIME="zh_CN"
LC_MONETARY="zh_CN"
LC_PAPER="zh_CN"
LC_NAME="zh_CN"
LC_ADDRESS="zh_CN"
LC_TELEPHONE="zh_CN"
LC_MEASUREMENT="zh_CN"
LC_IDENTIFICATION="zh_CN"
LC_ALL="zh_CN.UTF-8"

最后重启reboot.

时区修改

tzselect

执行tzselect命令 --> 选择Asia --> 选择China --> 选择east China - Beijing, Guangdong, Shanghai, etc-->然后输入1

修改配置文件

echo "ZONE=Asia/Shanghai" >> /etc/sysconfig/clock
rm -f /etc/localtime
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

此时运行date -R可以看到已经修改为+0800了.

一些应用

smokeping

bash -c "$(curl -L https://github.com/Xiefengshang/smokeping/raw/main/main.sh)"

理论来说按照上述操作修改为中文环境之后不会出现乱码(另外我这台里面的移动IP不知道为啥都没法跑出结果)

线路测试

线路是电信走正常163,联通/移动/教育网走AS4837(即联通扩容后的网段),并且据说他家好像算是上游,我这边基本全天联通/移动不丢包。

详细结果

[Info] 测试路由 到 上海电信(天翼云) 中 ...
traceroute to 101.227.255.45 (101.227.255.45), 30 hops max, 32 byte packets
 1  X.X.X.X  0.29 ms  AS32097  美国, 密苏里州, 堪萨斯城, wholesaleinternet.net
 2  100ge15-2.edge-b.clay.mci.us.as33387.net (192.187.107.125)  0.35 ms  AS33387  美国, 密苏里州, 堪萨斯城, nocix.net
 3  100ge0-30.edge-1.clay.mci.us.as32097.net (69.30.209.210)  0.48 ms  AS32097  美国, 密苏里州, 堪萨斯城, wholesaleinternet.net
 4  100ge11-1.edge-1.swift.mci.us.as32097.net (69.30.209.221)  0.30 ms  AS32097  美国, 密苏里州, 堪萨斯城, wholesaleinternet.net
 5  38.20.20.9  0.88 ms  AS174  美国, 密苏里州, 堪萨斯城, cogentco.com
 6  be2546.ccr21.mci01.atlas.cogentco.com (154.54.30.241)  0.92 ms  AS174  美国, 密苏里州, 堪萨斯城, cogentco.com
 7  be3035.ccr21.den01.atlas.cogentco.com (154.54.5.89)  12.27 ms  AS174  美国, 科罗拉多州, 丹佛, cogentco.com
 8  be3037.ccr21.slc01.atlas.cogentco.com (154.54.41.145)  22.60 ms  AS174  美国, 犹他州, 盐湖城, cogentco.com
 9  be3109.ccr21.sfo01.atlas.cogentco.com (154.54.44.137)  36.76 ms  AS174  美国, 加利福尼亚州, 旧金山, cogentco.com
10  be3669.ccr41.sjc03.atlas.cogentco.com (154.54.43.10)  38.16 ms  AS174  美国, 加利福尼亚州, 圣何塞, cogentco.com
11  38.104.138.106  38.95 ms  AS174  美国, 加利福尼亚州, 圣何塞, cogentco.com
12  *
13  202.97.12.193  184.74 ms  AS4134  中国, 上海, chinatelecom.com.cn, 电信
14  *
15  61.152.25.85  197.55 ms  AS4812  中国, 上海, chinatelecom.com.cn, 电信
16  101.95.207.2  184.36 ms  AS4812  中国, 上海, chinatelecom.com.cn, 电信
17  *
18  *
19  *
20  *
21  *
22  *
23  *
24  *
25  *
26  *
27  *
28  *
29  *
30  *

[Info] 测试路由 到 上海电信(天翼云) 完成 !
[Info] 测试路由 到 厦门电信CN2 中 ...
traceroute to 117.28.254.129 (117.28.254.129), 30 hops max, 32 byte packets
 1  X.X.X.X  11.19 ms  AS32097  美国, 密苏里州, 堪萨斯城, wholesaleinternet.net
 2  100ge15-2.edge-b.clay.mci.us.as33387.net (192.187.107.125)  1.65 ms  AS33387  美国, 密苏里州, 堪萨斯城, nocix.net
 3  100ge0-30.edge-1.clay.mci.us.as32097.net (69.30.209.210)  0.44 ms  AS32097  美国, 密苏里州, 堪萨斯城, wholesaleinternet.net
 4  100ge0-26.edge-2.clay.mci.us.as32097.net (69.30.209.194)  0.61 ms  AS32097  美国, 密苏里州, 堪萨斯城, wholesaleinternet.net
 5  69.30.209.226  0.63 ms  AS32097  美国, 密苏里州, 堪萨斯城, wholesaleinternet.net
 6  219.158.38.137  41.65 ms  AS4837  美国, 加利福尼亚州, 洛杉矶, chinaunicom.com, 联通
 7  219.158.96.41  191.69 ms  AS4837  中国, 北京, chinaunicom.com, 联通
 8  219.158.16.77  189.36 ms  AS4837  中国, 北京, chinaunicom.com, 联通
 9  *
10  219.158.5.130  218.96 ms  AS4837  中国, 北京, chinaunicom.com, 联通
11  219.158.40.166  204.78 ms  AS4837  中国, 北京, chinaunicom.com, 联通
12  59.43.145.62  207.08 ms  *  中国, 广东, 广州, chinatelecom.com.cn, 电信
13  59.43.156.193  216.50 ms  *  中国, 广东, 广州, chinatelecom.com.cn, 电信
14  59.43.46.214  248.88 ms  *  中国, 福建, chinatelecom.com.cn, 电信
15  110.80.128.94  237.37 ms  AS133775  中国, 福建, 厦门, chinatelecom.com.cn, 电信
16  *
17  *
18  *
19  117.28.254.129  233.75 ms  AS4809  中国, 福建, 厦门, chinatelecom.com.cn, 电信

[Info] 测试路由 到 厦门电信CN2 完成 !
[Info] 测试路由 到 浙江杭州联通 中 ...
traceroute to 101.71.241.238 (101.71.241.238), 30 hops max, 32 byte packets
 1  X.X.X.X  2.14 ms  AS32097  美国, 密苏里州, 堪萨斯城, wholesaleinternet.net
 2  100ge15-2.edge-b.clay.mci.us.as33387.net (192.187.107.125)  0.40 ms  AS33387  美国, 密苏里州, 堪萨斯城, nocix.net
 3  100ge0-30.edge-1.clay.mci.us.as32097.net (69.30.209.210)  0.44 ms  AS32097  美国, 密苏里州, 堪萨斯城, wholesaleinternet.net
 4  100ge0-26.edge-2.clay.mci.us.as32097.net (69.30.209.194)  0.55 ms  AS32097  美国, 密苏里州, 堪萨斯城, wholesaleinternet.net
 5  69.30.209.226  0.48 ms  AS32097  美国, 密苏里州, 堪萨斯城, wholesaleinternet.net
 6  219.158.38.137  42.58 ms  AS4837  美国, 加利福尼亚州, 洛杉矶, chinaunicom.com, 联通
 7  219.158.98.9  182.73 ms  AS4837  中国, 北京, chinaunicom.com, 联通
 8  219.158.111.218  208.22 ms  AS4837  中国, 上海, chinaunicom.com, 联通
 9  219.158.113.118  211.25 ms  AS4837  中国, 上海, chinaunicom.com, 联通
10  219.158.113.105  201.92 ms  AS4837  中国, 上海, chinaunicom.com, 联通
11  219.158.15.206  213.61 ms  AS4837  中国, 浙江, 杭州, chinaunicom.com, 联通
12  *
13  *
14  *
15  *
16  *
17  *
18  *
19  *
20  *
21  *
22  *
23  *
24  *
25  *
26  *
27  *
28  *
29  *
30  *

[Info] 测试路由 到 浙江杭州联通 完成 !
[Info] 测试路由 到 浙江杭州移动 中 ...
traceroute to 112.17.0.106 (112.17.0.106), 30 hops max, 32 byte packets
 1  X.X.X.X  0.39 ms  AS32097  美国, 密苏里州, 堪萨斯城, wholesaleinternet.net
 2  100ge15-2.edge-b.clay.mci.us.as33387.net (192.187.107.125)  0.46 ms  AS33387  美国, 密苏里州, 堪萨斯城, nocix.net
 3  100ge0-30.edge-1.clay.mci.us.as32097.net (69.30.209.210)  0.56 ms  AS32097  美国, 密苏里州, 堪萨斯城, wholesaleinternet.net
 4  100ge0-26.edge-2.clay.mci.us.as32097.net (69.30.209.194)  0.61 ms  AS32097  美国, 密苏里州, 堪萨斯城, wholesaleinternet.net
 5  69.30.209.226  0.62 ms  AS32097  美国, 密苏里州, 堪萨斯城, wholesaleinternet.net
 6  219.158.38.137  37.25 ms  AS4837  美国, 加利福尼亚州, 洛杉矶, chinaunicom.com, 联通
 7  219.158.98.9  185.29 ms  AS4837  中国, 北京, chinaunicom.com, 联通
 8  219.158.16.65  178.23 ms  AS4837  中国, 北京, chinaunicom.com, 联通
 9  *
10  219.158.99.6  255.56 ms  AS4837  中国, 浙江, 杭州, chinaunicom.com, 联通
11  *
12  219.158.44.38  245.77 ms  AS4837  中国, 浙江, 杭州, chinaunicom.com, 联通
13  221.183.95.121  261.21 ms  AS9808  中国, 浙江, 杭州, chinamobile.com, 移动
14  *
15  *
16  *
17  *
18  *
19  *
20  *
21  *
22  *
23  *
24  *
25  *
26  *
27  *
28  *
29  *
30  *

[Info] 测试路由 到 浙江杭州移动 完成 !
[Info] 测试路由 到 北京教育网 中 ...
traceroute to 202.205.6.30 (202.205.6.30), 30 hops max, 32 byte packets
 1  X.X.X.X  0.54 ms  AS32097  美国, 密苏里州, 堪萨斯城, wholesaleinternet.net
 2  100ge15-2.edge-b.clay.mci.us.as33387.net (192.187.107.125)  2.52 ms  AS33387  美国, 密苏里州, 堪萨斯城, nocix.net
 3  100ge0-30.edge-1.clay.mci.us.as32097.net (69.30.209.210)  0.47 ms  AS32097  美国, 密苏里州, 堪萨斯城, wholesaleinternet.net
 4  100ge0-26.edge-2.clay.mci.us.as32097.net (69.30.209.194)  0.36 ms  AS32097  美国, 密苏里州, 堪萨斯城, wholesaleinternet.net
 5  69.30.209.226  0.65 ms  AS32097  美国, 密苏里州, 堪萨斯城, wholesaleinternet.net
 6  219.158.38.137  40.53 ms  AS4837  美国, 加利福尼亚州, 洛杉矶, chinaunicom.com, 联通
 7  219.158.98.9  180.79 ms  AS4837  中国, 北京, chinaunicom.com, 联通
 8  219.158.16.65  187.45 ms  AS4837  中国, 北京, chinaunicom.com, 联通
 9  219.158.4.173  236.83 ms  AS4837  中国, 北京, chinaunicom.com, 联通
10  *
11  219.158.9.98  252.48 ms  AS4837  中国, 上海, chinaunicom.com, 联通
12  219.158.44.86  255.86 ms  AS4837  中国, 上海, chinaunicom.com, 联通
13  101.4.118.41  263.84 ms  AS4538  中国, 上海, edu.cn, 教育网
14  101.4.117.30  287.27 ms  AS4538  中国, 北京, edu.cn, 教育网
15  101.4.116.118  282.25 ms  AS4538  中国, 北京, edu.cn, 教育网
16  101.4.112.69  271.35 ms  AS4538  中国, 北京, edu.cn, 教育网
17  101.4.113.110  250.38 ms  AS4538  中国, 北京, edu.cn, 教育网
18  219.224.102.230  269.15 ms  AS4538  中国, 北京, edu.cn, 教育网
19  101.4.130.54  274.96 ms  AS4538  中国, 北京, edu.cn, 教育网
20  *
21  *
22  *
23  101.4.130.54  267.77 ms  AS4538  中国, 北京, edu.cn, 教育网
24  *
25  *
26  *
27  *
28  *
29  101.4.130.54  254.81 ms  AS4538  中国, 北京, edu.cn, 教育网
30  *

AllTube(with yt-dlp)

Copy北冥有鱼大佬的文章

安装ffmpeg:

apt-get update -y && apt-get upgrade
apt-get install ffmpeg

查看yt-dlp支持哪些网站

web设置

域名解析好并指向自己的服务器,宝塔安装好nginxPHP(>=7.3版本)

新建一个网站进入到网站文件目录,删除已有的文件,然后点击上方的远程下载,输入链接:

https://github.com/Rudloff/alltube/releases/download/3.0.3/alltube-3.0.3.zip

然后点击确认,等待下载完毕,直接右键文件解压即可,将解压出来的文件剪切到网站根目录。

然后设置网站的伪静态(Url Rewrite)为以下:

location ~ /\. {
                deny all;
        }
location / {
                try_files $uri /index.php?$args;
        }

然后把PHP函数里边取消禁用popenproc_open函数。

后端处理设置

cd /www/wwwroot/你的网站目录/vendor
wget https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp.tar.gz
tar -zxvf yt-dlp.tar.gz

进入alltube/config文件夹,重命名config-example.ymlconfig.yml,然后打开config.yml,修改里边的配置:

修改youtubedl选项为yt-dlp的目录,我为:vendor/yt-dlp/yt_dlp/__main__.py

修改python选项为python3目录,我为:/usr/bin/python3

修改appName为自己想要的网页题目

其他配置自己看着改

修改完成以后修改/classes目录下的config.php文件,修改内容同上。

(个人是懒得申请证书所以直接用的Cloudflare15年证书,不过需要)

emby crack 服务器搭建

加以下配置

#emby crack
    add_header Access-Control-Allow-Origin *;
    add_header Access-Control-Allow-Headers *;
    add_header Access-Control-Allow-Method *;
    add_header Access-Control-Allow-Credentials true;
    location /admin/service/registration/validateDevice {
        default_type application/json;
        return 200 '{"cacheExpirationDays": 365,"message": "Device Valid","resultCode": "GOOD"}';
    }
    location /admin/service/registration/validate {
        default_type application/json;
        return 200 '{"featId":"","registered":true,"expDate":"2099-01-01","key":""}';
    }
    location /admin/service/registration/getStatus {
        default_type application/json;
        return 200 '{"deviceStatus":"","planType":"Lifetime","subscriptions":{}}';
    }

dll反编译以及回编译自己处理。

PanIndex

下载

架构不同自己改,版本号自己改,目录自己改,端口那些也不用说

mkdir /root/PanIndex
cd /root/PanIndex
wget https://github.com/libsgh/PanIndex/releases/download/v3.0.4/PanIndex-linux-amd64.tar.gz
tar --no-same-owner -xvf PanIndex-linux-amd64.tar.gz
mv PanIndex-linux-amd64 PanIndex
cat > "/root/PanIndex/config.json" << EOF
{
"host": "0.0.0.0",
"port": 15964,
"log_level": "info",
"data_path": "/root/PanIndex/data",
"cert_file": "",
"key_file": "",
"config_query": "",
"db_type": "sqlite",
"dsn": "/root/PanIndex/data/data.db"
}
EOF
rm -rf PanIndex-linux-amd64.tar.gz

编写service文件

新建/etc/systemd/system/PanIndex.service,内容参考如下

[Unit]
Description=PanIndex Service
Documentation=https://libsgh.github.io/PanIndex/
After=network.target
[Service]
User=root
WorkingDirectory=/root/PanIndex
ExecStart=/root/PanIndex/PanIndex -c=/root/PanIndex/config.json
Restart=on-failure
RestartPreventExitStatus=23
LimitNPROC=10000
LimitNOFILE=1000000
[Install]
WantedBy=multi-user.target

参考命令:

systemctl daemon-reload #PanIndex.service有修改重新加载
systemctl start PanIndex #启动PanIndex
systemctl stop PanIndex #停止PanIndex
systemctl restart PanIndex #重启PanIndex
systemctl enable PanIndex #设置开机启动
systemctl disable PanIndex #关闭开机启动
systemctl status PanIndex #查询服务状态
journalctl -u PanIndex.service -f #滚动查看PanIndex日志

nginx反代设置

location / {
   proxy_set_header Host $host;
   proxy_set_header X-Real-IP $remote_addr;
   proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
   proxy_pass http://127.0.0.1:15954;
   client_max_body_size    1000m;
}

配置

默认密码为PanIndex

国内访问速度还行,所以CDN设为本机

展示目录设为/storage/qbittorrent/Downloads

展示Google Drive目录如果有rclone配置就不需要那个跳转url.


文章作者: xieshang
版权声明: 本博客所有文章除特別声明外,均采用 CC BY-NC 4.0 许可协议。转载请注明来源 xieshang !
评论
  目录