FedoraRHEL Based

How To Install OpenSSL on Fedora 40

Install OpenSSL on Fedora 40

In this tutorial, we will show you how to install OpenSSL on Fedora 40. OpenSSL is a robust, full-featured open-source toolkit implementing the Secure Sockets Layer (SSL) and Transport Layer Security (TLS) protocols. It is widely used for securing communications over computer networks. Fedora 40, the latest version of the Fedora operating system, offers a cutting-edge platform for developers and system administrators.

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo‘ to the commands to get root privileges. I will show you the step-by-step installation of the OpenSSL on Fedora 40.

Prerequisites

Before we dive into the installation process, ensure that you have the following prerequisites in place:

  • A server running one of the following operating systems: Fedora 40.
  • It’s recommended that you use a fresh OS install to prevent any potential issues.
  • You will need access to the terminal to execute commands. Fedora provides the Terminal application for this purpose. It can be found in your Applications menu.
  • A stable internet connection to download the necessary packages.
  • A non-root sudo user or access to the root user. We recommend acting as a non-root sudo user, however, as you can harm your system if you’re not careful when acting as the root.

Install OpenSSL on Fedora 40

Step 1. Update the System.

Before installing OpenSSL, it’s crucial to update your Fedora 40 system packages to ensure that you have the latest versions available. Updating the system packages helps to address any security vulnerabilities and compatibility issues that may exist in older versions. To update your system packages, open a terminal and run the following command:

sudo dnf clean all
sudo dnf update

The package manager will retrieve the latest package information and prompt you to confirm the update. Press “y” and hit Enter to proceed with the update process. Depending on the number of updates available, this step may take a few minutes to complete.

Step 2. Installing Dependencies.

To compile and install OpenSSL on Fedora 40, you need to have certain dependencies installed on your system. These dependencies include development tools and libraries that are necessary for the compilation process. To install the required dependencies, run the following commands in your terminal:

sudo dnf groupinstall 'Development Tools'
sudo dnf install perl-core zlib-devel

Step 3. Installing OpenSSL on Fedora 40.

To install OpenSSL on Fedora 40, you need to download the source code package from the official OpenSSL website. Downloading the source code allows you to compile and install the latest version of OpenSSL, ensuring that you have access to the most recent security fixes and features. To download the OpenSSL source code, follow these steps:

cd /usr/local/src
wget https://www.openssl.org/source/openssl-3.3.0.tar.gz

Extract the downloaded source code archive using the tar command:

tar -xf openssl-3.3.0.tar.gz

Change to the extracted directory:

cd openssl-3.3.0

With the OpenSSL source code downloaded and extracted, the next step is to configure and compile the package:

./config --prefix=/usr/local/ssl --openssldir=/usr/local/ssl shared zlib

Once the configuration is complete, compile OpenSSL by running the following commands:

make
make test

If any errors occur during the compilation or testing phase, review the output carefully and address any missing dependencies or configuration issues before proceeding.

After successfully configuring and compiling OpenSSL, the final step is to install the package on your Fedora 40 system:

sudo make install

Once the installation is complete, you can verify the installed version of OpenSSL by running the following command:

/usr/local/ssl/bin/openssl version -a

This command executes the OpenSSL binary from the installation directory and displays detailed version information, including the version number, build date, and compile-time options.

Step 4. Configure the System to Use the New OpenSSL.

After installing OpenSSL on your Fedora 40 system, it’s important to configure your system to use the newly installed version. By default, Fedora may still use the older version of OpenSSL that comes pre-installed with the operating system. To ensure that your applications and services take advantage of the latest OpenSSL features and security fixes, follow these steps to configure your system.

Create a backup of the existing OpenSSL binary by running the following command:

sudo mv /usr/bin/openssl /usr/bin/openssl.bak

Create a symbolic link from the newly installed OpenSSL binary to the system’s openssl command:

sudo ln -s /usr/local/ssl/bin/openssl /usr/bin/openssl

Update the system’s library path to include the new OpenSSL libraries:

echo "/usr/local/ssl/lib" | sudo tee /etc/ld.so.conf.d/openssl-3.3.0.conf
sudo ldconfig -v

Verify that the new OpenSSL version is being used by running the following command:

openssl version -a

This command should display the version information for the newly installed OpenSSL, confirming that the system is now using the updated version.

Congratulations! You have successfully installed OpenSSL. Thanks for using this tutorial for installing the OpenSSL on Fedora 40 system. For additional help or useful information, we recommend you check the OpenSSL website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!

r00t

r00t is an experienced Linux enthusiast and technical writer with a passion for open-source software. With years of hands-on experience in various Linux distributions, r00t has developed a deep understanding of the Linux ecosystem and its powerful tools. He holds certifications in SCE and has contributed to several open-source projects. r00t is dedicated to sharing her knowledge and expertise through well-researched and informative articles, helping others navigate the world of Linux with confidence.
Back to top button