LoginSignup
9
7

無料のGRC代替クラウドサービス「Serposcope」をConoHaで動かす

Last updated at Posted at 2017-01-15

Conohaにサーバーを立てる

メモリ512MBのプランなら月630円。

bacbe5e559115dad87f60d973511c005[1].png

Serposcopeを動かすためのアレコレを入れていきます。

Nginxのインストールと設定

まずはNginx。

$ yum -y install nginx

Serposcopeを /var/www/serposcope に入れる前提で設定していきます。
また、URLに :7134 をつけるのもスマートじゃない感じがするので、ポート80に来たアクセスを7134に振るようにしておきます。

/etc/nginx/nginx.conf

    server {
        listen       80 default_server;
        listen       [::]:80 default_server;
        server_name  _;
        root         /var/www/serposcope;

        # Load configuration files for the default server block.
        include /etc/nginx/default.d/*.conf;

        location / {
            root              /var/www/serposcope;
            proxy_pass        http://127.0.0.1:7134;
            proxy_set_header  X-Forwarded-Host $host;
        }

        error_page 404 /404.html;
            location = /40x.html {
        }

        error_page 500 502 503 504 /50x.html;
            location = /50x.html {
        }
    }

終わったら設定を反映するための再起動と、Nginxが自動で起動するよう設定しておきます。

$ systemctl restart nginx
$ systemctl enable nginx

Serposcopeのインストール

まずはSerposcopeの動作に欠かせないJavaをインストールします。

$ yum -y install java-1.8.0-openjdk.x86_64

次に、 /var/www/serposcope ディレクトリを作ってSerposcopeをインストールします。

$ mkdir -p /var/www/serposcope
$ cd /var/www/serposcope
$ wget https://serposcope.serphacker.com/download/2.6.0/serposcope-2.6.0.jar

nohup でターミナルを閉じても終了しないようにしつつ起動。

$ nohup java -jar /var/www/serposcope/serposcope-2.6.0.jar

Firewallの設定

http と、Serposcopeが使う 7134 のポートを通します。

$ firewall-cmd --add-service=http --permanent
$ firewall-cmd --add-port=7134/tcp --zone=public --permanent

--permanent を使ったため設定をリロード。

$ firewall-cmd --reload

できあがり

IPアドレス http://***.***.***.***/ にアクセスすると http://***.***.***.***/create-admin にリダイレクトされアカウントが作成できます。

1ffa7d313d3b80d990986fbc113ea2be[1].png

ログインして出来上がり。

アップデート

$ cd /var/www/serposcope
$ wget https://serposcope.serphacker.com/download/2.10.0/serposcope-2.10.0.jar
$ nohup java -jar /var/www/serposcope/serposcope-2.10.0.jar

参考

段田さんのブログでSerposcopeを知りました。陳謝。

9
7
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
9
7