This commit is contained in:
xiaojunnuo
2024-10-17 18:32:45 +08:00
parent 304ef494fd
commit 6e2ac1c089
61 changed files with 1365 additions and 48 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

+13
View File
@@ -0,0 +1,13 @@
# 数据库自动备份
## 1. 创建自动备份流水线
![](./images/1.png)
## 2. 添加备份任务
![](./images/2.png)
## 3. 选择备份方法
![img.png](./images/3.png)
## 4. 配置定时和失败通知
![img.png](./images/4.png)
+15
View File
@@ -0,0 +1,15 @@
# Cloudflare
## CF Token申请
### 申请地址:
https://dash.cloudflare.com/profile/api-tokens
### 权限设置:
需要设置权限和资源范围
权限包括:Zone.Zone.edit, Zone.DNS.edit
资源范围:要包含对应域名,推荐直接设置为All Zones
最终效果如下,可以切换语言为英文对比如下图检查
![](./cf_token.png)
Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

+26
View File
@@ -0,0 +1,26 @@
# 忘记管理员密码
解决方法如下:
## 1. 修改环境变量
修改docker-compose.yaml文件,将环境变量`certd_system_resetAdminPasswd`改为`true`
```yaml
services:
certd:
environment: # 环境变量
- certd_system_resetAdminPasswd=false
```
## 2. 重启容器
```shell
docker compose up -d
docker logs -f --tail 500 certd
# 观察日志,当日志中输出“重置1号管理员用户的密码完成”,即可操作下一步
```
## 3. 恢复环境变量
修改docker-compose.yaml,将`certd_system_resetAdminPasswd`改回`false`
## 4. 再次重启容器
```shell
docker compose up -d
```
## 5. 默认密码登录
使用`admin/123456`登录系统,请及时修改管理员密码
+56
View File
@@ -0,0 +1,56 @@
# google证书申请教程
## 1、启用API
打开如下链接,启用 API
https://console.cloud.google.com/apis/library/publicca.googleapis.com
打开该链接后点击“启用”,随后等待右侧出现“API已启用”则可以关闭该页。
## 2、 获取授权
以下两种方式任选其一
### 2.1 直接获取EAB 【推荐】
1. 打开“Google Cloud Shell”(在右上角点击激活CloudShell图标)。
等待分配完成后在 Shell 窗口内输入如下命令:
```shell
gcloud beta publicca external-account-keys create
```
2. 此时会弹出“为 Cloud Shell 提供授权”,点击授权即可。
执行完成后会返回类似如下输出;注意不要在没有收到 Google 的邮件时执行该命令,会返回命令不存在。
```shell
Created an external account key
[b64MacKey: xxxxxxxxxxxxxxxx
keyId: xxxxxxxxxxxxx]
```
3. 到Certd中,创建一条EAB授权记录,填写keyId(=kid) 和 b64MacKey 信息
注意:keyId没有`]`结尾,不要把`]`也复制了
注意:EAB授权使用过一次之后,会绑定邮箱,后续再次使用时,要使用相同的邮箱
否则会报错 `Unknown external account binding (EAB) key. This may be due to the EAB key expiring which occurs 7 days after creation`
### 2.2 通过服务账号获取EAB
此方式可以自动EAB,需要配置代理
1. 创建服务账号
https://console.cloud.google.com/projectselector2/iam-admin/serviceaccounts/create?walkthrough_id=iam--create-service-account&hl=zh-cn#step_index=1
2. 选择一个项目,进入创建服务账号页面
3. 给服务账号起一个名字,点击`创建并继续`
4. 向此服务账号授予对项目的访问权限: `选择角色`->`基本`->`Owner`
5. 点击完成
6. 点击服务账号,进入服务账号详情页面
7. 点击`添加密钥`->`创建新密钥`->`JSON`,下载密钥文件
8. 将json文件内容粘贴到 certd中 Google服务授权输入框中
## 3、 创建证书流水线
选择证书提供商为google, 选择EAB授权 或 服务账号授权
## 4、 其他就跟正常申请证书一样了
+24
View File
@@ -0,0 +1,24 @@
# 远程主机
远程主机基于ssh协议,通过ssh连接远程主机,执行命令。
## windows开启OpenSSH Server
1. 安装OpenSSH Server
请前往Microsoft官方文档查看如何开启openSSH
https://learn.microsoft.com/zh-cn/windows-server/administration/openssh/openssh_install_firstuse?tabs=gui#install-openssh-for-windows
2. 启动OpenSSH Server服务
```
win+R 弹出运行对话框,输入 services.msc 打开服务管理器
找到 OpenSSH SSH Server
启动ssh server服务,并且设置为自动启动
```
3. 测试ssh登录
使用你常用的ssh客户端,连接你的windows主机,进行测试
```cmd
# 如何确定你用户名
C:\Users\xiaoj>
↑↑↑↑---------这个就是windows ssh的登录用户名
```
Binary file not shown.

After

Width:  |  Height:  |  Size: 205 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

+40
View File
@@ -0,0 +1,40 @@
# 群晖部署和证书更新
## 一、群晖部署Certd
### 1. 打开Container Manager
![](./images/1.png)
### 2. 新增项目
![](./images/2.png)
### 3. 配置Certd项目
![](./images/3.png)
### 4. 外网访问设置
![](./images/4.png)
### 5. 确认项目信息
![](./images/5.png)
点击完成安装,等待certd启动完成即可
### 6. 门户配置向导【可选】
![](./images/6.png)
## 二、更新群晖证书
## 1. 前提条件
* 已经部署了certd
* 群晖上已经设置好了证书(证书建议设置好描述,插件需要根据描述查找证书)
## 2. 在certd上配置自动更新群晖证书插件
![](./images/deploy.png)
Binary file not shown.

After

Width:  |  Height:  |  Size: 149 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

+8
View File
@@ -0,0 +1,8 @@
# 腾讯云
## 腾讯云API密钥设置
腾讯云其他部署需要API密钥,需要在腾讯云控制台进行设置
打开 https://console.cloud.tencent.com/cam/capi
然后按如下方式获取腾讯云的API密钥
![](./tencent-access.png)