|
|
[root@node1 ~]# mkdir nps && cd nps |
|
|
[root@node1 nps]# wget https://github.com/ehang-io/nps/releases/download/v0.26.10/linux_amd64_server.tar.gz |
|
|
[root@node1 np]# tar -zxvf linux_amd64_server.tar.gz |
|
|
[root@node1 np]# vim conf/nps.conf |
|
|
appname = nps |
|
|
#Boot mode(dev|pro) |
|
|
runmode = dev |
|
|
|
|
|
#HTTP(S) proxy port, no startup if empty |
|
|
http_proxy_ip=0.0.0.0 |
|
|
http_proxy_port=80 ===> 80、443用于主机模式默认端口 |
|
|
https_proxy_port=443 |
|
|
https_just_proxy=true |
|
|
#default https certificate setting |
|
|
https_default_cert_file=conf/server.pem |
|
|
https_default_key_file=conf/server.key |
|
|
|
|
|
##bridge |
|
|
bridge_type=tcp ===> 服务端类型 |
|
|
bridge_port=8024 ===> 8024为网桥端口,用于服务端和客户端之间的通信链接端口 |
|
|
bridge_ip=0.0.0.0 |
|
|
|
|
|
public_vkey=8rehr93fwurfj04j ===> 客户端连接服务端认证使用,是客户端连接服务端的密钥 |
|
|
log_level=7 |
|
|
|
|
|
web_host=a.o.com ===> 服务端web的地址/域名 |
|
|
web_username=admin ===> 服务端web的登陆名 |
|
|
web_password=aa77&88bb ===> 服务端web的登陆密码 |
|
|
web_port = 8080 ===> 8080是web管理访问端口 |
|
|
web_ip=0.0.0.0 |
|
|
web_base_url= ===> 可设置web路径,eg:web_base_url=/nps |
|
|
web_open_ssl=false ===> 服务端是否开启https |
|
|
web_cert_file=conf/server.pem |
|
|
web_key_file=conf/server.key |
|
|
|
|
|
auth_crypt_key =1234567812345678 ===> web api认证ip密钥,可改但必须16位 |
|
|
|
|
|
#allow_ports=9001-9009,10001,11000-12000 ===> 字面意思 |
|
|
|
|
|
#Web management multi-user login |
|
|
allow_user_login=false |
|
|
allow_user_register=false |
|
|
allow_user_change_username=false |
|
|
|
|
|
#extension |
|
|
allow_flow_limit=false |
|
|
allow_rate_limit=false |
|
|
allow_tunnel_num_limit=false |
|
|
allow_local_proxy=false |
|
|
allow_connection_num_limit=false |
|
|
allow_multi_ip=false |
|
|
system_info_display=false |
|
|
|
|
|
#cache |
|
|
http_cache=false |
|
|
http_cache_length=100 |
|
|
|
|
|
#get origin ip |
|
|
http_add_origin_header=true ===> 默认为false |
|
|
|
|
|
#pprof debug options |
|
|
#pprof_ip=0.0.0.0 |
|
|
#pprof_port=9999 |
|
|
|
|
|
#client disconnect timeout(客户端断开超时时间) |
|
|
disconnect_timeout=60 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
安装并启动 |
|
|
执行完下述命令后会把当前的配置文件和web静态文件拷贝到/etc/nps下,以后修改配置文件直接修改 /etc/nps/conf/nps.conf |
|
|
[root@node1 nps]# ./nps install |
|
|
2021/08/03 21:41:13 copy file ::/root/nps/conf/clients.json to /etc/nps/conf/clients.json |
|
|
2021/08/03 21:41:13 copy file ::/root/nps/conf/hosts.json to /etc/nps/conf/hosts.json |
|
|
2021/08/03 21:41:13 copy file ::/root/nps/conf/nps.conf to /etc/nps/conf/nps.conf |
|
|
2021/08/03 21:41:13 copy file ::/root/nps/conf/server.key to /etc/nps/conf/server.key |
|
|
2021/08/03 21:41:13 copy file ::/root/nps/conf/server.pem to /etc/nps/conf/server.pem |
|
|
2021/08/03 21:41:13 copy file ::/root/nps/conf/tasks.json to /etc/nps/conf/tasks.json |
|
|
2021/08/03 21:41:13 copy file ::/root/nps/web/views/client/add.html to /etc/nps/web/views/client/add.html |
|
|
2021/08/03 21:41:13 mkdir:/etc/nps/web/views/client/ |
|
|
2021/08/03 21:41:13 copy file ::/root/nps/web/views/client/edit.html to /etc/nps/web/views/client/edit.html |
|
|
2021/08/03 21:41:13 copy file ::/root/nps/web/views/client/list.html to /etc/nps/web/views/client/list.html |
|
|
2021/08/03 21:41:13 copy file ::/root/nps/web/views/index/add.html to /etc/nps/web/views/index/add.html |
|
|
2021/08/03 21:41:13 mkdir:/etc/nps/web/views/index/ |
|
|
2021/08/03 21:41:13 copy file ::/root/nps/web/views/index/edit.html to /etc/nps/web/views/index/edit.html |
|
|
2021/08/03 21:41:13 copy file ::/root/nps/web/views/index/hadd.html to /etc/nps/web/views/index/hadd.html |
|
|
2021/08/03 21:41:13 copy file ::/root/nps/web/views/index/hedit.html to /etc/nps/web/views/index/hedit.html |
|
|
2021/08/03 21:41:13 copy file ::/root/nps/web/views/index/help.html to /etc/nps/web/views/index/help.html |
|
|
2021/08/03 21:41:13 copy file ::/root/nps/web/views/index/hlist.html to /etc/nps/web/views/index/hlist.html |
|
|
2021/08/03 21:41:13 copy file ::/root/nps/web/views/index/index.html to /etc/nps/web/views/index/index.html |
|
|
2021/08/03 21:41:13 copy file ::/root/nps/web/views/index/list.html to /etc/nps/web/views/index/list.html |
|
|
2021/08/03 21:41:13 copy file ::/root/nps/web/views/login/index.html to /etc/nps/web/views/login/index.html |
|
|
2021/08/03 21:41:13 mkdir:/etc/nps/web/views/login/ |
|
|
2021/08/03 21:41:13 copy file ::/root/nps/web/views/login/register.html to /etc/nps/web/views/login/register.html |
|
|
2021/08/03 21:41:13 copy file ::/root/nps/web/views/public/error.html to /etc/nps/web/views/public/error.html |
|
|
2021/08/03 21:41:13 mkdir:/etc/nps/web/views/public/ |
|
|
2021/08/03 21:41:13 copy file ::/root/nps/web/views/public/layout.html to /etc/nps/web/views/public/layout.html |
|
|
2021/08/03 21:41:13 copy file ::/root/nps/web/static/css/bootstrap-table.min.css to /etc/nps/web/static/css/bootstrap-table.min.css |
|
|
2021/08/03 21:41:13 mkdir:/etc/nps/web/static/css/ |
|
|
2021/08/03 21:41:13 copy file ::/root/nps/web/static/css/bootstrap.min.css to /etc/nps/web/static/css/bootstrap.min.css |
|
|
2021/08/03 21:41:13 copy file ::/root/nps/web/static/css/datatables.css to /etc/nps/web/static/css/datatables.css |
|
|
2021/08/03 21:41:13 copy file ::/root/nps/web/static/css/fontawesome.min.css to /etc/nps/web/static/css/fontawesome.min.css |
|
|
2021/08/03 21:41:13 copy file ::/root/nps/web/static/css/regular.min.css to /etc/nps/web/static/css/regular.min.css |
|
|
2021/08/03 21:41:13 copy file ::/root/nps/web/static/css/solid.min.css to /etc/nps/web/static/css/solid.min.css |
|
|
2021/08/03 21:41:13 copy file ::/root/nps/web/static/css/style.css to /etc/nps/web/static/css/style.css |
|
|
2021/08/03 21:41:13 copy file ::/root/nps/web/static/img/flag/en-US.png to /etc/nps/web/static/img/flag/en-US.png |
|
|
2021/08/03 21:41:13 mkdir:/etc/nps/web/static/img/ |
|
|
2021/08/03 21:41:13 mkdir:/etc/nps/web/static/img/flag/ |
|
|
2021/08/03 21:41:13 copy file ::/root/nps/web/static/img/flag/zh-CN.png to /etc/nps/web/static/img/flag/zh-CN.png |
|
|
2021/08/03 21:41:13 copy file ::/root/nps/web/static/js/bootstrap-table-locale-all.min.js to /etc/nps/web/static/js/bootstrap-table-locale-all.min.js |
|
|
2021/08/03 21:41:13 mkdir:/etc/nps/web/static/js/ |
|
|
2021/08/03 21:41:13 copy file ::/root/nps/web/static/js/bootstrap-table.min.js to /etc/nps/web/static/js/bootstrap-table.min.js |
|
|
2021/08/03 21:41:13 copy file ::/root/nps/web/static/js/bootstrap.min.js to /etc/nps/web/static/js/bootstrap.min.js |
|
|
2021/08/03 21:41:13 copy file ::/root/nps/web/static/js/echarts.min.js to /etc/nps/web/static/js/echarts.min.js |
|
|
2021/08/03 21:41:13 copy file ::/root/nps/web/static/js/fontawesome.min.js to /etc/nps/web/static/js/fontawesome.min.js |
|
|
2021/08/03 21:41:13 copy file ::/root/nps/web/static/js/inspinia.js to /etc/nps/web/static/js/inspinia.js |
|
|
2021/08/03 21:41:13 copy file ::/root/nps/web/static/js/jquery-3.4.1.min.js to /etc/nps/web/static/js/jquery-3.4.1.min.js |
|
|
2021/08/03 21:41:13 copy file ::/root/nps/web/static/js/language.js to /etc/nps/web/static/js/language.js |
|
|
2021/08/03 21:41:13 copy file ::/root/nps/web/static/js/popper.min.js to /etc/nps/web/static/js/popper.min.js |
|
|
2021/08/03 21:41:13 copy file ::/root/nps/web/static/page/error.html to /etc/nps/web/static/page/error.html |
|
|
2021/08/03 21:41:13 mkdir:/etc/nps/web/static/page/ |
|
|
2021/08/03 21:41:13 copy file ::/root/nps/web/static/page/languages.xml to /etc/nps/web/static/page/languages.xml |
|
|
2021/08/03 21:41:13 copy file ::/root/nps/web/static/webfonts/fa-solid-900.eot to /etc/nps/web/static/webfonts/fa-solid-900.eot |
|
|
2021/08/03 21:41:13 mkdir:/etc/nps/web/static/webfonts/ |
|
|
2021/08/03 21:41:13 copy file ::/root/nps/web/static/webfonts/fa-solid-900.svg to /etc/nps/web/static/webfonts/fa-solid-900.svg |
|
|
2021/08/03 21:41:13 copy file ::/root/nps/web/static/webfonts/fa-solid-900.ttf to /etc/nps/web/static/webfonts/fa-solid-900.ttf |
|
|
2021/08/03 21:41:13 copy file ::/root/nps/web/static/webfonts/fa-solid-900.woff to /etc/nps/web/static/webfonts/fa-solid-900.woff |
|
|
2021/08/03 21:41:13 copy file ::/root/nps/web/static/webfonts/fa-solid-900.woff2 to /etc/nps/web/static/webfonts/fa-solid-900.woff2 |
|
|
2021/08/03 21:41:13 install ok! |
|
|
2021/08/03 21:41:13 Static files and configuration files in the current directory will be useless |
|
|
2021/08/03 21:41:13 The new configuration file is located in /etc/nps you can edit them |
|
|
2021/08/03 21:41:13 You can start with: |
|
|
nps start|stop|restart|uninstall|update or nps-update update |
|
|
anywhere! |
|
|
|
|
|
|
|
|
启动nps服务端服务 |
|
|
[root@node1 nps]# ./nps start |
|
|
[root@node1 nps]# netstat -anpt | egrep '(8080|8024)' |
|
|
tcp6 0 0 :::8080 :::* LISTEN 11369/nps |
|
|
tcp6 0 0 :::8024 :::* LISTEN 11369/nps |