之前吴昊写过Certd证书管理系统,其社区免费版为用户提供了基础的核心功能,但Certd也存在着更多高级功能的专业版和商业版。
今天我来介绍另一款Certimate证书管理系统,目前Certimate是完全开源的,没有商用的版本,全功能开放使用,可以完全本地化部署,没有任何第三方的数据传输,确保的数据的安全隐私性。
Certimate系统开源GitHub地址:https://github.com/certimate-go/certimate
官方默认提供了几种部署方式,如:二进制、容器部署、面板部署等,对于我个人来讲,我不喜欢搞那么多面板来操作,并且会额外增加安全隐患,所以我这里选择了容器化方式部署。
我这里使用云服务器RockyLinux8.x系统来演示部署过程,部署后通过反向代理方式对特定的IP进行授权访问,理论适用于其它红帽el8兼容版本。
1、安装podman
我这里直接使用podman来替代docker,podman无守护进程,使用起来更方便。
1 |
dnf install podman -y |
2、创建Certimate数据存储目录
1 |
mkdir -p /data/cert |
3、部署Certimate
1 |
podman run -d --name certimate -p 127.0.0.1:8090:8090 -v /etc/localtime:/etc/localtime:ro -v /data/cert:/app/pb_data docker.io/certimate/certimate:latest |
注1:国内镜像地址registry.cn-shanghai.aliyuncs.com/certimate/certimate:latest
注2:如果你想直接把Certimate的服务暴露出去,那么这里的127.0.0.1无需添加,因为我这里需通过反向限制IP访问,所以设置了127.0.0.1:8090
4、使用wlnmp包安装nginx配置反向代理
1 2 3 4 |
yum install epel-release -y curl -fsSL "https://sh.wlnmp.com/wlnmp.sh" | bash yum install wnginx -y vi /usr/local/nginx/conf/vhost/demo.conf |
将原来内容清空,添加以下内容
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
server { listen 80; server_name xxx.whsir.com; allow 10.10.10.100; deny all; location / { proxy_pass http://127.0.0.1:8090; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; } } |
启动服务
1 |
/etc/init.d/nginx start |
