AWS:certbot auto不再支持您的系统



尝试使用certbot在AmazonLinux2上续订letscript,我收到以下消息:

certbot auto不再支持您的系统。Certbot无法安装。

我完全不知所措,不知道该怎么办。我找不到任何详尽的文档来提供解决方案。

根据https://community.letsencrypt.org/t/certbot-1-9-0-release/135414:

已更改
除基于Debian或RHEL的系统外,所有系统都不赞成使用certbot auto。

从这个网站:https://community.letsencrypt.org/t/fail-to-detect-amazon-linux-2-certbot/136140

The best chance to get Certbot working on Amazon Linux 2 is to install the rpm from EPEL as described here: https://aws.amazon.com/blogs/compute/extending-amazon-linux-2-with-epel-and-lets-encrypt/

以下是如何在任何系统上安装certbot的说明:https://certbot.eff.org/instructions

特别是对于带有Nginx网络服务器的Ubuntu 18.04,我能够使用以下命令安装certbot:

snap install core
snap refresh core
snap install --classic certbot

然后您可以使用certbot命令运行certbot

对我有用的是用EPEL官方文档:来扩展AmazonLinux2中的这一部分

cd /tmp
wget -O epel.rpm –nv 
https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo yum install -y ./epel.rpm
sudo yum install python2-certbot-apache.noarch

之后,certbot renew开始工作。

由于无法安装snapd,我们在amazon linux上完全放弃了certbot。我们正在使用getssl(另一个acme客户端(,它看起来不错。github 上的getssl

对于Ubuntu 16.04,让我们加密客户端(certbot(。重置或设置新的AWS实例(Linux(。

sudo apt install software-properties-common
sudo add-apt-repository ppa:certbot/certbot
sudo apt update
sudo apt install certbot python3-certbot-nginx

要检查版本号,请运行

certbot --version

样本输出:

certbot 0.31.0

以下命令仅在端口80打开AWS时有效

sudo certbot --nginx --agree-tos --redirect --uir --hsts --staple-ocsp --must-staple -d www.example.com,example.com --email you@example.com

您必须安装certbot,而不是certbot auto

官方的certbot文档建议使用snapd安装它,但不幸的是,由于缺少selinux依赖项,您无法在Amazon Linux 2上安装snapd

此时您有两个选项

使用epel extrass安装它(更简单但更旧的certbot(
  • 先自动删除certbot
sudo amazon-linux-extras install epel
sudo yum install -y certbot python-certbot-dns-route53
使用pip安装它(有点复杂,但您可以获得最新的certbot(
  • 删除certbot auto
  • 确保安装了python3和pip
sudo python3 -m venv /opt/certbot/
sudo /opt/certbot/bin/pip install --upgrade pip
sudo /opt/certbot/bin/pip install certbot
sudo ln -s /opt/certbot/bin/certbot /usr/bin/certbot
sudo /opt/certbot/bin/pip install certbot-dns-route53

最新更新