OpenSSL, an application security library for providing secure network communications; It is used extensively by major internet servers including HTTP websites. Also, OpenSSL is licensed under a Apache-style license, which means it’s free to use 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 to do it.
Installing OpenSSL Libraries on Ubuntu
There are two methods to install OpenSSL libraries on Ubuntu:
Method I: From the official repository
To install openSSL libraries on Ubuntu, follow the steps outlined below:
Step 1: Update/Upgrade Repository
In all the latest Ubuntu distributions, the openSSL package is already present in the official repository. So, run the commands mentioned below to update the repository:
sudo appropriate upgrade
Step 2: Install OpenSSL
Then run the below-mentioned command to install openSSL from the official repository. Running this command will also install the openSSL libraries:
In the output you will see a long list of openssl libraries that have been installed:
Step 3: openssl development tool
Usually simply installing the openssl package will also install all the libraries of SSL, but sometimes some libraries are left uninstalled due to lack of development tools. So it is recommended to install the development tools package using the command mentioned below:
Removal of OpenSSL libraries on Ubuntu
To remove the OpenSSL libraries on Ubuntu, any of the commands mentioned below can be used:
Or:
Method II: By downloading the .tar file
The other method is to manually install OpenSSL using the .tar file. This allows users to install the latest version 3.0 of openSSL by following the steps outlined below:
Step 1: Install the required dependencies
To install OpenSSL manually some dependencies are required, install them with below mentioned command:
Step 2: Download the .tar file
To organize all OpenSSL libraries it was suggested to change the directory to /usr/local/src:
Then download the latest version of openSSL.tar File from official site using below mentioned command:
Step 3: Extract the .tar file
After downloading the .tar file, extract it using the command mentioned below:
Step 4: Configure and Compile OpenSSL Files
Then configure and compile openSSL files using the commands below:
Then compile the files into executable forms using the command mentioned below:
Then install these executables by running the command mentioned below:
Step 5: Configure link libraries
Create a new file with the nano editor to link the configured libraries:
In the file, paste the path of the libraries:
Then save and exit the file.
Step 6: Reload the dynamic link
Then reload the dynamic linking of configured libraries using the command mentioned below:
Step 7: Verify
Finally, run the below-mentioned command to check the installed version of openSSL:
Removal of OpenSSL libraries
If you want to remove the installed openSSL libraries, do this manually by removing the directory where all the libraries are present, but before doing that make sure that nothing but libraries have been stored in that directory:
Diploma
All latest releases on Ubuntu have OpenSSL libraries in their repositories. It is therefore recommended to install the OpenSSL libraries from the repository using the apt command. Also, install the development tools for openSSL to successfully install all libraries. However, if you want to install the latest version of openSSL, the .tar file method is best.