Securing your website with an SSL certificate is essential in today’s online world. In this guide, we will show you how to install Let’s Encrypt on Oracle Linux to obtain a free SSL certificate for your domain. Let’s Encrypt is a popular Certificate Authority (CA) that provides free SSL certificates for websites, making it easier and more affordable for website owners to secure their sites.
Prerequisites
Before we begin, make sure you have the following:
- An Oracle Linux server with root access
- A registered domain name
- A web server installed (Apache or Nginx)
- Python installed on your server
How to Install Let’s Encrypt on Oracle Linux
Installing Certbot on Oracle Linux
Certbot is the official Let’s Encrypt client that simplifies the process of obtaining and renewing SSL certificates. To install Certbot, run the following commands:
sudo yum install -y epel-release
sudo yum install -y certbot
Install the Web Server Plugin
Certbot supports both Apache and Nginx. Depending on the web server you’re using, you need to install the corresponding plugin. If you’re using Apache, run the following command:
sudo yum install -y python2-certbot-apache
For Nginx, run this command:
sudo yum install -y python2-certbot-nginx
Obtain an SSL Certificate
Now that Certbot and the necessary plugin are installed, it’s time to obtain an SSL certificate. If you’re using Apache, run the following command:
sudo certbot --apache -d example.com -d www.example.com
Replace example.com
and www.example.com
with your domain name and its www subdomain.
If you’re using Nginx, use this command instead:
sudo certbot --nginx -d example.com -d www.example.com
Certbot will ask for your email address to register your account and send notifications about certificate expiration. It will also ask if you want to share your email with the Electronic Frontier Foundation (EFF). After that, it will automatically configure your web server to use the newly obtained SSL certificate.
Verify the Let’s Encrypt SSL Certificate
To confirm that your SSL certificate is correctly installed and working, visit your website using HTTPS (e.g., https://example.com
). You should see a padlock icon in the address bar, indicating that the connection is secure.
Set Up Let’s Encrypt Automatic Renewal
Let’s Encrypt certificates are valid for 90 days. To avoid manual renewal, set up an automatic renewal process using a cron job. First, open the crontab file:
sudo crontab -e
Add the following line to the file to run the renewal process every day at 3:30 AM:
30 3 * * * /usr/bin/certbot renew --quiet
Save and exit the file. Certbot will now attempt to renew the certificate daily, but it will only perform the renewal if the certificate is less than 30 days away from expiration.
Conclusion
Congratulations! You have successfully installed Let’s Encrypt on your Oracle Linux server and obtained a free SSL certificate for your domain. Now your website is more secure and trustworthy for your visitors.
If you need further assistance with Oracle Linux, check out our other tutorials, such as:
- How to Install PHP on Oracle Linux
- How to Install Unzip on Oracle Linux
- How to Install CSF on Linux Server
- How to Install MariaDB Server on Oracle Linux
- How to Set Up a MySQL Database Server on Oracle Linux
Remember to keep your server and applications up to date, and always follow best security practices to maintain a secure and reliable web presence. Happy hosting!