码迷,mamicode.com
首页 > 其他好文 > 详细

用acme.sh申请免费ssl证书-let's encrypt

时间:2020-05-07 19:27:11      阅读:88      评论:0      收藏:0      [点我收藏+]

标签:style   code   ade   get   免费   图片   not   演示   blog   

本文,只是自己用于学习使用,建议看其他人的教程,例如:https://learnku.com/articles/25443

###########################################################################

acme.sh 是一个linux shell脚本,官方git地址是:https://github.com/acmesh-official/acme.sh

 

下载并安装这个脚本,

curl https://get.acme.sh | sh

默认会把一些文件下载到 ~/.acme.sh/目录下面(~就是家目录,类似/root/或者/home/zhangsan/)

.acme.sh是一个隐藏的目录,点开头的目录都是隐藏目录,

ls -adl ~/.acme.sh 

看看目录下面有什么

[root@cnblogs sites-enabled]# ls -adl ~/.acme.sh 
drwx------ 8 root root 4096 May  7 17:08 /root/.acme.sh
[root@cnblogs sites-enabled]# cd ~/.acme.sh/
[root@cnblogs .acme.sh]# ls 
account.conf  acme.sh  acme.sh.csh  acme.sh.env  ca  deploy  dnsapi  http.header  notify 
[root@cnblogs .acme.sh]# 

脚本安装后,帮忙做了一个alias

直接敲命令 acme.sh 就相当于敲 ~/.acme.sh/acme.sh

证书申请分为

  • http验证
  • DNS验证

 

下面演示的是DNS验证,手动添加验证的方式

第一条命令执行后,看到系统要求在DNS中添加一个TXT记录

acme.sh --issue -d zhufunin.com -d *.zhufuni.com --dns  --yes-I-know-dns-manual-mode-enough-go-ahead-please

技术图片

 

 

第二条命令,真正开始验证,并把证书的路径,写出来

acme.sh --renew -d zhufuni.com -d *.zhufuni.com --dns  --yes-I-know-dns-manual-mode-enough-go-ahead-please

技术图片

 

用acme.sh申请免费ssl证书-let's encrypt

标签:style   code   ade   get   免费   图片   not   演示   blog   

原文地址:https://www.cnblogs.com/faberbeta/p/12844811.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!