Skip to content

Commit

Permalink
威联通申请证书 更新
Browse files Browse the repository at this point in the history
  • Loading branch information
Sowevo committed Jan 25, 2024
1 parent ce076bd commit 5548a20
Showing 1 changed file with 21 additions and 8 deletions.
29 changes: 21 additions & 8 deletions source/_posts/威联通申请证书.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: 威联通申请证书
date: 2022-08-10 10:50:02
updated: 2022-08-10 11:16:51
updated: 2024-01-25 18:30:49
tags:
- 威联通
- 证书
Expand Down Expand Up @@ -62,37 +62,50 @@ tags:
需要替换为自己的参数
按顺序执行以下脚本
按顺序执行以下脚本
- 切换到admin(root)用户
```shell
$ sudo -i
```
- 进入acme目录
```shell
$ cd ~/.acme.sh
```
- 看情况是不是要升级一下
```shell
$ ./acme.sh --upgrade --force
```
- 证书颁发机构改为letsencrypt
- 目前新版本的acme.sh默认证书分发机构为ZeroSSL,有点不好用
```shell
$ ./acme.sh --set-default-ca --server letsencrypt
```
- 写入参数
```shell
$ export CF_Key="@cf_key@"
$ export CF_Email="@cf_email@"
$ export CF_Key="example_key"
$ export CF_Email="example@example.com"
$ export CF_Domain="*.example.com"
```
- 注册账号
```shell
$ ./acme.sh --register-account -m @cf_email@ --force
$ ./acme.sh --register-account -m $CF_Email --force
```
- 申请证书
```shell
$ ./acme.sh --issue --dns dns_cf -d "@your_domain@" --force
$ ./acme.sh --issue --dns dns_cf -d "$CF_Domain" --force
```
- 安装证书(需要调用之前的重载脚本)
```shell
$ ./acme.sh --install-cert -d "@your_domain@" \
$ ./acme.sh --install-cert -d "$CF_Domain" \
--cert-file /etc/stunnel/backup.cert \
--key-file /etc/stunnel/backup.key \
--reloadcmd "/share/Public/Script/acme/reloadcmd.sh" \
Expand Down

0 comments on commit 5548a20

Please sign in to comment.