First, I would suggest looking for all the commands to your specific setup here. But since I am running a combination of things that aren’t listed on that page, I had to dig elsewhere.
Centos 7 should have epel already enabled but if not…
$ sudo yum install epel-release
$ sudo yum install httpd mod_ssl python-certbot-apache
Configure certbot with your specific setup
$ sudo certbot --apache -d example.com -d www.example.com -d etc.example.com
Note: I don’t have a www domain prefix defined so I did not include that domain.
And finally, I trigger the auto renewal process.
$ sudo certbot renew

