March 2, 2021 / Nirav Shah
OpenSSL is a robust, commercial-grade, and full-featured toolkit for the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols. It is also a general-purpose cryptography library AnD providing support for various cryptographic algorithms such as cyphers (AES, Blowfish, DES, IDEA etc.), and cryptographic hash functions (MD5, MD4, SHA-1, SHA-2 etc.)
Step 1: Install the necessary packages for compiling
Issue the command below to install the necessary packages for compilation:
sudo apt install build-essential checkinstall zlib1g-dev -y
Step 2: Download OpenSSL
cd /usr/local/src/ sudo wget https://www.openssl.org/source/openssl-1.1.1c.tar.gz
Next, extract the downloaded file using the command below:
sudo tar -xf openssl-1.1.1c.tar.gz cd openssl-1.1.1c
Step 3: Install OpenSSL
sudo ./config --prefix=/usr/local/ssl --openssldir=/usr/local/ssl shared zlib
sudo make sudo make test sudo make install
Step 4: Configure OpenSSL Shared Libraries
cd /etc/ld.so.conf.d/ sudo nano openssl-1.1.1c.conf
Enter the following:
/usr/local/ssl/lib
Ensure to save before you exit.
Next, reload the dynamic link by issuing the command below:
sudo ldconfig -v
Step 5: Configure OpenSSL Binary
sudo mv /usr/bin/c_rehash /usr/bin/c_rehash.backup sudo mv /usr/bin/openssl /usr/bin/openssl.backup
Next, edit the /etc/environment file using vim.
sudo nano /etc/environment
Insert the following:
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/local/ssl/bin"
Ensure to save before you exit.
source /etc/environment echo $PATH
We can now check and verify our installation of the latest stable version of OpenSSL using the command below:
which openssl openssl version -a
So that’s it, OpenSSL is installed on your server.
As a Director of Eternal Web Private Ltd an AWS consulting partner company, Nirav is responsible for its operations. AWS, cloud-computing and digital transformation are some of his favorite topics to talk about. His key focus is to help enterprises adopt technology, to solve their business problem with the right cloud solutions.
Have queries about your project idea or concept? Please drop in your project details to discuss with our AWS Global Cloud Infrastructure service specialists and consultants.