SoftEtherVPNのインストール

Last-modified: Fri, 07 Sep 2018 21:41:30 JST (2058d)
Top > SoftEtherVPNのインストール

SoftEtherVPNのインストール

  1. 必要なものをインストール
    sudo apt -y install cmake gcc g++ libncurses5-dev libreadline-dev libssl-dev make zlib1g-dev
  2. GitHubよりCloneしてくる。
    mkdir git
    cd git
    git clone https://github.com/SoftEtherVPN/SoftEtherVPN.git
    cd SoftEtherVPN
    git submodule init && git submodule update
  3. Configure
    ./configure
    • こんなのが出る
      ---------------------------------------------------------------------
      SoftEther VPN for Unix
      
      Copyright (c) SoftEther VPN Project at University of Tsukuba, Japan.
      Copyright (c) Daiyuu Nobori. All Rights Reserved.
      
      This program is free software; you can redistribute it and/or
      modify it under the terms of the GNU General Public License
      version 2 as published by the Free Software Foundation.
      
      Read and understand README.TXT, LICENSE.TXT and WARNING.TXT before use.
      ---------------------------------------------------------------------
      
      Welcome to the corner-cutting configure script !
      
      'rpm' executable not found, CPack will generate DEB packages.
      
      -- The CXX compiler identification is GNU 7.3.0
      -- Check for working CXX compiler: /usr/bin/c++
      -- Check for working CXX compiler: /usr/bin/c++ -- works
      -- Detecting CXX compiler ABI info
      -- Detecting CXX compiler ABI info - done
      -- Detecting CXX compile features
      -- Detecting CXX compile features - done
      -- Configuring done
      -- Generating done
      -- Build files have been written to: /home/dosmania/git/SoftEtherVPN/tmp
      
      The Makefile is generated. Run 'make -C tmp' to build SoftEther VPN.
  4. makeする
    make -C tmp
  5. インストールする
    sudo make -C tmp install
  6. 起動スクリプトを作成
    sudo vi /etc/init.d/vpnserver
    • 以下中身。
      #!/bin/sh
      ### BEGIN INIT INFO
      # Provides: vpnserver
      # Required-Start: $remote_fs $syslog $time
      # Required-Stop: $remote_fs $syslog $time
      # Should-Start: $network $named slapd autofs ypbind nscd nslcd
      # Should-Stop: $network $named slapd autofs ypbind nscd nslcd
      # Default-Start: 2 3 4 5
      # Default-Stop: 0 1 6
      # Short-Description: SoftEther VPN Server
      # Description: SoftEther VPN Server
      ### END INIT INFO
      DAEMON=/usr/local/bin/vpnserver
      LOCK=/var/lock/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
      ;;
      status)
          if [ -e $LOCK ]
          then
              echo "vpnserver is running."
          else
              echo "vpnserver is not running."
          fi
      ;;
      *)
      echo "Usage: $0 {start|stop|restart|status}"
      exit 1
      esac
      exit 0
  7. 実行権限付与
    sudo chmod 755 /etc/init.d/vpnserver
  8. サービスとして登録
    • もし、sysv-rc-confをインストールしていない場合は、不要なサービスの停止参照。
      sudo sysv-rc-conf vpnserver on
  • 注意:
    どうもどこかのバージョンから、/usr/vpn*から/usr/local/libexec/softether/vpn*へ設定ディレクトリが変更になったようです。
    旧バージョンを動かしている場合、インストール後設定が吹き飛びますので、予め/usr/vpn*を/usr/local/libexec/softether/へコピーしたうえでインストールすると、設定が引き継がれます。
    また、プログラム本体の場所も変更されています。当然起動スクリプトのDAEMONパスは変更済みです。

Counter: 748, today: 2, yesterday: 1

このページの参照回数は、748です。