假设已经在/usr/local/natapp下有一个natapp了
进入
cd /usr/local/natapp
复制多一个
cp natapp natapp5
假设已经在/etc/systemd/system 下有一个natapp.service了
进入
cd /etc/systemd/system
复制多一个
cp natapp.service natapp4.service
开始修改这个文件
vi natapp4.service
[Unit]
Description=NatApp Service
Wants=network-online.target
After=network.target
[Service]
Type=simple
ExecStart=/usr/local/natapp/natapp4 -authtoken=xxxxxx -log=stdout
# Suppress stderr to eliminate duplicated messages in syslog. NM calls openlog()
# with LOG_PERROR when run in foreground. But systemd redirects stderr to
# syslog by default, which results in logging each message twice.
StandardOutput=syslog
StandardError=null
[Install]
WantedBy=multi-user.target
其中ExecStart=/usr/local/natapp/natapp4就是指向新的文件,authtoken填写自己的
设置权限:
chmod +777 natapp4.service
设置开机启动:
systemctl enable natapp4.service
立即启动:
systemctl start natapp4.service
来源地址:在linux centos7同时运行多个natapp内网穿透服务
转载声明:本站文章若无特别说明,皆为原创,转载请注明来源:www.88531.cn资享网,谢谢!^^
© 版权声明
文章版权归作者所有,未经允许请勿转载。