23 lines
919 B
Markdown
23 lines
919 B
Markdown
## 安装acme.sh,并使用dns方式生成证书
|
||
```shell
|
||
# 安装acme.sh
|
||
curl https://get.acme.sh | sh -s email="xxx@xxx.com"
|
||
|
||
# 使用dns方式生成证书
|
||
cat >> ~/.bashrc << EOF
|
||
# Username与DomainName在相应iam账号的我的凭证中获取
|
||
export HUAWEICLOUD_Username="dns" # 华为云iam账号
|
||
export HUAWEICLOUD_Password="xxxx" # 华为云iam密码
|
||
export HUAWEICLOUD_DomainName="turingsynergy" # 华为云账号
|
||
EOF
|
||
|
||
source ~/.bashrc
|
||
## 生成证书
|
||
acme.sh --issue -d turingsynergy.com -d *.turingsynergy.com --dns dns_huaweicloud
|
||
## 安装证书
|
||
## 替换[]为证书id
|
||
acme.sh --install-cert -d turingsynergy.com \
|
||
--key-file /opt/webhook/scripts/tlsupdatev1/ssl//turingsynergy.com.key \
|
||
--fullchain-file /opt/webhook/scripts/tlsupdatev1/ssl//turingsynergy.com.pem \
|
||
--reloadcmd "curl 'https//webhook-ops.shasoapp.com/hooks/tlsupdate?action=upadte&&id=[华为云中配置的证书id]'"
|
||
```
|