让我们在AWS Linux上加密certbot

时间:2019-12-30 03:10:06

标签: 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/

然后我运行此命令。

sudo /usr/bin/certbot-auto --nginx -d example.com -d www.example.com --debug

这给了我错误

  

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

     

您将需要安装操作系统依赖性,配置virtualenv以及   手动运行pip install。请参阅   https://letsencrypt.readthedocs.org/en/latest/contributing.html#prerequisites   有关更多信息。

这到底意味着什么?

如何在AWS linux上设置certbot?

2 个答案:

答案 0 :(得分:0)

我创建了一个新的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)

参考: https://medium.com/@gnowland/deploying-lets-encrypt-on-an-amazon-linux-ami-ec2-instance-f8e2e8f4fc1f

答案 1 :(得分:0)

确保满足系统要求,您可以找到系统要求here

here也是certbot自动部署的最佳实践。