1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

RockyLinux 9.xでLet's Encrypt(certbot)を動作するようにする

Last updated at Posted at 2022-07-24

3か月間の証明書を無償で取得できるLet's EncryptをRockyLinux 9.x系で利用する方法をご紹介。
操作方法自体は、RockyLinux 8.xやRHLE互換のAlma Linux等でも利用可能だと思います。

Snapdをパッケージをインストールする

dnf install epel-release snapd
systemctl enable --now snapd.socket
ln -s /var/lib/snapd/snap /snap

Snapdを利用してcertbotをインストールする

snap install core
snap refresh core
snap install --classic certbot
ln -s /snap/bin/certbot /usr/bin/certbot
certbot --version

以上で終了です。証明書の取得は以下の形で取得します。

DNSレコード反映での証明書取得方法

ワイルドーカード証明書の取得

certbot certonly --manual --preferred-challenges dns-01 --server https://acme-v02.api.letsencrypt.org/directory -m メールアドレス  -d *.example.com

RSA形式で取得するにはパラメーターに「--key-type rsa」を追加します

certbot certonly --manual --preferred-challenges dns-01 --server https://acme-v02.api.letsencrypt.org/directory -m メールアドレス  -d *.example.com --key-type rsa

CSRをあらかじめ用意して証明書を取得

certbot certonly --manual --preferred-challenges dns-01 --server https://acme-v02.api.letsencrypt.org/directory -m メールアドレス  -d *.example.com --csr /path/to/example.com.202202.csr
1
2
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
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?