OpenSSL is a security library included in all Linux systems. Its main objective is to provide an open source implementation of TLS and SSL protocols that protect and encrypt the transmission of data over a network. It is really important to use it because if our transmitted data falls into the hands of a third party, that person must decrypt it to get the information. This process is not easy to do, so by doing so, we safeguard the data.

So, let us start to install the latest version of OpenSSL on CentOS 7.

1.- Upgrade the system and install required packages
The first step is to update the system completely. This way you will have available all the available security updates.

:~$ su
:~# yum update

Then, you have to install some required packages to install OpenSSL.

:~# yum install make gcc perl pcre-devel zlib-devel


2. Install the latest version of OpenSSL on CentOS 7
OpenSSL is included in almost all Linux distributions. The problem is that they include older versions that although maintained by the distribution itself to be safe, are not the most recent. So for that, we will use the safest method which is to install it from its source code. With this, we will get a clean and reliable system.

So, first, you need to download the latest version using wget. Install it first.

:~# yum install wget
:~# wget https://ftp.openssl.org/source/old/1.1.1/openssl-1.1.1.tar.gz


At the time of this post, the latest stable version of OpenSSL is 1.1.1.

After that, decompress the file.

:~# tar xvf openssl-1.1.1.tar.gz

Next, navigate to the generated folder.

:~# cd openssl-1.1.1/
Then, you have to start configuring the package compilation using ./configure. Besides that, you have to use some parameters like the prefix where the route will be established.

:~# ./config –prefix=/usr –openssldir=/etc/ssl –libdir=lib no-shared zlib-dynamic


Now, begin compilation.

:~# make
:~# make test
Finally, install OpenSSL.

:~# make install

The process may take a few minutes. So you have to wait for it to finish.

Then, so there are no issues in using the library, we need to export the paths.

:~# export LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib64
:~# echo “export LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib64” >> ~/.bashrc
Finally, check the OpenSSL version.

:~# openssl version

We are done.