1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Certbotの新しいインストール方法

Last updated at Posted at 2022-07-17

何が書いてあるか

EC2(AmazonLinux V2)でのcertbotのインストール方法が変わりました。
昔の方法でやると

Your system is not supported by certbot-auto anymore.
Certbot cannot be installed.

のようなエラーが出てしまい継続できません。

snapを使った方法でインストールするやり方で回避できるようで、この方法を備忘録的に残しておきます。

インストール手順

※以降はrootユーザーで実行してください。

snapdのリポジトリ設定

wgetコマンドを実行してsnapdのリポジトリをダウンロードします。

$ cd /etc/yum.repos.d/
$ wget https://people.canonical.com/~mvo/snapd/amazon-linux2/snapd-amzn2.repo

yum.confの最後に1行設定(exclude=snapd-.el7 snap-.el7)を追加します。

$ vi /etc/yum.conf
・・・・・
exclude=snapd-*.el7 snap-*.el7

snapdのインストール

yumを利用してsnapdのインストールを行います。

$ yum install snapd

snapdの起動設定

snapdを起動しつつ、自動起動設定を行います。

$ systemctl enable --now snapd.socket

コマンドのリンク

snapへのシンボリックリンクを生成します。

$ ln -s /var/lib/snapd/snap /snap

certbotインストール

snapでcertbotをインストールします。

$ snap install --classic certbot

※私がここで遭遇したエラーの原因はyumでインストールしたcertbotが残っていたためでした。

証明書の取得などは今まで通りでできるようです。
今までのインストールの仕方(gitHub版らしい)が廃止された理由は掴めてません。(誰か知っていたら教えてください。)

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?