VPS侦探论坛

 找回密码
 注册
查看: 7067|回复: 6

使用Letsencrypt证书用户建议更新自动续期规则

[复制链接]
发表于 2017-8-23 17:38:32 | 显示全部楼层 |阅读模式

因Let'sEncrypt的certbot程序更新,参数发生些变化,可能导致SSL证书续期失败,建议8月23日前安装LNMP的用户更新一下crontab规则和lnmp管理脚本,自动更新命令:wget -O - http://soft.vpser.net/lnmp/ext/fix_renewssl.sh|bash

也可以执行:cd /tmp && wget http://soft.vpser.net/lnmp/lnmp1.4.tar.gz -O lnmp1.4.tar.gz && tar zxf lnmp1.4.tar.gz && cd lnmp1.4 && ./upgrade1.x-1.4.sh
升级lnmp管理脚本后再自行参考crontab教程,删除原certbot的规则,添加上0 3 */7 * * /bin/certbot renew --disable-hook-validation --renew-hook "/etc/init.d/nginx reload"
手动更新的话建议再执行:/bin/certbot renew --disable-hook-validation --renew-hook "/etc/init.d/nginx reload" 看一下能否正常更新。

如有问题,请到LNMP论坛进行反馈:https://bbs.vpser.net/forum-25-1.html
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2017-9-6 16:26:56 | 显示全部楼层


还好我用的是acme.sh的DNS API申请的证书!
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2017-9-27 20:49:23 | 显示全部楼层

不能正常更新


安装完1.4后,开始没有更新自动续期规则,前几天SSL到期了,然后才看到需要更新自动续期规则。但是更新后还是不能续期啊:

-------------------------------------------------------------------------------
Processing /etc/letsencrypt/renewal/wptheme.top.conf
-------------------------------------------------------------------------------
Cert not yet due for renewal

-------------------------------------------------------------------------------

The following certs are not due for renewal yet:
  /etc/letsencrypt/live/wptheme.top/fullchain.pem (skipped)
No renewals were attempted.
No hooks were run.
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2017-10-25 09:53:52 | 显示全部楼层

更新证书出错




/bin/certbot renew --disable-hook-validation --renew-hook "/etc/init.d/nginx reload"
/opt/eff.org/certbot/venv/lib/python2.6/site-packages/cryptography/__init__.py:26: DeprecationWarning: Python 2.6 is no longer supported by the Python core team, please upgrade your Python. A future version of cryptography will drop support for Python 2.6
  DeprecationWarning
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2017-12-17 10:31:00 | 显示全部楼层

无法实现自动更新,报奇怪错误,求教。


首先,楼主辛苦了!感谢您为我们提供的这么好的组件。
昨天我的Letsencrypt证书到期了,查阅官方后发现以上方法,于是我采用自动更新和修改crontab的方式,当我执行wget命令时却报wget命令未找到,我又执行yum -y install wget 试图安装wget,但是又提示我该软件重复安装。无解了。我是linux新手,求教!谢谢!

[root@myserver ~]# wget -O -http://soft.vpser.net/lnmp/ext/fix_renewssl.sh|bash
bash: line 1: wget:: command not found
bash: line 2: Usage:: command not found
bash: line 4: Try: command not found
[root@myserver ~]# yum -y install wget
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
* base: centos.s.uw.edu
* epel: mirrors.syringanetworks.net
* extras: mirror.jax.hugeserver.com
* updates: centos.sonn.com
Package wget-1.12-10.el6.x86_64 already installed and latest version
Nothing to do

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

x

军哥运维代购:http://shop63846532.taobao.com/

 楼主| 发表于 2017-12-17 13:04:26 | 显示全部楼层

回复 5# 的帖子


可能之前进行过什么其他操作,直接手动输入
发表于 2017-12-20 22:21:19 | 显示全部楼层

回复 6# 的帖子


问题已解决,原因为命令字符串中有一个错误,-http的杠与http之间缺少一个空格。
另外,我还在执行这个命令前先执行了lnmp stop,也会导致失败,后来我lnmp start之后再执行的以上命令,一口气成功。
向军哥致敬!
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-4-29 07:14 , Processed in 0.028176 second(s), 17 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表