[root@dns bin]# mkdir certbot [root@dns bin]# cd certbot [root@dns certbot]# wget --no-check-certificate https://dl.eff.org/certbot-auto [root@dns certbot]# chmod +x certbot-auto
[root@dns certbot]# ./certbot-auto --apache Saving debug log to /var/log/letsencrypt/letsencrypt.log Failed to find executable apache2ctl in expanded PATH: /tmp/product:/tmp/updates:/usr/bin:/bin: /sbin:/usr/sbin:/mnt/sysimage/bin:/mnt/sysimage/usr/bin:/mnt/sysimage/usr/sbin:/mnt/sysimage/sbin: /mnt/sysimage/usr/X11R6/bin:/sbin:/usr/sbin:/root/bin:/root/bin:/usr/local/bin:/usr/local/sbin The apache plugin is not working; there may be problems with your existing configuration. The error was: NoInstallationError('Cannot find Apache control command apache2ctl',)
[root@dns certbot]# ln -s /usr/sbin/apachectl /usr/sbin/apache2ctl [root@dns certbot]# ./certbot-auto --apache -d web.csie.cyut.edu.tw Saving debug log to /var/log/letsencrypt/letsencrypt.log The apache plugin is not working; there may be problems with your existing configuration. The error was: NoInstallationError('Could not find configuration root',)
[root@dywang certbot]# yum install -y python27-libs python27 \ python27-virtualenv python27-tools python27-pip
[root@dywang certbot]# cd /etc/ [root@dywang etc]# ln -s dywang-release redhat-release [root@dywang etc]# cd -
[root@dywang certbot]# grep 'virtualenv --no-site-packages' certbot-auto VIRTUALENV_NO_DOWNLOAD=1 virtualenv --no-site-packages --python "$LE_PYTHON" "$VENV_PATH" VIRTUALENV_NO_DOWNLOAD=1 virtualenv --no-site-packages --python "$LE_PYTHON" "$VENV_PATH" \ [root@dywang certbot]# sed -i 's/\(virtualenv\)\( --no-site-packages\)/\1-2.7\2/' certbot-auto [root@dywang certbot]# grep 'virtualenv.*--no-site-packages' certbot-auto VIRTUALENV_NO_DOWNLOAD=1 virtualenv-2.7 --no-site-packages --python "$LE_PYTHON" "$VENV_PATH" VIRTUALENV_NO_DOWNLOAD=1 virtualenv-2.7 --no-site-packages --python "$LE_PYTHON" "$VENV_PATH" \
[root@dns certbot]# ./certbot-auto --webroot -w /var/www/html -d web.csie.cyut.edu.tw certonly Saving debug log to /var/log/letsencrypt/letsencrypt.log Plugins selected: Authenticator webroot, Installer None Obtaining a new certificate Performing the following challenges: http-01 challenge for web.csie.cyut.edu.tw Using the webroot path /var/www/html for all unmatched domains. Waiting for verification... Cleaning up challenges IMPORTANT NOTES: - Congratulations! Your certificate and chain have been saved at: /etc/letsencrypt/live/web.csie.cyut.edu.tw/fullchain.pem Your key file has been saved at: /etc/letsencrypt/live/web.csie.cyut.edu.tw/privkey.pem Your cert will expire on 2018-01-22. To obtain a new or tweaked version of this certificate in the future, simply run certbot-auto again. To non-interactively renew *all* of your certificates, run "certbot-auto renew" - If you like Certbot, please consider supporting our work by: Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate Donating to EFF: https://eff.org/donate-le
[root@dns ~]# ll /etc/letsencrypt/live/web.csie.cyut.edu.tw/ total 4 lrwxrwxrwx. 1 root root 49 Oct 24 11:40 cert.pem -> ../../archive/web.csie.cyut.edu.tw/cert1.pem lrwxrwxrwx. 1 root root 50 Oct 24 11:40 chain.pem -> ../../archive/web.csie.cyut.edu.tw/chain1.pem lrwxrwxrwx. 1 root root 54 Oct 24 11:40 fullchain.pem -> ../../archive/web.csie.cyut.edu.tw/fullchain1.pem lrwxrwxrwx. 1 root root 52 Oct 24 11:40 privkey.pem -> ../../archive/web.csie.cyut.edu.tw/privkey1.pem -rw-r--r--. 1 root root 543 Oct 24 11:40 README
[root@dns renewal]# vim /etc/httpd/conf.d/ssl.conf [root@dns renewal]# grep ^SSLCert /etc/httpd/conf.d/ssl.conf SSLCertificateFile /etc/letsencrypt/live/web.csie.cyut.edu.tw/cert.pem SSLCertificateKeyFile /etc/letsencrypt/live/web.csie.cyut.edu.tw/privkey.pem SSLCertificateChainFile /etc/letsencrypt/live/web.csie.cyut.edu.tw/chain.pem [root@dns renewal]# /etc/init.d/httpd reload
[root@dns certbot]# /etc/init.d/httpd reload
[root@dns certbot]# ./certbot-auto renew