- 需搭配v2board等面板
- CentOS 需要先关闭 SELinux
sed -i 's/enforcing/disabled/g' /etc/selinux/config /etc/selinux/config
修改完之后 reboot 重启系统
- 修改如下配置,执行
(yum install curl 2> /dev/null || apt install curl 2> /dev/null) \
&& curl -L -s https://bit.ly/3esZ7ec \
| WEB_API="面板地址" \ #面板的站点url
NODE_ID="节点ID" \ #添加的节点的id
TOKEN="通信密钥" \ #面板服务端自己设置的通信密钥
NODE_HOST="节点域名" \ #已添加a记录的节点域名
LICENSE="授权码" \ #社区版留空
bash
例子
(yum install curl 2> /dev/null || apt install curl 2> /dev/null) \
&& curl -L -s https://bit.ly/3esZ7ec \
| WEB_API="https://a.bb.com" \
NODE_ID="12" \
TOKEN="NIDE20SHIGEJ88LKJ" \
NODE_HOST="b.cc.us" \
LICENSE="" \
bash
- 执行启动命令
systemctl start trojanp
- 查看状态 ,显示 Active: active (running) 表示正常运行
systemctl status trojanp
- 其他命令
curl -L -s https://bit.ly/3esZ7ec | bash #更新
curl -L -s https://bit.ly/2Jl9bs7 | bash #卸载
journalctl -x -n 300 --no-pager -u trojanp #日志
systemctl stop trojanp #停止