📜  apt-get install certbot - Shell-Bash (1)

📅  最后修改于: 2023-12-03 15:13:27.516000             🧑  作者: Mango

apt-get install certbot - Shell-Bash

简介

certbot是由EFF(Electronic Frontier Foundation)开发的一款SSL/TLS证书管理工具,用来自动化申请、更新和部署SSL/TLS证书。它还支持“插件”机制,可以轻松集成到你的Web服务器软件中,如Nginx和Apache。

特性
  • 自动化证书申请和更新
  • 支持大多数主流服务器软件
  • 可插拔的插件机制
  • 简单易用的命令行工具
安装

要在Ubuntu上安装certbot,只需使用以下命令:

sudo apt-get update
sudo apt-get install software-properties-common
sudo add-apt-repository universe
sudo add-apt-repository ppa:certbot/certbot
sudo apt-get update
sudo apt-get install certbot

安装完成后,你可以运行以下命令来验证是否安装成功:

certbot --version
使用

使用certbot申请证书很简单,只需运行以下命令:

sudo certbot certonly --webroot -w /var/www/example.com -d example.com -d www.example.com

在上述命令中,--webroot指定使用Web根目录验证域名,-w指定Web根目录路径,-d指定证书中包含的域名。

更多详细文档请参考Certbot Documentation.