差别

这里会显示出您选择的修订版和当前版本之间的差别。

到此差别页面的链接

后一修订版
前一修订版
itwiki:acme-cert [2024/01/04 02:21] – 创建 ovwx@live.ioitwiki:acme-cert [Unknown date] (当前版本) – 移除 - 外部编辑 (Unknown date) 127.0.0.1
行 1: 行 1:
-===== ACME.SH 证书工具 ===== 
- 
-ACME 是一个使用纯 BASH SHELL 写的用于 Let's encrypt 等免费SSL证书的签发、续签工具 
- 
-项目地址:[[https://github.com/acmesh-official/acme.sh|ACME.SH]] 
- 
-==== ACME 安装 ==== 
- 
-<code> 
- 
-curl -k https://get.acme.sh | sh -s [email protected] 
- 
-</code> 
- 
-==== 安装 socat ==== 
- 
-当作为独立服务器申请证书时,需要使用 socat 运行一个简易Web服务器 
- 
-<code> 
- 
-yum install socat 
- 
-</code> 
- 
-==== 重载 .bashrc ==== 
- 
-<code> 
-. /root/.bashrc 
-<code> 
- 
-===== 签发证书 ===== 
- 
-使用 CloudFlare APIKEY 
- 
-==== 找到 Cloudflare 密钥 ==== 
-<code> 
-#CF_Token="" 
-export CF_Zone_ID="xxxxxxxxx" 
-#CF_Account_ID="xxxxxx" 
- 
-Multi-Domain 
-export CF_Key="xxxxxxxx" 
-export CF_Email="[email protected]" 
- 
-</code> 
- 
-当为主域名或者泛域名申请证书时,需要使用 ''CF_KEY'' 和 ''CF_EMAIL'' 
-该数据非常重要,不能外泄,这两个数据可以在 Cloudflare 的 DNS 的控制台那里找到 
- 
-==== 签发证书 ==== 
-<code>acme.sh --issue --dns dns_cf -d ovwx.org -d '*.ovwx.org'</code> 
- 
-==== 刷新证书 ==== 
- 
-<code> 
-$acmedir/acme.sh --cron --home $acmedir 
-"/opt/.acme.sh"/acme.sh --cron --home "/opt/.acme.sh" 
-</code> 
- 
-在多台服务器上使用证书:需在一台服务器上签发了证书之后,将整个 ".acme.sh" 目录复制到新的服务器上,然后只需要也进行刷新就行了。 
- 
-证书位置 
-<code> 
-# Your cert is in: /root/.acme.sh/your_domain_ecc/subdomain.cer 
-# Your cert key is in: /root/.acme.sh/your_domain_ecc/subdomain.key 
-# The intermediate CA cert is in: ~/.acme.sh/your_domain_ecc/ca.cer 
-# And the full chain certs is there: ~/.acme.sh/your_domain_ecc/fullchain.cer 
-</code> 
- 
-==== 移除证书 ==== 
- 
-<code>acme.sh --remove -d abc.ovwx.org --ecc</code> 
- 
-==== 安装证书到特定目录 ==== 
-<code> 
-acme.sh --issue --dns dns_cf -d domain.com -d *.domain.com \ 
---installcert \ 
---key-file /etc/nginx/cert.d/domain.key \ 
---fullchain-file /etc/nginx/cert.d/domain.pem \ 
---reloadcmd "nginx -s reload" 
-</code> 
- 
-===== 查看证书信息 ===== 
- 
-查看证书信息 
- 
-<code>openssl x509 -noout -text -in server.crt</code> 
- 
-查看Key信息 
- 
-<code> 
-openssl rsa -noout -text -in server.key 
-openssl ec -noout -text -in server.key #针对EC密钥 
-</code> 
- 
-查看证书请求信息 
- 
-<code>openssl req -noout -text -in server.csr</code> 
- 
  
登录