Steps to Install OpenSSL in Ubuntu

Update the Ubuntu repository and install package dependencies
sudo apt update
sudo apt install build-essential checkinstall zlib1g-dev -y

Download OpenSSL
cd /usr/local/src/

Now extract the openssl.tar.gz file, and go to the ‘openssl’ directory.
tar -xf openssl-1.0.2o.tar.gz
cd openssl-1.0.2o

Install OpenSSL
cd /usr/local/src/openssl-1.0.2o

Configure and compile OpenSSL
./config --prefix=/usr/local/ssl --openssldir=/usr/local/ssl shared zlib

make test
make install

Configure Link Libraries

cd /etc/
vim openssl-1.0.2o.conf

Paste the openssl library path directory.

Save and exit.

Reload the dynamic link
sudo ldconfig -v

Configure OpenSSL Binary
mv /usr/bin/c_rehash /usr/bin/c_rehash.BEKUP
mv /usr/bin/openssl /usr/bin/openssl.BEKUP

Edit the ‘/etc/environment’ file using vim.
vim /etc/environment

Now add the new OpenSSL binary directory as below

Save and exit.

Reload the environment file and test the new updated binary PATH.
source /etc/environment
echo $PATH
which openssl

openssl version -a

Tagged: , ,

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: