ubuntu16.04 server下
1、添加源
sudo add-apt-repository ppa:certbot/certbot
如果報命令 add-apt-repository
找不到,運行 sudo apt-get install -y software-properties-common python-software-properties
後
再執行上述命令
2、更新
sudo apt-get update
3、安裝相關包
sudo apt-get install -y certbot python-certbot-nginx
4、首次運行時配置certbot
certbot --nginx
按照提示輸入郵箱、a(同意軟件協議)、y
後續就會自動尋找需要加https的域名,也可以手動輸入
ubuntu18.04 server下
1、更新
sudo apt update
2、安裝相關包
sudo apt install -y certbot python-certbot-nginx
3、首次運行時配置certbot
certbot --nginx
按照提示輸入郵箱、a(同意軟件協議)、y
後續就會自動尋找需要加https的域名,也可以手動輸入
centos7 server下
1、直接安裝相關包
yum install certbot python2-certbot-nginx
2、首次運行時配置certbot
certbot --nginx
按照提示輸入郵箱、a(同意軟件協議)、y
後續就會自動尋找需要加https的域名,也可以手動輸入