1.安装系统常用软件包,编译安装使用
apt update && apt install lrzsz vim wget bash-completion net-tools make gcc cmake -y
2.官网
https://www.softether-download.com/
3.下载源码包
wget https://www.softether-download.com/files/softether/v4.42-9798-rtm-2023.06.30-tree/Linux/SoftEther_VPN_Server/64bit_-_Intel_x64_or_AMD64/softether-vpnserver-v4.42-9798-rtm-2023.06.30-linux-x64-64bit.tar.gz
4.解压源码包,并解压到/usr/local/下
tar -xf softether-vpnserver-v4.42-9798-rtm-2023.06.30-linux-x64-64bit.tar.gz -C /usr/local/
5.进入到源码目录里
cd /usr/local/vpnserver/
6.编译源码,不需要安装
make
7.手动启动服务
/usr/local/vpnserver/vpnserver start
8.把vpnserver添加到系统服务,以下内容直接一起复制,然后直接粘贴到命令行里面最后回车就行
cat > /lib/systemd/system/vpnserver.service <<EOF [Unit] Description=vpnserver service After=network.target [Service] Type=forking ExecStart=/usr/local/vpnserver/vpnserver start #ExecReload=/usr/local/vpnserver/vpnserver ExecStop=/usr/local/vpnserver/vpnserver stop PrivateTmp=true [Install] WantedBy=multi-user.target EOF
9.添加vpnserver到系统服务,并设置为开机自启动
systemctl daemon-reload systemctl enable vpnserver.service --now