Izumi123
155 字
1 分钟
皎月连 Linux 二进制版配置
在 Linux 服务器上配置皎月连(NatPierce)内网穿透工具,使用 systemd 管理服务。
下载
从 官网下载页面 获取 Linux 二进制版本。
配置并运行
- 创建目录
/opt/natpierce
mkdir -p /opt/natpierce-
将解压后的二进制文件移动到
/opt/natpierce -
赋予执行权限
chmod +x /opt/natpierce/natpierce- 配置 systemd 服务
创建 service 配置文件:
vim /etc/systemd/system/natpierce.service写入以下内容:
[Unit]Description=Natpierce Tunnel ServiceAfter=network-online.targetWants=network-online.target
[Service]WorkingDirectory=/opt/natpierceExecStart=/opt/natpierce/natpierceRestart=alwaysRestartSec=5User=root# 日志直接走 systemd journalStandardOutput=journalStandardError=journal
[Install]WantedBy=multi-user.target- 重新加载 systemd
systemctl daemon-reload- 启动并设为开机自启
systemctl enable --now natpierce.service- 查看运行状态 / 日志
systemctl status natpierce.servicejournalctl -u natpierce.service -f 皎月连 Linux 二进制版配置
https://zhuyuqinlan.top/post/20260719184735/
评论
发表评论