美文网首页
https-certbot 工具的安装使用

https-certbot 工具的安装使用

作者: LiKite | 来源:发表于2020-05-07 21:45 被阅读0次

certbot 官网地址:https://certbot.eff.org/

1、通过certbot 工具制作https协议访问,是通过http访问转发到https,首先就要在centos的nginx配置文件中配置

如图:

2、配置centos环境安装certbot工具

(1)yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

(2)yum -y install yum-utils

yum-config-manager --enable rhui-REGION-rhel-server-extras rhui-REGION-rhel-server-optional

(3)sudo yum install certbot python2-certbot-nginx

(4)启动:sudo certbot --nginx  (根据启动进行操作选择)

启动报错:

解决错误:

(1)卸载依赖包:pip uninstall urllib3

(2)重装依赖包:pip install --upgrade --force-reinstall 'requests==2.6.0' urllib3

    (3)启动失败:easy_install urllib3==1.21.1

重装可能会失败,不断尝试就可以了

按照步骤一步一步往下走:

最后,使用linux的定时任务,进行续期!

新建文件夹:

crontab /etc/cron.d/task.crontab

vim编辑:0 23 * * 6 /usr/bin/certbot renew >> /var/log/certbot-renew.log    定义每周六晚上23点整自动更新一次!

定时任务查看:crontab -l

删除:crontab -r

启动:crontab /etc/cron.d/task.crontab

某些错误:

相关文章

网友评论

      本文标题:https-certbot 工具的安装使用

      本文链接:https://www.haomeiwen.com/subject/rawzghtx.html