This guide is intended to provide a general overview of the process using Let’s Encrypt, and you should consult your security team or a security professional to ensure that your SSL configuration is secure and meets your organization’s requirements.
1. Update the system
As a best practice, ensure that your system is fully updated prior to the installation of any packages:
2. Install mod_ssl
Install mod_ssl as well as we are going to need it to configure our Let’s Encrypt SSL certificate:
3. Install certbot
To install certbot first we need to make sure we have the EPEL repository enabled, to do that execute the following command:
Make sure yum-utils is installed:
Then install certbot for Apache:
Now that we have certbot installed, run certbot with the following command:
Certbot will ask you for the names you would like to activate HTTPS for:
Press enter to continue and then optionally if you want you can redirect your sites to HTTPS:
If everything goes well you should see the following output:
4. Configure automatic renewal
Now we are going to add a cronjob so our Let’s Encrypt SSL certificates can be renewed automatically.
Execute the following command to edit the crontab:
Let’s Encrypt recommends the automatic renew cronjob to run twice a day, to do that add the following line and then save and exit the crontab:
Now you should have successfully installed and configured Let’s Encrypt with Apache.