Install OpenSSL
The section below describes how to install OpenSSL on your Linux host. Please use the steps relevant to your operating system.
RHEL / CentOS 8.x
dnf updatednf install openssl
Ubuntu 20.04 LTS
Install dependencies
sudo apt-get update && sudo apt-get upgradesudo apt install build-essential checkinstall zlib1g-dev -y
Download OpenSSL
cd /usr/local/src/wget https://www.openssl.org/source/openssl-1.1.1k.tar.gztar -xf openssl-1.1.1k.tar.gzcd openssl-1.1.1k.tar.gz
Install and compile OpenSSL
./config --prefix=/usr/local/ssl --openssldir=/usr/local/ssl shared zlibmakemake test
Wait for the compile process to complete and then run
make install
Configure link libraries
Configure the shared libraries for OpenSSL. The new OpenSSL binary will load library files from the '/usr/local/ssl/lib' directory.
cd /etc/ld.so.conf.d/nano openssl-1.1.1k.conf
Add the following line to the conf file and save.
/usr/local/ssl/lib
Reload the dynamic link.
sudo ldconfig -v
Configure OpenSSL Binary
Replace the default openssl binary which is in '/usr/bin/openssl or /bin/openssl' with the new version in '/usr/local/ssl/bin/openssl'.
Backup the binary files
mv /usr/bin/c_rehash /usr/bin/c_rehash.BEKUPmv /usr/bin/openssl /usr/bin/openssl.BEKUP
Edit the /etc/environment file and update the path
nano /etc/environment
Add the following to the end of the PATH
variable
:/usr/local/ssl/bin
Reload the environment variable.
source /etc/environmentecho $PATH
Validate the version
You can validate the version by running openssl version -a
again.