让我们在 AWS Linux 上加密 certbot

Pat*_*han 0 amazon-web-services lets-encrypt certbot

我是 AWS 的新手,让我们对两者进行加密。我关注和文章并简单地运行这些命令

wget https://dl.eff.org/certbot-auto
chmod a+x certbot-auto
sudo cp certbot-auto /usr/bin/
Run Code Online (Sandbox Code Playgroud)

然后我运行这个命令。

sudo /usr/bin/certbot-auto --nginx -d example.com -d www.example.com --debug
Run Code Online (Sandbox Code Playgroud)

这给了我错误

抱歉,我不知道如何在您的操作系统上引导 Certbot!

您将需要安装操作系统依赖项、配置 virtualenv 并手动运行 pip install。请参阅 https://letsencrypt.readthedocs.org/en/latest/contributing.html#prerequisites 了解更多信息。

这究竟意味着什么?

如何在 AWS linux 上设置 certbot?

Aru*_*han 8

我创建了一个全新的 amazon linux 2 ec2 实例并为您测试了以下内容。

以下步骤对我有用。

Edit the file /usr/bin/certbot-auto to recognize your version of Linux:
$ sudo vim /usr/bin/certbot-auto
find this line in the file (likely near line nearr 780):
elif [ -f /etc/redhat-release ]; then
and replace whole line with this:
elif [ -f /etc/redhat-release ] || grep 'cpe:.*:amazon_linux:2' /etc/os-release > /dev/null 2>&1; then
Save and exit vim (type :wq to do that)
Run Code Online (Sandbox Code Playgroud)

参考: 在 Amazon Linux AMI EC2 实例上部署 Let's Encrypt