在我使用
certbot-auto
之前,我当前的系统不再支持什么:
cd /usr/local/bin/
curl https://dl.eff.org/certbot-auto > certbot-auto
chmod 755 certbot-auto
./certbot-auto
导致以下错误消息
Skipping bootstrap because certbot-auto is deprecated on this system.
Your system is not supported by certbot-auto anymore.
Certbot cannot be installed.
Please visit https://certbot.eff.org/ to check for other alternatives.
现在我必须使用
snap install --classic certbot
安装 certbot,这会导致完全不同的文件结构,以便我使用这些命令的旧安装不再起作用(此处安装 Hetzner DNS 插件)。
cd /opt/eff.org/certbot/venv/bin
./pip2.7 install certbot-dns-hetzner
那么现在如何安装插件呢?在哪里可以找到 certbot 文件夹?
我用这种方式快速安装了 certbot 和 dns 插件(我在 Ubuntu 18.04 中以 root 身份工作,所以如果您不是 root,请在前面加上
sudo
)。
至少在 Ubuntu 上,我确实被
certbot plugins
欺骗了,即使它完美运行,也没有显示该插件。
安装 pip、certbot(使用 snap),然后简单地进行插件的 pip 安装。
apt install python3-pip
snap install --classic certbot
python3 -m pip install certbot-dns-hetzner
certbot plugins
现在
certbot plugins
没有列出您安装的插件,但再次,不要被愚弄,它会起作用(至少它对我有用)。
如果您遇到问题,请查看 LetsEncrypt.log(通常是 /var/log/LetsEncrypt/LetsEncrypt.Log)并找到 Let's Encrypt 搜索插件的路径(文件夹
dist-packages
)。你应该使用相同的Python版本,让我们在安装插件时加密使用。
在尝试了上面的正确方法之后(不知道 certbot 已经可以找到并使用 dns 插件),我继续尝试这个。我认为这是正确的方法,但被
certbot plugin
欺骗了,因为插件出现了,但在运行 certbot 请求时没有找到。
所以这只是针对那些对失败感兴趣的人;-)
安装 certbot 并检查已安装的插件:
snap install --classic certbot
certbot plugins
将所需的 dns 插件安装到您的 certbot(此处为 Hetzner DNS)安装中并检查安装是否成功:
cd /snap/certbot/current/usr/bin
./python3 -m pip install certbot-dns-hetzner
certbot plugins
注: 有些插件已经准备好通过快照安装,这是最简单的安装方法。搜索 SnapStore 以了解您所需的插件是否已在 snap 版本中提供(如 certbot-dns-cloudxns、certbot-dns-madeeasy、certbot-dns-dnssimple 等)。
snap install certbot-dns-cloudxns
插件可通过 snap 获取,只需使用 find 命令即可发现它们
# snap find certbot
Name Version Publisher Notes Summary
certbot 1.20.0 certbot-eff✓ classic Automatically configure HTTPS using Let's Encrypt
certbot-dns-cloudxns 1.20.0 certbot-eff✓ - CloudXNS DNS Authenticator plugin for Certbot
certbot-dns-cloudflare 1.20.0 certbot-eff✓ - Cloudflare DNS Authenticator plugin for Certbot
certbot-dns-dnsmadeeasy 1.20.0 certbot-eff✓ - DNS Made Easy DNS Authenticator plugin for Certbot
certbot-dns-dnsimple 1.20.0 certbot-eff✓ - DNSimple DNS Authenticator plugin for Certbot
certbot-dns-digitalocean 1.20.0 certbot-eff✓ - DigitalOcean DNS Authenticator plugin for Certbot
certbot-dns-nsone 1.20.0 certbot-eff✓ - NS1 DNS Authenticator plugin for Certbot
certbot-dns-sakuracloud 1.20.0 certbot-eff✓ - Sakura Cloud DNS Authenticator plugin for Certbot
certbot-dns-rfc2136 1.20.0 certbot-eff✓ - RFC 2136 DNS Authenticator plugin for Certbot
certbot-dns-ovh 1.20.0 certbot-eff✓ - OVH DNS Authenticator plugin for Certbot
certbot-dns-luadns 1.20.0 certbot-eff✓ - LuaDNS Authenticator plugin for Certbot
certbot-dns-linode 1.20.0 certbot-eff✓ - Linode DNS Authenticator plugin for Certbot
certbot-dns-route53 1.20.0 certbot-eff✓ - Route53 DNS Authenticator plugin for Certbot
certbot-dns-gehirn 1.20.0 certbot-eff✓ - Gehirn Infrastructure Service DNS Authenticator plugin for Certbot
certbot-dns-google 1.20.0 certbot-eff✓ - Google Cloud DNS Authenticator plugin for Certbot
certbot-dns-hetzner 1.0.5 bigmichi1 - Hetzner DNS Authenticator plugin for Certbot
certbot-dns-porkbun v0.2.1 infinityofspace - Porkbun DNS Authenticator plugin for Certbot
certbot-dns-duckdns v0.6.1 infinityofspace - DuckDNS Authenticator plugin for Certbot
certbot-dns-inwx 2.1.3 oggy - INWX DNS Authenticator plugin for Certbot
certbot-dns-aliyun 0.38.1 tengattack - Aliyun DNS Authenticator plugin for Certbot
passprox 2.3.2 nsg - HAProxy with a bundled Certbot (Let's Encrypt support)
dnsrobocert 3.13.0 adferrand - Deploy and orchestrate DNS-challenged Let's Encrypt TLS certificates
tomcat-with-ssl 0.1 bsuttton - Apache Tomcat with SSL activated and managed by Certbot.
然后使用
snap install certbot-dns-hetzner
安装
您可以尝试此处发布的快照:https://snapcraft.io/certbot-dns-hetzner
我安装了 DNS 插件
pip install certbot-dns-ionos
但是 certbot plugins
不会显示它。
所以我按照这篇文章解决了我的问题:https://www.rushworth.us/lisa/?p=8887
sudo ln -s /usr/local/lib/python3.10/dist-packages/certbot_dns_ionos /usr/lib/python3/dist-packages/
sudo ln -s /usr/local/lib/python3.10/dist-packages/certbot-2.7.1.dist-info /usr/lib/python3/dist-packages