登陆linux vps.
安装go环境,然后安装nami:
cd $GOPATH
go get -u -v github.com/txthinking/nami/
(go的版本须最高为1.15.x;高于1.15.x的go的版本是不行的。)
然后,nami install github.com/brook-community/boa
显示:
+-------------------+--------------------------------+
| Package | github.com/brook-community/boa |
| | |
| Installed Version | v20210214 |
| Installed Files | boa |
+-------------------+--------------------------------+
[root@racknerd-7b97d8 ~]# which boa
/usr/bin/which: no boa in (/root/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/go/bin:/root/go/gopath/bin:/usr/local/nginx/sbin:/root/bin)
[root@racknerd-7b97d8 ~]# find / -name boa
/root/.nami/bin/boa
[root@racknerd-7b97d8 ~]# echo 'export PATH=$PATH:/root/.nami/bin' >> /etc/profile
[root@racknerd-7b97d8 ~]# . /etc/profile
使用例子:
boa ipsec start
reboot
这样,即可使strongswan vpn的启动命令随着vps的启动/重启而自动运行。再也不用像以前那样,每次重启vps后,还需手动运行命令:ipsec start
项目地址:
https://github.com/txthinking/nami
https://github.com/brook-community/boa
https://github.com/brook-community/boa/issues/1
相关帖子:https://briteming.blogspot.com/2016/03/ipsecikev2-vpn.html
No comments:
Post a Comment