How to install Let’s Encrypt SSL on CentOS 7 with Apache
Step 1 – Installing the Certbot
Install CentOS 7 EPEL repository
# yum install epel-release
Install all of the required packages
# yum install certbot python2-certbot-apache mod_ssl
Step 2 – Obtaining a Certificate
Obtain a certificate that covers only a single domain
# certbot --apache -d domain.com
Obtain a single certificate that covers multiple domains or subdomains
# certbot --apache -d domain.com -d domain2.com
# certbot --apache -d domain.com -d www.domain.com
Step 3 – Setting Up Auto Renewal
Edit the crontab to create a new job that will run the renewal twice per day. To edit the crontab for the root user
# crontab -e
Enter insert mode by pressing i and add in the following line:
* */12 * * * /usr/bin/certbot renew >/dev/null 2>&1
Now, press Esc to leave insert mode, then :wq and ENTER to save and exit the file.