markdown 让我们在Amazon Linux上使用Certbot进行加密

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了markdown 让我们在Amazon Linux上使用Certbot进行加密相关的知识,希望对你有一定的参考价值。


Enable the Extra Packages for Enterprise Linux (EPEL).

    $ sudo yum-config-manager --enable epel

Download the latest release of Certbot from EFF onto your EC2 instance using the following command.

    $ wget https://dl.eff.org/certbot-auto

Make the downloaded file executable.

    $ chmod a+x certbot-auto

Run the file with root permissions and the --debug flag.

    $ sudo ./certbot-auto --debug
    
It throws the following error:
./certbot-auto: line 864: virtualenv: command not found

To fix this error:
Create a symlink.

    $ sudo ln -s /usr/bin/virtualenv-2.7 /usr/local/bin/virtualenv
    
Add /usr/local/bin to the sudo path. 

    $ sudo visudo
    
add /usr/local/bin to the secure_path variable

Run the file again.

    $ sudo ./certbot-auto --debug

Follow the process.


Configure Automated Certificate Renewal

Open /etc/crontab in a text editor.

    $ sudo nano /etc/crontab
    
Add the following line:
39      1,13    *       *       *       root    /home/ec2-user/certbot-auto renew --no-self-upgrade

Restart the cron daemon:

    $ sudo service crond restart


Sources:

http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/SSL-on-an-instance.html#letsencrypt

https://github.com/certbot/certbot/issues/2074

以上是关于markdown 让我们在Amazon Linux上使用Certbot进行加密的主要内容,如果未能解决你的问题,请参考以下文章

让 wkhtmltoimage 在 Amazon Linux / Ruby on Rails 上工作的问题

markdown Amazon LightSail设置帮助

markdown AWS aws cli amazon

markdown Amazon EMR上的Apache Spark

我们可以通过没有密码的linux shell脚本连接amazon redshift吗?

markdown 一个让VMware / VMware Player在Linux上再次出色的脚本。