Share your love
Efficiently Install Latest OpenSSL in RHEL 9 From Source
In this guide, you will learn to Install Latest OpenSSL in RHEL 9 from the source. OpenSSL is an open-source security library that is used by apps, operating systems, and websites to secure their communication over the internet with SSL and TLS.
Now you can proceed to the rest of the article to Build and Install Latest OpenSSL in RHEL 9 From Source. You can use this instruction on AlmaLinux 9 and Rocky Linux 9.
- Step-by-step Build and Install Latest OpenSSL in RHEL 9 From Source
- Step 1 - Install Required Packages for Installing Latest OpenSSL in RHEL 9
- Step 2 - Download the Latest OpenSSL Version from Source in RHEL 9
- Step 3 - Build and Install Latest OpenSSL in RHEL 9 From Source
- Step 4 - Update system-wide OpenSSL configuration in RHEL 9
- Step 5 - Check the OpenSSL Version in RHEL 9
Step-by-step Build and Install Latest OpenSSL in RHEL 9 From Source
Before you start your OpenSSL setup from the source, you need to log in to your RHEL 9 server as a non-root user with sudo privileges. In this guide, we use AlmaLinux 9 to show you the guide steps. For this purpose, you can check the Initial Server Setup with AlmaLinux 9.
You can now follow the steps below to Build and Install Latest OpenSSL in RHEL 9 From Source.
Step 1 – Install Required Packages for Installing Latest OpenSSL in RHEL 9
First, you must run the system update with the following command:
sudo dnf update -y
Then, you must install the Development Tools in RHEL 9 with the following command:
sudo dnf groupinstall "Development Tools" -y
Now you need some required packages to Install Latest OpenSSL in RHEL 9. To do this, run the following command:
sudo dnf install perl perl-IPC-Cmd perl-Test-Simple -y
Step 2 – Download the Latest OpenSSL Version from Source in RHEL 9
At this point, you must visit the GitHub Releases page for OpenSSL and get the latest package by using the following wget command. At the current time, the latest version of OpenSSL is 3.2.1.
sudo wget https://github.com/openssl/openssl/releases/download/openssl-3.2.1/openssl-3.2.1.tar.gz
Then, extract your OpenSSL downloaded file with the following command:
sudo tar xvf openssl-3.2.1.tar.gz
Now navigate to your OpenSSL directory to build and install latest OpenSSL in RHEL 9 from the source:
sudo cd openssl-3.2*/
Step 3 – Build and Install Latest OpenSSL in RHEL 9 From Source
First, you must run the configure script for your OpenSSL with the command below:
sudo ./config
Once it is done, you will get the following output:
Then, you can run the following commands to build and install latest OpenSSL in RHEL 9:
# sudo make
# sudo make test
# sudo make install
These commands may take some time to complete. Once you are done, update links and caches by using the command below:
sudo ldconfig
Step 4 – Update system-wide OpenSSL configuration in RHEL 9
At this point, you must run the command below to update your OpenSSL config path in RHEL 9:
sudo tee /etc/profile.d/openssl.sh<<EOF
export PATH=/usr/local/openssl/bin:\$PATH
export LD_LIBRARY_PATH=/usr/local/openssl/lib:\$LD_LIBRARY_PATH
EOF
To apply the changes, reload the shell environment with the following command:
sudo source /etc/profile.d/openssl.sh
Step 5 – Check the OpenSSL Version in RHEL 9
At this point, you have learned to build, configure, and install latest OpenSSL in RHEL 9 from the source. Now you can verify your installation by checking the OpenSSL version:
openssl version
Output
OpenSSL 3.2.1 30 Jan 2024 (Library: OpenSSL 3.2.1 30 Jan 2024)
That’s it, you are done. You have successfully installed the latest OpenSSL.
Conclusion
At this point, you have learned to build and install latest OpenSSL in RHEL 9 from the source. OpenSSL is an important security library that helps you to secure your communication over the internet with SSL and TLS. Hope you enjoy it.
Also, you may like to read the following articles:
Install Scponly on AlmaLinux 9 – Secure File Transfer Protocol
Install Flask on AlmaLinux 9 – Web App Framework for Python