centos命令certbot申请免费ssl证书

发布时间 2023-12-06 16:33:52作者: A学无止境A

准备epel源

yum -y install epel

直接yum安装

yum -y install certbot

申请证书,期间需要去dns解析页面配置TXT解析

certbot certonly --email 532733691@qq.com --server https://acme-v02.api.letsencrypt.org/directory --agree-tos --manual --preferred-challenges=dns -d *.xx.com

查看生成的公钥私钥

ll /etc/letsencrypt/live/xx.com/fullchain.pem #公钥
ll /etc/letsencrypt/live/xx.com/privkey.pem #私钥

借鉴https://www.zhihu.com/question/484431835/answer/3163134184?utm_id=0