Installing OpenSSL

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

›_ Console

For RHEL
# yum update For Ubuntu:
# apt-get update
tmpzrpqzxyw.png

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

  1. Install dependent packages for openssl

›_ Console

For RHEL
# yum install make gcc perl pcre-devel zlib-devel For Ubuntu
# apt install build-essential checkinstall zlib1g-dev libtemplate-perl
  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
tmpq775fhyl.jpg

Figure 1: OpenSSL version output

tmpzrpqzxyw.png


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