Installing OpenSSL

  1. (Optional) It is recommended to update the system with latest security patch.

›_ Console

For RHEL

# dnf upgrade

If you are using existing or pre-installed openssl then skip step 2, 3, 4, and 5.

2. Install dependent packages for openssl.

›_ Console

For RHEL

# dnf install make gcc perl pcre-devel zlib-devel

  1. Download the latest version of openssl on Linux machine from https://www.openssl.org.

›_ Console

# wget https://www.openssl.org/source/openssl-1.1.1q.tar.gz

  1. Extract the downloaded file.

›_ Console

# tar xvf openssl-1.1.1q.tar.gz

  1. Go to openssl directory and run the following commands to build and install openssl.

›_ Console

# cd openssl-1.1.1q

# ./config --prefix=/usr/local/openssl

# make

# make test

# make install

# export LD_LIBRARY_PATH=/usr/local/openssl/lib:$LD_LIBRARY_PATH

# export PATH=/usr/local/openssl/bin:$PATH

# openssl version -a

ca988935-dfb5-44ed-9d10-94814987a931.jpg

OpenSSL version output

After rebooting the server, export the library path every time.

# export

LD_LIBRARY_PATH=/usr/local/openssl/lib:$LD_LIBRARY_PATH # export PATH=/usr/local/openssl/bin:$PATH