N1小钢炮安装zerotier 进行内网穿透
默认你有一定的Linux基础。 假设N1 ip是192.168.0.100 那么 ssh root@192.168.0.100 输入密码进入N1
一、安装entware
cd /opt
wget -O - http://bin.entware.net/aarch64-k3.10/installer/alternative.sh | sh
mv /usr/bin/opkg /usr/bin/opkg_bak
二、配置entware环境变量
vim /etc/profile
直接在前面/usr/sbin:这行下直接添加下面两行并保存退出(ESC+:wq+Enter)
/opt/bin:
/opt/sbin:
使配置生效
source /etc/profile
三、检查entware环境安装情况看是否报错
opkg update
opkg list
四、安装zerotier
opkg install zerotier
启动zerotier
zerotier-one -d
配置开启自启
vim /etc/init.d/S60zerotier
写入以下内容保存:
链接: pan.baidu.com 提取码: 9ptg
#!/bin/sh
NAME=zerotier-one
DAEMON=/opt/bin/$NAME
DAEMON_ARGS=""
do_start() {
echo -n "Starting $NAME: "
$DAEMON -d
}
do_stop() {
echo -n "Stopping $NAME: "
pkill $NAME
}
case "$1" in
start)
do_start
;;
stop)
do_stop
;;
restart)
do_stop
sleep 1
do_start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
然后给予权限:
chmod 777 /etc/init.d/S60zerotier