Conohaにサーバーを立てる
メモリ512MBのプランなら月630円。
Serposcopeを動かすためのアレコレを入れていきます。
Nginxのインストールと設定
まずはNginx。
$ yum -y install nginx
Serposcopeを /var/www/serposcope
に入れる前提で設定していきます。
また、URLに :7134
をつけるのもスマートじゃない感じがするので、ポート80に来たアクセスを7134に振るようにしておきます。
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
にリダイレクトされアカウントが作成できます。
ログインして出来上がり。
アップデート
$ 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を知りました。陳謝。