0
1

More than 3 years have passed since last update.

[letsencrypt] Amazon Linux に ACME v2 API に対応した certbot client をインストールする

Posted at

Amazon Linux2 なら yum で入れられるんですが、Amazon Linux だと、ちと大変

Amazon linux2 の場合

$ sudo yum install certbot

Amazon Linux の場合

GitHub からソースを clone してきた後、依存パッケージをインストール

$ sudo git clone https://github.com/certbot/certbot.git /opt/certbot
$ sudo easy_install pip
$ sudo easy_install --upgrade pip
$ sudo pip install virtualenv==15.1.0
$ sudo pip install -U cryptography
$ pip -V
$ virtualenv --version

ACME v2 API の endpoint に書き換える

すでに ACME v1 で証明書取っている場合は、/etc/letsencrypt/renewal/*.conf を書き換える必要があります。

$ sudo find /etc/letsencrypt/renewal/ -type f -name '*.conf' -exec sed -i -e 's/acme-v01/acme-v02/g' {} \;

--debug オプションつけて certbot-auto を起動して依存パッケージをインストールさせる

$ sudo /opt/certbot/certbot-auto renew --debug --force-renewal

SSL証明書の発行

SSL証明書を発行したい場合は、certbot-auto コマンドで

$ certbot certonly -t -d example.com \
 -a webroot --webroot-path=/var/www/html \
 --rsa-key-size 2048

こんな感じで

0
1
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
0
1