Let’s Encrypt
最近给域名安装免费的https证书 Let’s Encrypt,发现跟之前的安装方式不太一样,这里记录一下安装过程
https://certbot.eff.org/instructions?ws=nginx&os=centosrhel7
https://eff-certbot.readthedocs.io/en/latest/using.html#nginx
https://snapcraft.io/docs/installing-snap-on-centos
步骤
cat /etc/os-release or lsb_release -a 查看系统版本号 我的是centos7 其他版本可以从 https://certbot.eff.org/instructions 这里找到
sudo yum install epel-release
yum update
sudo yum install snapd
sudo systemctl enable --now snapd.socket
sudo ln -s /var/lib/snapd/snap /snap
报错
centos 安装 snapd 报错: too early for operation, device not yet seeded or device model not acknowledged
https://www.cnblogs.com/Simoon/p/18060934
sudo setenforce 0
sudo snap install --classic certbot
sudo ln -s /snap/bin/certbot /usr/bin/certbot
certbot certificates // 查看安装哪些证书
sudo certbot --nginx // 根据nginx配置自动生成证书 也可以只生成证书,自己修改域名配置
sudo certbot renew --dry-run // 验证是否自动更新证书