Let's Encrypt provides free SSL certificates, typically managed automatically by the Certbot tool. However, on CentOS 6 or RHEL 6 systems, running yum install certbot fails because the package is not in the default repositories.
Installing Certbot on CentOS 6/RHEL 6
Since these older systems are no longer officially maintained, the recommended method is to use the certbot-auto script, which handles dependencies automatically.
Run the following commands in order:
wget https://dl.eff.org/certbot-auto
sudo mv certbot-auto /usr/local/bin/certbot-auto
sudo chown root /usr/local/bin/certbot-auto
sudo chmod 0755 /usr/local/bin/certbot-auto
After installation, use /usr/local/bin/certbot-auto to request and manage SSL certificates, with the same syntax as the standard certbot command.
Installation on Other Linux Distributions
For newer systems, install Certbot directly via the package manager.
CentOS 7 / RHEL 7
Enable the EPEL repository first:
sudo yum install epel-release
sudo yum install certbot
Ubuntu / Debian
For Ubuntu 16.04+ and Debian 9+:
sudo apt update
sudo apt install certbot
For Debian 8 (Jessie), use the backports repository:
sudo apt install certbot -t jessie-backports
Important Notes
CentOS 6/RHEL 6 reached End of Life (EOL) in November 2020 and no longer receives security updates. It is strongly recommended to upgrade to a supported version (e.g., CentOS 7/8 Stream, AlmaLinux, Rocky Linux, or RHEL 7/8/9) for better security and software compatibility. On newer systems, Certbot installation and management are simpler and more reliable.