关于 chaim.pem 文件的一般问题;我使用从我的主机获取的 csr,并使用 LetsEncrypt 的 Certbot 生成 https 证书;我使用了以下命令
$ certbot certonly --manual --csr file-with-my-csr.txt
certbot生成了3个文件0000_cert.pem、0000_chain.pem、0001_chain.pem;然后,我使用 cert.pem 文件将证书安装回我的主机;一切都进行得相当顺利;
我的问题是“链”文件的用途是什么,因为我没有在任何地方使用它们;它们在什么场景下会有用?
尝试执行此命令
sudo certbot certonly --dns-digitalocean --dns-digitalocean-credentials ~/.secrets/digitalocean.ini -d "*.example.com" --preferred-challenges dns --server https://acme-v02.api.letsencrypt.org/directory
Run Code Online (Sandbox Code Playgroud)
我收到此错误:certbot:错误:无法识别的参数:--dns-digitalocean-credentials
我的 Web 服务器运行的操作系统是:Ubuntu 16.04.3 LTS
certbot --version输出:certbot 0.31.0
并且命令“--dns-digitalocean-credentials”中的破折号输入正确。
还安装了 dns 插件:
python3-certbot-dns-digitalocean/xenial 0.23.0-2ubuntu0ppa1~ubuntu16.04.1
Run Code Online (Sandbox Code Playgroud)
帮助解决问题。
运行 certbot-auto 给出以下输出:
错误:无法获取当前安装的版本...
文件“/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/cryptography/hazmat/bindings/openssl/binding.py”,第 140 行,init_static_locks 导入(“_ssl”)导入错误: 没有名为 _ssl 的模块
这是在从 Debian 7 -> Debian 8 进行 dist 升级后发生的
官方certbot
( https://certbot.eff.org ) 颁发和更新证书的工具Let's Encrypt
将当前有效的证书保存到${prefix}/archive/${domain}/certN.pem
,其中N
是任意数字。用于访问当前有效证书和密钥的路径是 中的相对符号链接${prefix}/live/${domain}/cert.pem
:
root@skprov2:${prefix}/live/${domain}# ls
total 12K
4.0K drwxr-xr-x 2 root root 4.0K Jul 24 16:08 ./
4.0K drwx------ 9 root root 4.0K Aug 24 10:57 ../
0 lrwxrwxrwx 1 root root 39 Jul 24 16:08 cert.pem -> ../../archive/${domain}/cert2.pem
0 lrwxrwxrwx 1 root root 40 Jul 24 16:08 chain.pem -> ../../archive/${domain}/chain2.pem
0 lrwxrwxrwx 1 root root 44 Jul 24 16:08 fullchain.pem -> ../../archive/${domain}/fullchain2.pem
0 lrwxrwxrwx 1 root …
Run Code Online (Sandbox Code Playgroud) 我不想只续订即将到期的证书。(无论很快是什么意思)。我想更新所有这些,以确保它们将来会在同一时间。
我找不到使用 certbot 执行此操作的方法。有什么建议么?
我为 nginx 安装了 certbot,并且自动更新脚本自动设置,但这是我在运行时收到的电子邮件:
/home/foobar/certbot-renew.sh: 1: /home/foobar/certbot-renew.sh: /usr/bin/certbot: not found
certbot-renew.sh
让我困惑的是,我的主目录中没有......?
更多信息来自systemctl
:
# /lib/systemd/system/certbot.timer
[Unit]
Description=Run certbot twice daily
[Timer]
OnCalendar=*-*-* 00,12:00:00
RandomizedDelaySec=43200
Persistent=true
[Install]
WantedBy=timers.target
Run Code Online (Sandbox Code Playgroud)
和
# /lib/systemd/system/certbot.service
[Unit]
Description=Certbot
Documentation=file:///usr/share/doc/python-certbot-doc/html/index.html
Documentation=https://letsencrypt.readthedocs.io/en/latest/
[Service]
Type=oneshot
ExecStart=/usr/bin/certbot -q renew
PrivateTmp=true
Run Code Online (Sandbox Code Playgroud)
我是 systemd 的新手,非常感谢您的帮助!
正如 @grawity 建议的那样,我检查了我的 crontabs 并发现了这个:
foo@bar:~$ cat /etc/crontab
# /etc/crontab: system-wide crontab
# Unlike any other crontab you don't have to run the `crontab'
# command to install the new version when you edit …
Run Code Online (Sandbox Code Playgroud)