acme.sh使用教程

简介: 安装安装 acme.sh安装很简单, 一个命令:curl https://get.acme.sh | sh普通用户和 root 用户都可以安装使用。会安装在 ~/.acme.sh/ 目录下,以后生成的证书也会在这里面,按照域名为文件夹安置。

安装

安装 acme.sh
安装很简单, 一个命令:

curl https://get.acme.sh | sh
普通用户和 root 用户都可以安装使用。

会安装在 ~/.acme.sh/ 目录下,以后生成的证书也会在这里面,按照域名为文件夹安置。

理论上会自动添加一个 acme.sh 别名,但有时候并不会生成,需要手动执行以下命令:

source ~/.bashrc

使用

使用dns模式获取TXT

acme.sh --issue -d example.com --dns \
 --yes-I-know-dns-manual-mode-enough-go-ahead-please

DNS配置

认证DNS

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

强制

acme.sh --renew --force -d '*.example.com' \
                   --yes-I-know-dns-manual-mode-enough-go-ahead-please

记得重启nginx

使用dns api的模式进行证书申请

获取AccessKey ID和AccessKey Secret

查看一下

export Ali_Key="key值"
export Ali_Secret="key Secret"
# 下次就不用再次执行这个命令了
acme.sh --issue --dns dns_ali -d *.example.com --force

自动更新证书

Let's 的证书有效期为60天

目前手动添加DNS获取证书的方式无法自动更新,但是使用DNS API的方式进行获取证书可以在 60 天以后会自动更新, 你无需任何操作.

强制执行更新任务

acme.sh --cron -f

acme升级

目前由于 acme 协议和 Let`s CA 都在频繁的更新, 因此 acme.sh 也经常更新以保持同步.

升级 acme.sh 到最新版 :

acme.sh --upgrade

如果你不想手动升级, 可以开启自动升级:

acme.sh --upgrade --auto-upgrade

之后, acme.sh 就会自动保持更新了.

你也可以随时关闭自动更新:

acme.sh --upgrade --auto-upgrade 0
目录
相关文章
|
3月前
|
运维 前端开发 应用服务中间件
jumpserver详解(六)——jumpserver luna组件安装
jumpserver详解(六)——jumpserver luna组件安装
32 1
|
5月前
|
Shell 数据库 时序数据库
InfluxData【搭建 04】shell脚本离线安装InfluxDB及mkdir xxx/data/_internal/_series: permission denied问题处理
InfluxData【搭建 04】shell脚本离线安装InfluxDB及mkdir xxx/data/_internal/_series: permission denied问题处理
33 0
关于scrapyd-deploy项目部署时出现environment can only contain strings的解决方法
关于scrapyd-deploy项目部署时出现environment can only contain strings的解决方法
64 0
关于scrapyd-deploy项目部署时出现environment can only contain strings的解决方法
|
存储 Oracle 关系型数据库
使用shell在Linux系统下下载cmip6文件出现报错:No ESG Credentials found in /Users/daniele/.esg/credentials.pem
如何解决Linux系统下下载cmip6模式数据出现的报错:No ESG Credentials found in ***/credentials.pem
使用shell在Linux系统下下载cmip6文件出现报错:No ESG Credentials found in /Users/daniele/.esg/credentials.pem
|
大数据 调度 数据库
Azkaban--安装部署--solo server 模式安装--azkaban 使用初体验 | 学习笔记
快速学习 Azkaban--安装部署--solo server 模式安装--azkaban 使用初体验
421 0
Azkaban--安装部署--solo server 模式安装--azkaban 使用初体验  | 学习笔记
|
安全 关系型数据库 MySQL
|
Web App开发 监控 jenkins