选择Linux系统版本
获取安装包 :https://www.shenzhuohl.com/download.html
这里以Ubuntu 18.04为例,其它版本方法类似
登录Ubuntu操作系统:
-
打开Ubuntu系统终端,更新版本
apt-get update
安装运行环境:
-
安装C++ 运行环境 切换到root 权限安装运行环境
sudo su
apt-get install g++
如果是Centos系统,输入以下命令进行系统初始化(其它步骤和Ubuntu一致)
yum install gcc gcc-c++ wget -y
下载和安装神卓互联内网穿透客户端:
mkdir /usr/local/shenzhuo
cd /usr/local/shenzhuo
下载完成后执行以下命令进行解压
tar -xf shenzhuo.tar
解压成功后得到两个文件,分别为client和libprotobuf.so.28,(运行时请确保libprotobuf.so.28这个依赖文件和client在同一个目录下)
给运行权限赋值
chmod +x client
注册系统服务和开机自启动
编写脚本
vi /etc/systemd/system/shenzhuo.service
[Unit]
Description=shenzhuohulian Service
After=network.target
[Service]
Type=simple
WorkingDirectory=/usr/local/shenzhuo
ExecStart=/usr/local/shenzhuo/client 18800000000 123456
ExecStop=/bin/kill -2
Restart=always
StartLimitBurst=0
[Install]
WantedBy=multi-user.target
-
使配置文件生效
chmod +x /etc/systemd/system/shenzhuo.service
systemctl daemon-reload
systemctl restart shenzhuo
systemctl enable shenzhuo
systemctl enable shenzhuo
到此,Linux版已安装完成,如您在控制台创建或者修改了映射通道后,需要重启服务生效,即
systemctl restart shenzhuo