免费https证书申请

Certbot申请证书完整流程

首先安装snapd

1
2
3
4
5
6
7
8
9

# 添加EPEL到CentOS 8/9 Stream
$ sudo dnf install epel-release
$ sudo dnf upgrade

$ sudo yum install snapd
$ sudo systemctl enable --now snapd.socket
$ sudo ln -s /var/lib/snapd/snap /snap

然后安装Certbot

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

$ sudo snap install core
$ sudo snap refresh core

$ sudo snap install --classic certbot
$ sudo ln -s /snap/bin/certbot /usr/bin/certbot

# 防火墙开端口

$ firewall-cmd --permanent --add-port=80/tcp
$ firewall-cmd --permanent --add-port=443/tcp
$ firewall-cmd --reload

# 申请域名证书

$ certbot certonly --standalone -d redsmile.cn