In this guide I will upgrade CentOS 7 native OpenSSL to version 3.0.1.
Let’s begin.
1. Install the prerequisites.
yum -y install gcc perl-core pcre-devel zlib-devel
2. Download the latest version of OpenSSL 3.
cd /opt
wget https://www.openssl.org/source/openssl-3.0.1.tar.gz
3. Extract the downloaded tarball and delete the tarball after extracted (Optional).
tar -xvzf openssl-3.0.1.tar.gz
rm -f openssl-3.0.1.tar.gz
4. Configure the installation.
cd openssl-3.0.1
./config –prefix=/usr –openssldir=/usr/lib64 –libdir=lib64 -Wl,-rpath=/usr/lib64 -Wl,–enable-new-dtags enable-fips enable-ec_nistp_64_gcc_128
5. Compile the configured installation.
make
6. Test the compiled installation.
make test
Make sure the result is PASS.
7. Install the OpenSSL 3.
make install
8. Verify the OpenSSL 3 is installed.
9. Delete the configuration folder. (Optional)
cd ..
rm -rf openssl-3.0.1