Categories
Linux

Installation Let’s Encrypt certbot on Oracle Linux

  1. Remove certbot from repo (if you have it)
# yum remove certbot* -y

2. Install epel release

Oracle Linux 7.x

# yum install oracle-epel-release-el7 -y

Oracle Linux 8.x

# dnf install oracle-epel-release-el8 -y

3. Install snap

Oracle Linux 7.x

# yum install snapd -y

Oracle Linux 8.x

# dnf install snapd -y

4. Start and add to autostart

# systemctl enable snapd

# systemctl start snapd

5. Install core snap and updates

# snap install core; sudo snap refresh core

6. Link libearies

# sudo ln -s /var/lib/snapd/snap /snap

7. Install certbot

# snap install --classic certbot

8. Link certbot

# ln -s /snap/bin/certbot /usr/bin/certbot

9. Generate certificate and answer for the questions

# certbot --apache

10. Check, if automatic renew is working

# certbot renew --dry-run

11. Add to crontab automatic renew. Please choose random date

# echo -e "\n12 34 * * * /usr/bin/certbot renew" >> /etc/crontab