Let’sEncrypt免费证书申请,其有效期为三个月,不过到期会发提醒到你的邮箱
方法一
直接去网站www.sslforfree.com获取,详细看网页内的说明。
方法二
编译源码的方式 , 环境 ubuntu14
先克隆源代码:
root@ubu:/#cd /opt/ssl
root@ubu:/opt/ssl#git clone https://github.com/letsencrypt/letsencrypt
假定邮箱 email@domain.com
假定域名 domain.com
www.domain.com
a.domain.com
cd /opt/ssl/letsencrypt
root@ubu:/opt/ssl/letsencrypt#./letsencrypt-auto certonly --standalone --email <邮箱地址> -d domain.com -d www.domain.com -d a.domain.com
注:多个域名就加到结尾 -d some.domain.com, 编译的时候一定要保证环境健全,如果报错根据提示修复后在编译
编译成功后,最后会显示类似如下的信息:
IMPORTANT NOTES:
- Congratulations! Your certificate and chain have been saved at
/etc/letsencrypt/live/domain.com/fullchain.pem. Your cert will
expire on 2017-01-20. 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
根据其中的信息/etc/letsencrypt/live/domain.com/fullchain.pem
可知生成的证书文件在目录/etc/letsencrypt/live/domain.com/
下
在live的子目录中存在如下文件:
看到的都是软连接,是吧!不过没关系其真正的文件在archive目录里