nps/docs/nps_use.md

48 lines
1.2 KiB
Markdown
Raw Normal View History

2019-12-14 09:27:00 +00:00
# 使用
2019-12-13 00:57:00 +00:00
**提示使用web模式时服务端执行文件必须在项目根目录否则无法正确加载配置文件**
2019-12-14 09:27:00 +00:00
## web管理
2019-12-13 00:57:00 +00:00
进入web界面公网ip:web界面端口默认8080密码默认为123
进入web管理界面有详细的说明
2019-12-14 09:27:00 +00:00
## 服务端配置文件重载
2019-12-15 03:34:52 +00:00
对于linux、darwin
2019-12-13 00:57:00 +00:00
```shell
2019-12-14 09:27:00 +00:00
sudo nps reload
2019-12-13 00:57:00 +00:00
```
2019-12-15 03:34:52 +00:00
对于windows
```shell
nps.exe reload
```
2019-12-13 00:57:00 +00:00
**说明:** 仅支持部分配置重载,例如`allow_user_login` `auth_crypt_key` `auth_key` `web_username` `web_password` 等,未来将支持更多
2019-12-14 09:27:00 +00:00
## 服务端停止或重启
2019-12-15 03:34:52 +00:00
对于linux、darwin
```shell
sudo nps stop|restart
```
对于windows
```shell
nps.exe stop|restart
```
## 服务端更新
2020-02-09 08:00:11 +00:00
请首先执行 `sudo nps stop` 或者 `nps.exe stop` 停止运行,然后
2019-12-15 03:34:52 +00:00
对于linux
2019-12-13 00:57:00 +00:00
```shell
2019-12-15 03:34:52 +00:00
sudo nps-update update
2019-12-13 00:57:00 +00:00
```
2019-12-15 03:34:52 +00:00
对于windows
```shell
nps-update.exe update
```
2020-02-09 08:00:11 +00:00
更新完成后,执行执行 `sudo nps start` 或者 `nps.exe start` 重新运行即可完成升级
2019-12-27 03:12:46 +00:00
如果无法更新成功可以直接自行下载releases压缩包然后覆盖原有的nps二进制文件和web目录
2020-02-09 08:00:11 +00:00
2020-02-09 08:15:16 +00:00
注意:`nps install` 之后的 nps 不在原位置,请使用 `whereis nps` 查找具体目录覆盖 nps 二进制文件