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.

Nirav Shah is the Director of Eternal Web Pvt Ltd, an AWS Advanced Consulting Partner and certified Odoo Partner based in the UK. With over a decade of experience in cloud computing, digital transformation, and ERP implementation, Nirav helps enterprises adopt the right technology to solve complex business challenges. He specialises in AWS infrastructure, Odoo ERP, and web development solutions for businesses across the UK and beyond.
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.