next up previous contents
Next: vpncmd 命令設定 vpnserver Up: SoftEther VPN Previous: 前言   Contents

SoftEther Server 安裝

  1. SoftEther 下載 SoftEther Download Center
    [root@dyw219 ~]# cd /usr/src/
    [root@dyw219 src]# wget http://www.softether-download.com/files/softether/\
    v4.21-9613-beta-2016.04.24-tree/Linux/SoftEther_VPN_Server/\
    64bit_-_Intel_x64_or_AMD64/\
    softether-vpnserver-v4.21-9613-beta-2016.04.24-linux-x64-64bit.tar.gz
    
  2. 解壓縮及解打包,檔案在 vpnserver 目錄。
    [root@dyw219 src]# tar zxvf softether-vpnserver-v4.21-9613-beta-2016.04.24-linux-x64-64bit.tar.gz
    
  3. 進入 vpnserver 目錄進行 make 編譯程式,過程中全部回答 yes。
    [root@dyw219 src]# cd vpnserver
    [root@dyw219 vpnserver]# make
    
  4. 建立 /usr/local/vpnserver 將 vpn server 執行檔案複製到此目錄。
    [root@dyw219 vpnserver]# mkdir /usr/local/vpnserver
    [root@dyw219 vpnserver]# cp vpnserver vpncmd hamcore.se2 /usr/local/vpnserver/
    
  5. 產生 vpnserver 服務啟動、關閉執行腳本如下:
    [root@dyw219 vpnserver]# vim /etc/init.d/vpnserver
    [root@dyw219 vpnserver]# cat /etc/init.d/vpnserver
    #!/bin/sh
    # chkconfig: 2345 99 01
    # description: SoftEther VPN Server
    DAEMON=/usr/local/vpnserver/vpnserver
    LOCK=/var/lock/subsys/vpnserver
    test -x $DAEMON || exit 0
    case "$1" in
    	start)
    		$DAEMON start
    		touch $LOCK
    		;;
    	stop)
    		$DAEMON stop
    		rm $LOCK
    		;;
    	restart)
    		$DAEMON stop
    		sleep 3
    		$DAEMON start
    		;;
    	*)
    		echo "Usage: $0 {start|stop|restart}"
    		exit 1
    esac
    exit 0
    
  6. 將 vpnserver 腳本設定成可執行並啟動。
    [root@dyw219 vpnserver]# chmod 755 /etc/init.d/vpnserver
    [root@dyw219 vpnserver]# /etc/init.d/vpnserver start
    The SoftEther VPN Server service has been started.
    



2018-01-11