今天得到Let’s Encrypt开放泛域名证书后,就发布了Let’s Encrypt开放申请免费通配符 SSL 证书/野卡,但是没有亲自体验一下,现在闲来无事,体验一下期待已久的免费泛域名SSL证书,也记录一下申请安装步骤,需要注意Let’s Encrypt的泛域名证书申请需要通过ACME V2来申请,首先先看一下安装Let’s Encrypt免费泛域名证书前后的效果对比:
Let’s Encrypt免费泛域名证书安装步骤如下:一、首先下载ACME.SH,以下四条命令任选一条即可,醒醒用的是第四条。
curl https://get.acme.sh | sh wget -O - https://get.acme.sh | sh curl https://raw.githubusercontent.com/Neilpang/acme.sh/master/acme.sh | INSTALLONLINE=1 sh wget -O - https://raw.githubusercontent.com/Neilpang/acme.sh/master/acme.sh | INSTALLONLINE=1 sh二、申请Let’s Encrypt免费泛域名证书的第一步获取验证DNS所需要的TXT记录,下面命令中两个“-d”建议先输入泛域名,这样在证书里可以显示*.xxorg.com这样的泛域名,显得比较吊一些。
cd /.acme.sh ./acme.sh --issue -d *.xxorg.com -d xxorg.com --dns运行后结果如下:
[root@ser-wh2 .acme.sh]# ./acme.sh --issue --dns -d *.xxorg.com -d xxorg.com [Wed Mar 14 19:52:04 CST 2018] Registering account [Wed Mar 14 19:56:17 CST 2018] Registered [Wed Mar 14 19:56:17 CST 2018] ACCOUNT_THUMBPRINT='oK***Eo******************' [Wed Mar 14 19:56:17 CST 2018] Creating domain key [Wed Mar 14 19:56:17 CST 2018] The domain key is here: /root/.acme.sh/*.xxorg.com/*.xxorg.com.key [Wed Mar 14 19:56:17 CST 2018] Multi domain='DNS:*.xxorg.com,DNS:xxorg.com' [Wed Mar 14 19:56:17 CST 2018] Getting domain auth token for each domain [Wed Mar 14 19:56:26 CST 2018] Getting webroot for domain='*.xxorg.com' [Wed Mar 14 19:56:26 CST 2018] Getting webroot for domain='xxorg.com' [Wed Mar 14 19:56:26 CST 2018] Add the following TXT record: [Wed Mar 14 19:56:26 CST 2018] Domain: '_acme-challenge.xxorg.com' [Wed Mar 14 19:56:26 CST 2018] TXT value: '9abm****-oUf8l****Kc****-hHw*******r8' [Wed Mar 14 19:56:26 CST 2018] Please be aware that you prepend _acme-challenge. before your domain [Wed Mar 14 19:56:26 CST 2018] so the resulting subdomain will be: _acme-challenge.xxorg.com [Wed Mar 14 19:56:26 CST 2018] Add the following TXT record: [Wed Mar 14 19:56:26 CST 2018] Domain: '_acme-challenge.xxorg.com' [Wed Mar 14 19:56:26 CST 2018] TXT value: '3C*******2**************Dj8' [Wed Mar 14 19:56:26 CST 2018] Please be aware that you prepend _acme-challenge. before your domain [Wed Mar 14 19:56:26 CST 2018] so the resulting subdomain will be: _acme-challenge.xxorg.com [Wed Mar 14 19:56:26 CST 2018] Please add the TXT records to the domains, and retry again. [Wed Mar 14 19:56:26 CST 2018] Please add '--debug' or '--log' to check more details. [Wed Mar 14 19:56:26 CST 2018] See: https://github.com/Neilpang/acme.sh/wiki/How-to-debug-acme.sh [root@ser-wh2 .acme.sh]#三、到域名DNS解析服务商处添加域名的TXT解析。
上面的命令运行后可能要等上一会,然后会出现下图的结果,其中绿色部分就是需要做TXT记录的主机头和TXT的解析值,因为上面第二里面两个“-d”,所以这里有两个解析值,把两个TXT都做了解析。
四、获取Let’s Encrypt免费泛域名证书。等DSN解析生效后,运行以下命令:
./acme.sh --renew -d *.xxorg.com -d xxorg.com五、Let’s Encrypt免费泛域名证书的申请已经结束了。