#Debian,Ubuntu使用这个命令 apt-get install git #CentOS,Red Hat使用这个命令 yum install git
安装好git后,然后使用Let's Encrypt给的脚步即可开始傻瓜化安装
git clone https://github.com/letsencrypt/letsencrypt cd letsencrypt ./letsencrypt-auto上面的步骤是初始化系统环境,使用官方提供的这个程序可以帮你自动安装所有需要的软件! 如果你的服务器在国内,安装的时候可能会一直卡在:Installing Python packages... 这个上面 然后苦等半个小时程序给出报错

一般只有国内的服务器会出现这种情况,以为种种原因造成某些软件 无法下载 或者下载超时!解决方法很简单 首先手动安装pip,如果已经安装就跳过
#更新源 更新软件 然后开始安装pip apt-get update && apt-get upgrade -y && apt-get install python-pip -y然后修改pip的配置文件
vim ~/.pip/pip.conf在这个文件里加入下面这些:
[global] index-url = http://mirrors.aliyun.com/pypi/simple/ [install] trusted-host=mirrors.aliyun.com然后重新执行 ./letsencrypt-auto 提示安装好后,开始生成ssl证书文件
第一步, ./letsencrypt-auto certonly -t

第二步,填写你的邮箱

第三步,是否同意使用协议

第四步,填写你的域名 (多个域名使用空格分开)

第五步,填写你网站的根目录

第五步,继续完善你的其他域名相对应的网站根目录 。。。。 (如果你就填写一个域名就没有这一步了 )

最后安装成功提示如下:
IMPORTANT NOTES: - Congratulations! Your certificate and chain have been saved at /etc/letsencrypt/live/www.gubolangsha.com/fullchain.pem. Your cert will expire on 2016-11-15. To obtain a new or tweaked version of this certificate in the future, simply run letsencrypt-auto again. To non-interactively renew *all* of your certificates, run "letsencrypt-auto renew" - If you like Certbot, please consider supporting our work by: Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate Donating to EFF: https://eff.org/donate-le生成证书的时候遇到一下错误提示
Domain: www.macff.net
Type: unauthorized
Detail: Invalid response from
http://www.macff.net/.well-known/acme-challenge/T1DcmkO6yb9x3_uBTtp5z8Ww8FfvNcn-2taZoinCX2Q:
"<html>
<head><title>403 Forbidden</title></head>
<body bgcolor="white">
<center><h1>403 Forbidden</h1></center>
<hr><center>"
请参考这个解决方法:https://zhuangpenglong.com/encrypt-403-forbidden/