OpenSSL install on your AWS server

OpenSSL install on your AWS server

March 2, 2021 / Nirav S

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

openssl-install-on-your-aws-server-1

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

openssl-install-on-your-aws-server-1

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"

openssl-install-on-your-aws-server-1

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.

Talk to AWS Certified Consultant

    Let Us Talk About Your AWS Development Requirements

    Have queries about your AWS project ideas and concepts? Please drop in your project details to discuss with our AWS experts, professionals and consultants.

    • Swift Hiring and Onboarding
    • Experienced and Trained AWS Team
    • Quality Consulting and Programming
    Let’s Connect and Discuss Your Project