本链接内容后续大概率不会再更新,有需求的请访问下面的链接获取最新使用说明

https://gitee.com/liumou_site/pvet/blob/master/model/tt/README.md

参数说明


root@l ~ # python3 TTNODE.py -l
edsnode
edsnodeh
jsnode
jsnodeh
kanode
ksnode
ksnodea
ksnodeh
lsnode
qynode
root@l ~ # python3 TTNODE.py -h
usage: 甜糖二进制安装 [-h] [-d DIR] [-c CACHE] [-u URL] [-b BUSINESS] [-v VER] [-l] [-f] [-update]

当前脚本版本: 2.0

options:
  -h, --help            show this help message and exit
  -d DIR, --dir DIR     设置执行文件存放目录,默认: /data/tt/bin(不存在则自动创建)
  -c CACHE, --cache CACHE
                        设置数据缓存目录,默认:/data/tt/node(不存在则终止,[ByNode]业务除外)
  -u URL, --url URL     自定义二进制文件下载链接,当设置此参数后后面的版本相关设置将无效
  -b BUSINESS, --business BUSINESS
                        设置业务类型,默认:qynode
  -v VER, --ver VER     设置部署版本,默认: 1.5.9
  -l                    查看业务列表
  -f                    清除已有的系统定时任务后再添加任务,默认不清除
  -update               源索引(apt update)更新
root@l ~ # 

安装命令

默认参数部署

首先设置默认站点

使用码云

url=https://gitee.com/liumou_site/pvet/raw/master/model/tt

使用专用下载

url=https://down.liumou.site/pve/tt

然后再执行下面的命令

f=TTNODE.py;rm -f $f;wget  ${url}/$f&&python3 $f -i ${url}

每个版本更新内容请看 https://gitee.com/liumou_site/pvet

部署BYNode业务

f=TTNODE.py;rm -f $f;wget  ${url}/$f;python3 $f -i ${url} -b bynode

此业务只能部署在物理机上

效果

root@T1:~# url=https://down.liumou.site/pve/tt
root@T1:~# f=TTNODE.py;rm -f $f;wget  ${url}/$f;python3 $f -i ${url}
--2024-04-12 05:38:58--  https://down.liumou.site/pve/tt/TTNODE.py
Resolving down.liumou.site (down.liumou.site)... 106.55.188.168
Connecting to down.liumou.site (down.liumou.site)|106.55.188.168|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 11069 (11K) [application/octet-stream]
Saving to: 'TTNODE.py'

TTNODE.py                                100%[================================================================================>]  10.81K  --.-KB/s    in 0s      

2024-04-12 05:39:03 (154 MB/s) - 'TTNODE.py' saved [11069/11069]

----------------配置信息------------
------执行文件下载链接: https://cos.tiptime.cn/ttmanager2/1.5.9/ttmanager_amd64 --
------执行文件保存路径: /data/ --
------缓存路径: /data/tt/node --
------文件路径: /data/ttmanager_amd64 --
2024-04-12 05:39:05,656 [INFO] TTNODE.py:177 | download | 二进制执行文件下载成功: /data/ttmanager_amd64
  com.liumou.ttnode.service              loaded    active   running   This is a TTNODE
Removed "/etc/systemd/system/multi-user.target.wants/com.liumou.ttnode.service".
Created symlink /etc/systemd/system/multi-user.target.wants/com.liumou.ttnode.service → /etc/systemd/system/com.liumou.ttnode.service.
可使用下面的命令进行管理
systemctl enable com.liumou.ttnode.service # 设置开机自启(已设置)
systemctl disable com.liumou.ttnode.service # 取消开机自启
systemctl restart com.liumou.ttnode.service # 重启服务
systemctl start com.liumou.ttnode.service # 启动服务
systemctl status com.liumou.ttnode.service # 查看服务状态
journalctl  -u com.liumou.ttnode.service # 查看日志
2024-04-12 05:39:06,408 [INFO] TTNODE.py:279 | start | Configuration completed
打开APP,进入心愿界面,点击右边中间的闪电输入我的邀请码支持一下吧
512267
root@T1:~# 

已使用systemctl进行管理

root@jmk:/tt# systemctl status com.liumou.ttnode.service # 查看服务状态
● com.liumou.ttnode.service - This is a TTNODE
     Loaded: loaded (/etc/systemd/system/com.liumou.ttnode.service; enabled; preset: enabled)
     Active: active (running) since Fri 2024-04-12 10:36:04 CST; 42s ago
   Main PID: 7095 (run.sh)
      Tasks: 16 (limit: 23151)
     Memory: 15.5M
        CPU: 131ms
     CGroup: /system.slice/com.liumou.ttnode.service
             ├─7095 /bin/bash /tt/bin/run.sh
             └─7104 /tt/bin/ttmanager_amd64

Apr 12 10:36:04 jmk systemd[1]: Started com.liumou.ttnode.service - This is a TTNODE.
Apr 12 10:36:04 jmk com.liumou.ttnode[7095]: PID 写入成功
Apr 12 10:36:04 jmk com.liumou.ttnode[7098]: /tt/bin/ttmanager_amd64
Apr 12 10:36:04 jmk com.liumou.ttnode[7095]: 启动程序,启动命令【/tt/bin/ttmanager_amd64  > /dev/null 2>&1 &】
root@jmk:/tt# 

查看端口

root@jmk:/tt# ss -ntlp
State   Recv-Q   Send-Q     Local Address:Port     Peer Address:Port  Process                                                                                                                                     
LISTEN  0        100            127.0.0.1:25            0.0.0.0:*      users:(("master",pid=1060,fd=13))                                                                                                          
LISTEN  0        4096           127.0.0.1:85            0.0.0.0:*      users:(("pvedaemon worke",pid=1109,fd=6),("pvedaemon worke",pid=1108,fd=6),("pvedaemon worke",pid=1107,fd=6),("pvedaemon",pid=1106,fd=6))  
LISTEN  0        128              0.0.0.0:22            0.0.0.0:*      users:(("sshd",pid=883,fd=3))                                                                                                              
LISTEN  0        4096             0.0.0.0:111           0.0.0.0:*      users:(("rpcbind",pid=719,fd=4),("systemd",pid=1,fd=97))                                                                                   
LISTEN  0        4096           127.0.0.1:9184          0.0.0.0:*      users:(("ipes",pid=8642,fd=15))                                                                                                            
LISTEN  0        4096           127.0.0.1:9183          0.0.0.0:*      users:(("ipes",pid=8642,fd=10),("ipes",pid=8642,fd=4))                                                                                     
LISTEN  0        100                [::1]:25               [::]:*      users:(("master",pid=1060,fd=14))                                                                                                          
LISTEN  0        4096                   *:3128                *:*      users:(("spiceproxy work",pid=1124,fd=6),("spiceproxy",pid=1123,fd=6))                                                                     
LISTEN  0        128                 [::]:22               [::]:*      users:(("sshd",pid=883,fd=4))                                                                                                              
LISTEN  0        4096                [::]:111              [::]:*      users:(("rpcbind",pid=719,fd=6),("systemd",pid=1,fd=99))                                                                                   
LISTEN  0        4096                   *:1024                *:*      users:(("ttmanager_amd64",pid=7104,fd=14))                                                                                                 
LISTEN  0        4096                   *:8006                *:*      users:(("pveproxy worker",pid=1119,fd=6),("pveproxy worker",pid=1118,fd=6),("pveproxy worker",pid=1117,fd=6),("pveproxy",pid=1116,fd=6))   
root@jmk:/tt# 

停止服务

root@jmk:/tt# ss -ntlp
State   Recv-Q   Send-Q     Local Address:Port     Peer Address:Port  Process                                                                                                                                     
LISTEN  0        100            127.0.0.1:25            0.0.0.0:*      users:(("master",pid=1060,fd=13))                                                                                                          
LISTEN  0        4096           127.0.0.1:85            0.0.0.0:*      users:(("pvedaemon worke",pid=1109,fd=6),("pvedaemon worke",pid=1108,fd=6),("pvedaemon worke",pid=1107,fd=6),("pvedaemon",pid=1106,fd=6))  
LISTEN  0        128              0.0.0.0:22            0.0.0.0:*      users:(("sshd",pid=883,fd=3))                                                                                                              
LISTEN  0        4096             0.0.0.0:111           0.0.0.0:*      users:(("rpcbind",pid=719,fd=4),("systemd",pid=1,fd=97))                                                                                   
LISTEN  0        4096           127.0.0.1:9184          0.0.0.0:*      users:(("ipes",pid=8642,fd=15))                                                                                                            
LISTEN  0        4096           127.0.0.1:9183          0.0.0.0:*      users:(("ipes",pid=8642,fd=10),("ipes",pid=8642,fd=4))                                                                                     
LISTEN  0        100                [::1]:25               [::]:*      users:(("master",pid=1060,fd=14))                                                                                                          
LISTEN  0        4096                   *:3128                *:*      users:(("spiceproxy work",pid=1124,fd=6),("spiceproxy",pid=1123,fd=6))                                                                     
LISTEN  0        128                 [::]:22               [::]:*      users:(("sshd",pid=883,fd=4))                                                                                                              
LISTEN  0        4096                [::]:111              [::]:*      users:(("rpcbind",pid=719,fd=6),("systemd",pid=1,fd=99))                                                                                   
LISTEN  0        4096                   *:1024                *:*      users:(("ttmanager_amd64",pid=7104,fd=14))                                                                                                 
LISTEN  0        4096                   *:8006                *:*      users:(("pveproxy worker",pid=1119,fd=6),("pveproxy worker",pid=1118,fd=6),("pveproxy worker",pid=1117,fd=6),("pveproxy",pid=1116,fd=6))   
root@jmk:/tt# systemctl stop com.liumou.ttnode.service 
root@jmk:/tt# ss -ntlp
State   Recv-Q   Send-Q     Local Address:Port     Peer Address:Port  Process                                                                                                                                     
LISTEN  0        100            127.0.0.1:25            0.0.0.0:*      users:(("master",pid=1060,fd=13))                                                                                                          
LISTEN  0        4096           127.0.0.1:85            0.0.0.0:*      users:(("pvedaemon worke",pid=1109,fd=6),("pvedaemon worke",pid=1108,fd=6),("pvedaemon worke",pid=1107,fd=6),("pvedaemon",pid=1106,fd=6))  
LISTEN  0        128              0.0.0.0:22            0.0.0.0:*      users:(("sshd",pid=883,fd=3))                                                                                                              
LISTEN  0        4096             0.0.0.0:111           0.0.0.0:*      users:(("rpcbind",pid=719,fd=4),("systemd",pid=1,fd=70))                                                                                   
LISTEN  0        4096           127.0.0.1:9183          0.0.0.0:*      users:(("ipes",pid=21109,fd=7),("ipes",pid=21109,fd=3))                                                                                    
LISTEN  0        100                [::1]:25               [::]:*      users:(("master",pid=1060,fd=14))                                                                                                          
LISTEN  0        4096                   *:3128                *:*      users:(("spiceproxy work",pid=1124,fd=6),("spiceproxy",pid=1123,fd=6))                                                                     
LISTEN  0        128                 [::]:22               [::]:*      users:(("sshd",pid=883,fd=4))                                                                                                              
LISTEN  0        4096                [::]:111              [::]:*      users:(("rpcbind",pid=719,fd=6),("systemd",pid=1,fd=72))                                                                                   
LISTEN  0        4096                   *:8006                *:*      users:(("pveproxy worker",pid=1119,fd=6),("pveproxy worker",pid=1118,fd=6),("pveproxy worker",pid=1117,fd=6),("pveproxy",pid=1116,fd=6))   
root@jmk:/tt# ls bin/^C
root@jmk:/tt# systemctl start com.liumou.ttnode.service 
root@jmk:/tt# systemctl status com.liumou.ttnode.service 
● com.liumou.ttnode.service - This is a TTNODE
     Loaded: loaded (/etc/systemd/system/com.liumou.ttnode.service; enabled; preset: enabled)
     Active: active (running) since Fri 2024-04-12 10:47:21 CST; 9s ago
   Main PID: 21570 (run.sh)
      Tasks: 16 (limit: 23151)
     Memory: 13.1M
        CPU: 140ms
     CGroup: /system.slice/com.liumou.ttnode.service
             ├─21570 /bin/bash /tt/bin/run.sh
             └─21583 /tt/bin/ttmanager_amd64

Apr 12 10:47:21 jmk systemd[1]: Started com.liumou.ttnode.service - This is a TTNODE.
Apr 12 10:47:21 jmk com.liumou.ttnode[21570]: PID 写入成功
Apr 12 10:47:21 jmk com.liumou.ttnode[21576]: /tt/bin/ttmanager_amd64
Apr 12 10:47:21 jmk com.liumou.ttnode[21570]: 启动程序,启动命令【/tt/bin/ttmanager_amd64  > /dev/null 2>&1 &】