Centos
無法在 CentOS 7 上安裝 Let’s Encrypt 證書
我正在嘗試在 CentOS 7 上使用 Securing Apache with Let’s Encrypt 將 Let’s Encrypt SSL 證書安裝到我的網站。
我的網路伺服器是(包括版本):Apache (cPanel)
我的託管服務提供商是:GoDaddy
按照此連結進行操作,STEP-1 和 STEP-2 成功
了解我的 VPS 中沒有設置防火牆
sudo yum install epel-release sudo yum install httpd mod_ssl python-certbot-apache sudo systemctl start httpd systemctl status httpd curl www.example.com ((Note: works)) sudo certbot --apache -d example.com -d www.example.com
最後一條命令會產生錯誤,如下所示:
sudo: certbot: command not found
我試圖通過安裝 certbot
sudo yum install certbot
並安裝成功
Installed: certbot.noarch 0:0.27.1-1.el7 Dependency Installed: audit-libs-python.x86_64 0:2.8.1-3.el7_5.1 checkpolicy.x86_64 0:2.5-6.el7 libcgroup.x86_64 0:0.41-15.el7 libsemanage-python.x86_64 0:2.5-11.el7 policycoreutils-python.x86_64 0:2.5-22.el7 pyOpenSSL.x86_64 0:0.13.1-3.el7 python-IPy.noarch 0:0.75-6.el7 python-cffi.x86_64 0:1.6.0-5.el7 python-enum34.noarch 0:1.0.4-1.el7 python-idna.noarch 0:2.4-1.el7 python-ndg_httpsclient.noarch 0:0.3.2-1.el7 python-ply.noarch 0:3.4-11.el7 python-pycparser.noarch 0:2.14-1.el7 python-requests.noarch 0:2.6.0-1.el7_1 python-requests-toolbelt.noarch 0:0.8.0-1.el7 python-six.noarch 0:1.9.0-2.el7 python-urllib3.noarch 0:1.10.2-5.el7 python-zope-component.noarch 1:4.1.0-3.el7 python-zope-event.noarch 0:4.0.3-2.el7 python-zope-interface.x86_64 0:4.0.5-4.el7 python2-acme.noarch 0:0.27.1-1.el7 python2-certbot.noarch 0:0.27.1-1.el7 python2-configargparse.noarch 0:0.11.0-1.el7 python2-cryptography.x86_64 0:1.7.2-2.el7 python2-future.noarch 0:0.16.0-6.el7 python2-josepy.noarch 0:1.1.0-1.el7 python2-mock.noarch 0:1.0.1-9.el7 python2-parsedatetime.noarch 0:2.4-5.el7 python2-pyasn1.noarch 0:0.1.9-7.el7 python2-pyrfc3339.noarch 0:1.0-2.el7 python2-requests.noarch 0:2.6.0-0.el7 python2-six.noarch 0:1.9.0-0.el7 pytz.noarch 0:2016.10-2.el7 setools-libs.x86_64 0:3.3.8-2.el7 Complete!
我再次嘗試為我的域申請 SSL 證書。
sudo certbot --apache -d example.com -d www.example.com
這次它回來了
Saving debug log to /var/log/letsencrypt/letsencrypt.log The requested apache plugin does not appear to be installed
/var/log/letsencrypt/letsencrypt.log
2018-11-02 08:15:55,542:DEBUG:certbot.main:certbot version: 0.27.1 2018-11-02 08:15:55,542:DEBUG:certbot.main:Arguments: ['--apache', '-d', 'example.com', '-d', 'www.example.com'] 2018-11-02 08:15:55,543:DEBUG:certbot.main:Discovered plugins: PluginsRegistry(PluginEntryPoint#manual,PluginEntryPoint#null,PluginEntryPoint#standalone,Plugi$ 2018-11-02 08:15:55,611:DEBUG:certbot.log:Root logging level set at 20 2018-11-02 08:15:55,611:INFO:certbot.log:Saving debug log to /var/log/letsencrypt/letsencrypt.log 2018-11-02 08:15:55,613:DEBUG:certbot.plugins.selection:Requested authenticator apache and installer apache 2018-11-02 08:15:55,613:DEBUG:certbot.plugins.selection:No candidate plugin 2018-11-02 08:15:55,614:DEBUG:certbot.plugins.selection:Selected authenticator None and installer None
注意:我用我的實際域替換了 example.com
更新 1
我試過了
sudo yum install python-certbot-apache
它正在返回
--> Finished Dependency Resolution Error: Package: python2-certbot-apache-0.27.1-1.el7.noarch (epel) Requires: mod_ssl You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest
這樣做有什麼問題?:
sudo yum install mod_ssl sudo a2enmod ssl
(然後重新啟動apache)