centos8下certbot的应用

已有python2的情况下安装python3,避免互相干扰: 
    sudo yum install python3 python3-pip

强制使用python3 (测试时不强制使用也没提示错误)
    certbot --python /usr/bin/python3

在CentOS8上,使用dnf安装Certbot,但不安装python3-certbot-nginx, 这样 Certbot 不会自动修改 Nginx 配置: 
    sudo dnf install certbot -y


-------------生成证书--------------------
运行前需确保 80 端口未被占用(如 Nginx 需临时关闭)
每个域名单独生成证书安全些

sudo certbot certonly --standalone -d domain
Certificate is saved at: /etc/letsencrypt/live/domain/fullchain.pem
Key is saved at:         /etc/letsencrypt/live/domain/privkey.pem
This certificate expires on xxxx-xx-xx.
These files will be updated when the certificate renews.
Certbot has set up a scheduled task to automatically renew this certificate in the background.
------------------------------------------------------------

-----------续订-----------------
运行前需确保 80 端口未被占用(如 Nginx 需临时关闭)

sudo certbot renew --dry-run  # 测试续订
sudo certbot renew  # 正式续订

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值