Install software

Centos 7

yum install python-certbot-apache

CentOS 6

mkdir -p /root/software
cd /root/software
wget https://dl.eff.org/certbot-auto
chmod a+x certbot-auto
cp ./certbot-auto /usr/local/bin/certbot
certbot

Prepare for autorenew

touch /var/log/letsencrypt.log
nano /etc/crontab
# Certbot
0 0 * * * root certbot renew >> /var/log/letsencrypt.log
systemctl restart crond

Manual Standalone renew

service httpd stop
certbot renew --standalone --email sysadmins@site.com
service httpd start
First time creation
VHOST='www.site.com'
EMAIL='sysadmins@site.com'
WEB_ROOT=/var/www/vhosts/$VHOST

systemctl stop nginx
certbot certonly --standalone --email $EMAIL -d $VHOST
systemctl start nginx
Advertisements