nps服务器安装教程

debian 或 ubuntu 为例:

mkdir nps && cd nps

到Releases · ehang-io/nps · GitHub下载对应平台的版本,
tar zxvf linux_amd64_server.tar.gz -C nps

对应mips平台官方编译的二进制文件在mt7621等平台无法运行
需要使用Golang1.10版本编译时带上GOMIPS=softfloat  进行编译即可
或make kernel_menuconfig 然后找到MIPS FPU Emulator,先上FPU支持即可

https://github.com/nwct/downloads 这里有编译ok的mips二进制文件下载

设置开机自启:
tee /lib/systemd/system/nps.service <<-'EOF'
[Unit]
Description=nps server
After=network.target
Documentation=https://github.com/cnlh/nps
[Service]
User=root
Group=root
ExecStart=/root/nps/nps
Restart=always
RestartSec=30s
[Install]
WantedBy=multi-user.target
EOF

systemctl enable nps
systemctl daemon-reload
systemctl restart nps
# 查看日志, 是否启动
journalctl -f -u nps


在/root/nps/conf/nps.conf这个文件中改用户名和密码,修改后systemctl restart nps  重启nps

你可能感兴趣的:(服务器,ubuntu,linux)