These instructions are usefull to set up a TLS/SSL certificate from Let’s Encrypt on a CentOS 7 server running Apache as a web server.
Download the Let’s Encrypt Client
git clone https://github.com/letsencrypt/letsencrypt /opt/letsencryptù
Set Up the SSL Certificate
cd /opt/letsencrypt
Install a single certificate that is valid for multiple domains or subdomains
./letsencrypt-auto --apache -d website.com -d www.website.com
Set Up Auto Renewal
Let’s Encrypt certificates are valid for 90 days, but it’s recommended that you renew the certificates every 60 days. Let's Encrypt client has a renew command that automatically checks the currently installed certificates and tries to renew them if they are less than 30 days away from the expiration date.
To update the Let’s Encrypt Client
# Install Epel Repository yum install epel-release
Download the Let’s Encrypt Client
git clone https://github.com/letsencrypt/letsencrypt /opt/letsencryptù
Set Up the SSL Certificate
cd /opt/letsencrypt
Install a single certificate that is valid for multiple domains or subdomains
./letsencrypt-auto --apache -d website.com -d www.website.com
Set Up Auto Renewal
Let’s Encrypt certificates are valid for 90 days, but it’s recommended that you renew the certificates every 60 days. Let's Encrypt client has a renew command that automatically checks the currently installed certificates and tries to renew them if they are less than 30 days away from the expiration date.
./letsencrypt-auto renew
Create a cron job that will periodically execute the automatic renewal command.
To update the Let’s Encrypt Client
- cd /opt/letsencrypt
- git pull