プロジェクト

全般

プロフィール

KAGOYA VPS での bncert-tool » 履歴 » バージョン 2

Tatsuya ISHIGAKI, 2025/10/03 10:15

1 1 Tatsuya ISHIGAKI
# KAGOYA VPS での bncert-tool
2
KAGOYA VPS で redmine を指定して初期インスタンス構築した場合、bitnami によって redmine の docker コンテナが作成されるが、Let's Encrypt SSL 簡易設定ツールの `/opt/bitnami/bncert-tool` がインストールされていない状態だった
3
4
## 参考
5
- [bncert-tool のインストール方法 (AWS のサイトだが、bncert-tool が存在しない場合の手順あり)](https://docs.aws.amazon.com/ja_jp/lightsail/latest/userguide/amazon-lightsail-enabling-https-on-wordpress.html#https-wordpress-bncert-install)
6
- [BitnamiのRedmineでSSL化する方法](https://qiita.com/s_Pure/items/ac5d75e019fa16c4353a)
7
- [bitnami redmineにSSL証明書(Let's Encrypt)を導入する](https://qiita.com/kooohei/items/c4ac40f4bbf366cc0e31)
8
9
## 実施記録
10
### bncert-tool (途中でやめた)
11
【参考】vps 上の docker コンテナの様子
12
```bash
13
# docker container ls
14
CONTAINER ID   IMAGE                    COMMAND                  CREATED        STATUS          PORTS                      NAMES
15
3144a13de656   bitnami/redmine:latest   "/opt/bitnami/script…"   4 months ago   Up 56 minutes   127.0.0.1:8080->3000/tcp   root-redmine-1
16
ddf0dafbc53a   bitnami/mariadb:latest   "/opt/bitnami/script…"   4 months ago   Up 56 minutes   3306/tcp                   root-mariadb-1
17
```
18
19
1. vps インスタンスへ SSH ログイン (root)
20
1. **bncert ツール** をダウンロードしてコンテナ上へコピー
21
   - `wget` がインストールされていなかったので、インストール
22
     - `yum install wget`
23
   - ダウンロード
24
     - `wget -O bncert-linux-x64.run https://downloads.bitnami.com/files/bncert/latest/bncert-linux-x64.run`
25
   - コンテナ上へコピー (とりあえず移動先は適当)
26
     - `docker cp ./bncert-linux-x64.run root-redmine-1:/tmp/bncert-linux-x64.run`
27
1. redmine コンテナへログイン
28
   - `docker exec -it root-redmine-1 /bin/bash`
29
1. (コンテナ上) ファイルの移動と、リンクの作成
30
   - 移動先は適当、リンクはプリインストールされている場合と同じ場所へ (以降の調べ物がややこしいので)
31
   - 移動 (移動先ディレクトリは新規作成)
32
     - `mkdir /opt/bitnami/bncert`
33
     - `mv /tmp/bncert-linux-x64.run /opt/bitnami/bncert/`
34
   - シンボリックリンクを作成
35
     - `ln -s /opt/bitnami/bncert/bncert-linux-x64.run /opt/bitnami/bncert-tool`
36
1. (コンテナ上) bncert-tool 実行
37
   - `Bitnami installation directory` が表示されて進まないので、中断
38
     - 同じ現象の記事在り [「aws light sail に bitnamiを使わずにSSL設定」](https://qiita.com/ma7ma7pipipi/items/f97d77b815a81fcaa8aa)
39
       ```bash
40
       # /opt/bitnami/bncert-tool 
41
       ----------------------------------------------------------------------------
42
       Welcome to the Bitnami HTTPS Configuration tool.
43
       
44
       ----------------------------------------------------------------------------
45
       Bitnami installation directory
46
       
47
       Please type a directory that contains a Bitnami installation. The default 
48
       installation directory for Linux installers is a directory inside /opt.
49
       
50
       Bitnami installation directory []: /opt/bitnami
51
       ```
52 2 Tatsuya ISHIGAKI
53 1 Tatsuya ISHIGAKI
### certbot
54
前述の記事 [「aws light sail に bitnamiを使わずにSSL設定」](https://qiita.com/ma7ma7pipipi/items/f97d77b815a81fcaa8aa) に従い、**certbot** での SSL 導入に方針変更
55
56 2 Tatsuya ISHIGAKI
[[KAGOYA_VPS_での_certbot]]  へ