certbot-auto不再支持所有的操作系统!根据作者的说法,certbot团队认为维护certbot-auto在几乎所有流行的UNIX系统以及各种环境上的正常运行是一项繁重的工作,加之certbot-auto是基于python 2编写的,而python 2即
certbot-auto不再支持所有的操作系统!根据作者的说法,certbot团队认为维护certbot-auto在几乎所有流行的UNIX系统以及各种环境上的正常运行是一项繁重的工作,加之certbot-auto是基于python 2编写的,而python 2即将寿终正寝,将certbot-auto迁移至python 3需要大量工作,这非常困难,因此团队决定放弃certbot-auto的维护。
既然如此,现在我们还能继续使用certbot吗?certbot团队使用了基于snap的新的分发方法。
Cerbot官网:https://certbot.eff.org/
1. 环境
操作系统:CentOS 7
Webserver:Nginx
2. 安装letsencrypt
2.1. 安装letsencrypt之前,需要先安装snaps。
a. 先安装epel。
yum install epel-releaseb. 安装snapd。
yum install snapdc. 启用snapd.socket。
systemctl enable --now snapd.socketd. 创建/var/lib/snapd/snap和/snap之间的链接。
ln -s /var/lib/snapd/snap /snape. 退出账号并重新登录,或者重启系统,确保snap启用。
shutdown -r nowf. 将snap更新至最新版本。
snap install core
snap refresh core2.2. 卸载已安装的certbot。
如果之前在系统上已经部署过certbot,则需要先将其进行卸载。
a. 卸载certbot。
yum remove certbotb. 根据certbot安装位置删除相关文件。
rm /usr/local/bin/certbot-autoc. 删除certbot附加软件包。
rm -rf /opt/eff.org/certbot2.3. 安装certbot。
a. 通过snap安装certbot。
snap install --classic certbotb. 创建/snap/bin/certbot的软链接,方便certbot命令的使用。
ln -s /snap/bin/certbot /usr/bin/certbot3. letsencrypt的使用
3.1. 获取证书。
a. 生成证书。
生成单域名证书
certbot certonly --nginx --email xxx@mail.com -d a.do.com这里可能会报错,我们只需指定nginx.conf路径即可
指定nginx并生成证书
certbot --nginx-server-root=/usr/local/nginx/conf --nginx certonly -d a.example.com生成泛域名证书
certbot certonly --manual --preferred-challenges dns -d *. example.com -d example.com --server https://acme-v02.api.letsencrypt.org/directoryb. 更新nginx配置并重启nginx。
3.2. 更新证书。
certbot renew
或者
certbot renew --dry-run本文标题为:新版Letsencrypt证书申请及安装流程
- nginx中封禁ip和允许内网ip访问的实现示例 2022-09-23
- 教你在docker 中搭建 PHP8 + Apache 环境的过程 2022-10-06
- KVM虚拟化Linux Bridge环境部署的方法步骤 2023-07-11
- 【转载】CentOS安装Tomcat 2023-09-24
- 阿里云ECS排查CPU数据分析 2022-10-06
- 利用Docker 运行 python 简单程序 2022-10-16
- CentOS_mini下安装docker 之 安装docker CE 2023-09-23
- IIS搭建ftp服务器的详细教程 2022-11-15
- CentOS7安装GlusterFS集群的全过程 2022-10-10
- 解决:apache24 安装后闪退和配置端口映射和连接超时设置 2023-09-11
