OpenSSL, an application security library to provide secure network communication; It is extensively used by major internet servers including HTTP websites. Also, OpenSSL is licensed under an Apache-style license, meaning that it can be freely used for personal and commercial purposes. If you want to install OpenSSL libraries on your Ubuntu to protect your system’s communication when connected to a network, then this article is a guide on how to do that.
Installing OpenSSL Libraries on Ubuntu
There are two methods to install OpenSSL libraries on ubuntu, which are:
Method I: From the Official Repository
To install openSSL libraries on Ubuntu follow the below-written steps:
Step 1: Update/Upgrade Repository
In all the latest Ubuntu distributions, the openSSL package is already present in the official repository. So run the below-mentioned commands to update the repository:
sudo apt upgrade
Step 2: Install OpenSSL
Then run the below-mentioned command to install openSSL from the official repository, by running this command the openSSL libraries will also get installed:
In the output you can see a long list of openssl libraries which got installed:
Step 3: Openssl Development Tool
Usually by just installing the openssl package all the libraries of ssl get installed too, but sometimes due to missing development tools some libraries remain uninstalled. So, it is recommended to install the development tool package by using the below-mentioned command:
Removing OpenSSL Libraries on Ubuntu
To remove the OpenSSL libraries on Ubuntu, any of the below-mentioned commands can be utilized:
Or:
Method II: By Downloading the .tar file
The other method is to manually install OpenSSL by using the .tar file, this allows users to install the latest 3.0 version of openSSL and for that follow the below-written steps:
Step 1: Installing Necessary Dependencies
To manually install OpenSSL, some dependencies are required, install them by using the below-mentioned command:
Step 2: Downloading .tar File
To organize all the OpenSSL libraries, it suggested to change directory to /usr/local/src:
Then download the latest version of openSSL .tar file from the official site using the below-mentioned command:
Step 3: Extracting .tar file
After downloading the .tar file, extract it by using the below-mentioned command:
Step 4: Configuring and Compiling OpenSSL Files
Then configure and compile openSSL files by using the below-mentioned commands:
Then by using the below-mentioned command compile the files to executable forms:
Then install the those executable files by running the below-mentioned command:
Step 5: Configure Link Libraries
Create a new file using nano editor to link the configured libraries:
Inside the file paste the path of libraries:
Then save and exit the file.
Step 6: Reload the Dynamic Link
Then reload the dynamic link of configured libraries by using the below-mentioned command:
Step 7: Verifying
Finally run the below-mentioned command to verify the installed version of openSSL:
Removing OpenSSL Libraries
If you want to remove the installed openSSL libraries then for that, manually remove the directory where all the libraries are present, but before that ensure that nothing else except libraries was stored in this directory:
Conclusion
All the latest versions on Ubuntu have OpenSSL libraries in their repositories. So it is recommended to install the OpenSSL libraries from the repository using the apt command. Also, install the development tools for openSSL to successfully install all the libraries. But if you desire to install the latest version of openSSL then the .tar file method is most suited.