获取免费证书的网址: Certbot
1. 进入你的linux系统,先安装snapd,
yum install snapd
2. 启动snapd
service snapd start
3.安装 Certbot
snap install --classic certbot
注意如下出现此错误时,需要先建立snap 软连接后,再安装certbot
error: cannot install "certbot": classic confinement requires snaps under /snap or symlink from
/snap to /var/lib/snapd/snap
ln -s /var/lib/snapd/snap /snap
4.建立certbot软连接
ln -s /snap/bin/certbot /usr/bin/certbot
5.由于没有将nginx放到环境变量中,设置nginx软连接
ln -s /usr/local/nginx/sbin/nginx /usr/bin/nginx
ln -s /usr/local/nginx/conf/ /etc/nginx
6.最后执行:
certbot --no-redirect