sudo yum install epel-release -y
sudo yum install certbot -y
sudo yum install python2-cloudflare.noarch python2-certbot-dns-cloudflare.noarch -y
If you use another service, find its plugin using yum, for example for digitalocean yum list * digitalocean *Run certbot once to create configs.
sudo certbot
sudo nano /etc/letsencrypt/cloudflareapi.cfg
dns_cloudflare_email = < CloudFlare > dns_cloudflare_api_key = < CloudFlare API Key>
Ahtung! This method of storing the API Key is not secure, but since you use Let's Encrypt you should not care.
At the very least, you can add sudo chmod 600 /etc/letsencrypt/cloudflareapi.cfg to limit read access.
sudo certbot certonly --cert-name example.org --dns-cloudflare --dns-cloudflare-credentials /etc/letsencrypt/cloudflareapi.cfg --server https://acme-v02.api.letsencrypt.org/directory -d "*.example.org" -d example.org
When you first start, certbot can ask you for an email address to deliver notifications, agree with ToS (select A ) and approve receipt of spam (choose N ).
IMPORTANT NOTES: - Congratulations! Your certificate and chain have been saved at: /etc/letsencrypt/live/example.org/fullchain.pem Your key file has been saved at: /etc/letsencrypt/live/example.org/privkey.pem Your cert will expire on 2018-07-21. To obtain a new or tweaked version of this certificate in the future, simply run certbot again. To non-interactively renew *all* of your certificates, run "certbot 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
I will not describe the configuration of the web server here, because my piece of config is unlikely to suit you.
You yourself must find the SSL setting for your version of the web server and CMS.
sudo certbot renew
sudo nano /etc/crontab
0 4 * * 2 root certbot renew
10 4 * * 2 root systemctl restart nginx
Source: https://habr.com/ru/post/354052/
All Articles