GCP で Pleroma をスタートアップスクリプトで構築する3(失敗)

Google Cloud Platform(GCP)で Pleroma をスタートアップスクリプトで構築しようとしたと書いた。

GCP で Pleroma をスタートアップスクリプトで構築する(失敗) – with a Christian Wife
https://wacw.cf/2021/05/24/gcp-pleroma-with-a-startup-script/

GCP で Pleroma をスタートアップスクリプトで構築する2(失敗) – with a Christian Wife
https://wacw.cf/2021/05/31/gcp-pleroma-with-a-startup-script-2/

前回の反省を踏まえ、先に TLS 1.3 が使えるよう、まずは OpenSSL のバージョンを上げておくことにした。

(1)GCP のインスタンスを作成。

Region:us-west1 (Oregon)
Zone:us-west1-a
Machine configuration
・Machine family:General-purpose
・Series:FIRST GENERATION>N1
・Machine type:g1-small (1 vCPU, 1.7 GB memory)
Boot disk:Public images で、Ubuntu; Ubuntu 16.04 LTS; Standard persistent disk 30 GB
Firewall
・Allow HTTP traffic:チェックを入れる。
・Allow HTTPS traffic:チェックを入れる。
Networking
・Network interfaces:default をクリック。External IP で “External IP” を選択。“Network Service Tier” は “Premium” のままにしておく。

ドメインは別途取得済み(サブドメインを使う)。

(2)まず make コマンドが使えるようにしておく。

$ sudo apt install build-essential

OpenSSL の現在のバージョンを確認する。

$ openssl version
OpenSSL 1.0.2g  1 Mar 2016

OpenSSL の最新バージョンを確認すると openssl-1.1.1k.tar.gz だ。

Downloads – OpenSSL
https://www.openssl.org/source/

ソースをダウンロード、解凍、ディレクトリに移動。

$ wget https://www.openssl.org/source/openssl-1.1.1k.tar.gz
$ tar -zxf openssl-1.1.1k.tar.gz
$ cd openssl-1.1.1k

$ ./config

$ sudo make
$ make test
$ sudo make install

$ sudo mv /usr/bin/openssl ~/tmp
$ sudo ln -s /usr/local/bin/openssl /usr/bin/openssl
$ sudo ldconfig

バージョンを確認すると最新バージョンになっていた。

$ openssl version
OpenSSL 1.1.1k  25 Mar 2021

(3)以下のページに従い、インストールを進める。

GitHub – S-H-GAMELINKS/Pleroma.Start.Script.for.GoogleCloudPlatform: PleromaをGoogleCloudPlatform上に簡単に構築するスタートアップスクリプト
https://github.com/S-H-GAMELINKS/Pleroma.Start.Script.for.GoogleCloudPlatform

しかしまた前回と同じメッセージが出てスクリプトが止まる。

Job for nginx.service failed because the control process exited with error code. See “systemctl status nginx.service” and “journalctl -xe” for details.

よく分からないが、Ubuntu 18.04 でやり直してみようか。

(続く)

参考:
【Ubuntu 20.04/18.04 LTS】gcc, make などの開発ツールをインストールして使う | The modern stone age.
https://www.yokoweb.net/2018/05/04/ubuntu-18_04-gcc-makme-install/

OpenSSLを最新版にアップデート – Quso
https://quso.tech/update-openssl/

サーバーが対応しているSSL/TLSプロトコルを確認する – CLOVER
https://kazuhira-r.hatenablog.com/entry/2020/11/19/020208