DEV Community

Nikola Stojiljkovic
Nikola Stojiljkovic

Posted on

Update OpenSSL to 3.0 on CentOS7

Prerequisites

Use sudo when needed.

Install perl-IPC-Cmd and perl-Test-Simple:

sudo yum install perl-IPC-Cmd perl-Test-Simple
Enter fullscreen mode Exit fullscreen mode

Download and install OpenSSL 3.0

Go to OpenSSL's download page and copy the link to the latest version. At this time it's 3.0.0. Then run (adapt the command to reflect your version):

cd /usr/src
wget https://www.openssl.org/source/openssl-3.0.0.tar.gz
tar -zxf openssl-3.0.0.tar.gz
rm openssl-3.0.0.tar.gz
Enter fullscreen mode Exit fullscreen mode

Compile, make, test and install OpenSSL:

cd /usr/src/openssl-3.0.0
./config
make
make test
make install
Enter fullscreen mode Exit fullscreen mode

Create symlinks to libssl and libcrypto:

ln -s /usr/local/lib64/libssl.so.3 /usr/lib64/libssl.so.3
ln -s /usr/local/lib64/libcrypto.so.3 /usr/lib64/libcrypto.so.3
Enter fullscreen mode Exit fullscreen mode

Test the installed version with:

openssl version
Enter fullscreen mode Exit fullscreen mode

You should get something like this:

OpenSSL 3.0.0 7 sep 2021 (Library: OpenSSL 3.0.0 7 sep 2021)
Enter fullscreen mode Exit fullscreen mode

Discussion (0)