1. 首先先安裝 softether 會使用到的套件

    sudo apt-get install libreadline6-dev libssl-dev lib32ncurses5-dev
  2. 然後用 git 抓官方的 repo 下來

    git clone https://github.com/SoftEtherVPN/SoftEtherVPN.git

    再來做編譯前的設定

    cd SoftEtherVPN
    ./configure

    或者官网下载 https://www.softether-download.com/cn.aspx SoftEtherVPN Server->Linux->Intelx64 /AMD64
    然后运行.install.sh文件,或者运行命令

    make main

    得到3个编译好的文件
    vpnserver、hamcore.se2、vpncmd、lang.config
    复制到/opt/vpnserver文件夹中
    运行

    ./vpncmd  #配置vpnserver
  3. 配置softether系统服务

    vi /etc/systemd/system/softether.service
    [Unit]
    Description=SoftEther VPN Server
    After=network.target
    [Service]
    Type=forking
    ExecStart=/opt/vpnserver/vpnserver start
    ExecStop=/opt/vpnserver/vpnserver stop
    [Install]
    WantedBy=multi-user.target
    systemctl daemon-reload  #服务重载
    systemctl start softether #启动服务
    systemctl enable softether  #开机启动服务