我通过以下本教程安装了Certbot:
sudo add-apt-repository ppa:certbot/certbot
sudo apt-get update
sudo apt-get install python-certbot-nginx现在我想设置我的证书,但我需要dns-digitalocean插件:
# certbot certonly --dns-digitalocean
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Could not choose appropriate plugin: The requested dns-digitalocean plugin does not appear to be installed
The requested dns-digitalocean plugin does not appear to be installed我尝试用pip安装它:
pip install certbot-dns-digitalocean但显然,apt-get版本并没有“看到”它。
如何正确安装?
发布于 2018-09-05 02:02:58
第一轮
# type certbot
certbot is hashed (/usr/bin/certbot)找出安装certbot的位置。或者command -v certbot,如果你愿意的话。
然后运行head /usr/bin/certbot并注意它使用的是哪个版本的Python:
#!/usr/bin/python3在我的例子中,它使用的是Python 3。
我从pip输出中注意到,它试图安装Python2.7包:
# pip install certbot-dns-digitalocean
Requirement already satisfied: certbot-dns-digitalocean in /usr/local/lib/python2.7/dist-packages那么,我们如何获得pip来安装Python 3软件包呢?只需复制来自这里的说明:
cd /tmp
curl -O https://bootstrap.pypa.io/get-pip.py
python3 get-pip.py
rm get-pip.py现在您应该有了pip3命令,所以请运行以下命令:
pip3 install certbot-dns-digitalocean现在再试一次
# certbot plugins
Saving debug log to /var/log/letsencrypt/letsencrypt.log
-------------------------------------------------------------------------------
* dns-digitalocean
Description: Obtain certs using a DNS TXT record (if you are using DigitalOcean
for DNS).
Interfaces: IAuthenticator, IPlugin
Entry point: dns-digitalocean =
certbot_dns_digitalocean.dns_digitalocean:Authenticator发布于 2018-08-25 16:02:14
更好的方法,感谢其他人的回应帮助我做到这一点。
确定当前安装了哪些插件:
# certbot-auto plugins
Saving debug log to /var/log/letsencrypt/letsencrypt.log
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
* apache
Description: Apache Web Server plugin - Beta
Interfaces: IAuthenticator, IInstaller, IPlugin
Entry point: apache = certbot_apache.entrypoint:ENTRYPOINT
* nginx
Description: Nginx Web Server plugin
Interfaces: IAuthenticator, IInstaller, IPlugin
Entry point: nginx = certbot_nginx.configurator:NginxConfigurator
* standalone
Description: Spin up a temporary webserver
Interfaces: IAuthenticator, IPlugin
Entry point: standalone = certbot.plugins.standalone:Authenticator
* webroot
Description: Place files in webroot directory
Interfaces: IAuthenticator, IPlugin
Entry point: webroot = certbot.plugins.webroot:Authenticator
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -确定您的certbot (在我的例子中是certbot-auto)安装的位置:
# find / -name certbot
/opt/eff.org/certbot
...进入虚拟环境并安装插件
cd /opt/eff.org/certbot/venv
source bin/activate
pip install certbot-dns-google
deactivate再次验证certbot插件
# certbot-auto plugins
Saving debug log to /var/log/letsencrypt/letsencrypt.log
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
* apache
Description: Apache Web Server plugin - Beta
Interfaces: IAuthenticator, IInstaller, IPlugin
Entry point: apache = certbot_apache.entrypoint:ENTRYPOINT
* dns-google
Description: Obtain certificates using a DNS TXT record (if you are using Google
Cloud DNS for DNS).
Interfaces: IAuthenticator, IPlugin
Entry point: dns-google = certbot_dns_google.dns_google:Authenticator
* nginx
Description: Nginx Web Server plugin
Interfaces: IAuthenticator, IInstaller, IPlugin
Entry point: nginx = certbot_nginx.configurator:NginxConfigurator
* standalone
Description: Spin up a temporary webserver
Interfaces: IAuthenticator, IPlugin
Entry point: standalone = certbot.plugins.standalone:Authenticator
* webroot
Description: Place files in webroot directory
Interfaces: IAuthenticator, IPlugin
Entry point: webroot = certbot.plugins.webroot:Authenticator
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -发布于 2018-07-16 19:43:41
现在(2018年7月),您应该可以使用
pip install certbot-dns-digitalocean或
git clone https://github.com/certbot/certbot.git
cd certbot/certbot-dns-digitalocean/
python setup.py install您可能需要sudo特权。
安装后,您可能无法看到插件与certbot plugins,但您应该能够certbot certonly --dns-digitalocean只是很好。
https://devops.stackexchange.com/questions/3757
复制相似问题