ehang-io / nps

一款轻量级、高性能、功能强大的内网穿透代理服务器。支持tcp、udp、socks5、http等几乎所有流量转发,可用来访问内网网站、本地支付接口调试、ssh访问、远程桌面,内网dns解析、内网socks5代理等等……,并带有功能强大的web管理端。a lightweight, high-performance, powerful intranet penetration proxy server, with a powerful web management terminal.
https://ehang.io/nps/documents
GNU General Public License v3.0
29.75k stars 5.37k forks source link

在rocky Linux9.1上npc install 启动异常 #1171

Open bystart opened 1 year ago

bystart commented 1 year ago

[root@rocky-kvm ~]# npc status 2023/02/18 01:00:42.423 [I] [npc.go:231] the version of client is 0.26.10, the core version of client is 0.26.0 2023/02/18 01:00:42.424 [E] [control.go:94] Config file conf/npc.conf loading error open conf/npc.conf: no such file or directory

EyoungShieh1992 commented 1 year ago

这个估计需要进行适配,调整安装路径来解决

Jas0n0ss commented 9 months ago

[root@rocky-kvm ~]# npc status 2023/02/18 01:00:42.423 [I] [npc.go:231] the version of client is 0.26.10, the core version of client is 0.26.0 2023/02/18 01:00:42.424 [E] [control.go:94] Config file conf/npc.conf loading error open conf/npc.conf: no such file or directory

You should define your conf path in /etc/systemd/system/Npc.service , add -config=<conf path>

vim /etc/systemd/system/Npc.service
...
ExecStart=/opt/npc/npc "-debug=true" "-config=/opt/npc/conf/npc.conf"
...
systemctl daemon-reload && systemctl restart Npc  && systemctl status Npc 
# monitor the log if anything wrong
tail -f /var/log/npc.log