A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
-bash: certbot: command not found #Debian apt-get install certbot #Ubuntu apt-get install certbot #Alpine apk add certbot #Arch Linux pacman -S certbot #Kali Linux apt-get install certbot #CentOS yum install certbot #Fedora dnf install certbot #OS X brew install certbot #Raspbian apt-get install certbot #Docker docker run cmd.cat/certbot certbot
Certbot 可以获取并安装 HTTPS/TLS/SSL
证书。 默认,它将尝试使用网络服务器来获取和安装证书。
certbot [SUBCOMMAND] [options] [-d DOMAIN] [-d DOMAIN] ...
更多 certbot
请详见 certbot-auto。
通过 webroot
授权获取新证书,但不要自动安装它:
sudo certbot certonly --webroot --webroot-path path/to/webroot --domain subdomain.example.com
通过 nginx 授权获取新证书,并自动安装新证书:
sudo certbot --nginx --domain subdomain.example.com
通过 apache 授权获取新证书,并自动安装新证书:
sudo certbot --apache --domain subdomain.example.com
续订所有在 30 天或更短时间内到期的 Let's Encrypt 证书(不要忘了之后重新启动使用它们的任何服务器):
sudo certbot renew
模拟获取新证书,但实际上不将任何新证书保存到磁盘:
sudo certbot --webroot --webroot-path path/to/webroot --domain subdomain.example.com --dry-run
而是获取不受信任的测试证书:
sudo certbot --webroot --webroot-path path/to/webroot --domain subdomain.example.com --test-cert
注意:修改其中的任何文件 /etc/letsencrypt
可能会损坏它们,因此 Certbot 无法再正确管理其证书,我们不建议这样做..