How to build and install openssl 1.1.1 on any Linux System – Example on RHEL 7 ?
In this post, we will see how to build and install Openssl on RHEL 7.
Lets see this step by step.
1. First download the package from below URL.
https://github.com/openssl/openssl/tree/OpenSSL_1_1_1-stable
2. Unzip and configure the package.
# unzip openssl-OpenSSL_1_1_1-stable.zip # cd openssl-OpenSSL_1_1_1-stable ### Here --prefix shows the path where we want to install the package. # ./config --prefix=/cds/ngelinux/tools/openssl/
3. Now build the package and try to run binary from bin directory.
# make # make install # cd ../openssl/bin/ # ./openssl
4. Review the installed files.
[user@ngelinux001{none}]/cds/ngelinux/tools/openssl$ ls -ltr
total 20
drwxr-xr-x 3 user ngegroup 4096 Sep 1 13:35 include
drwxr-xr-x 4 user ngegroup 4096 Sep 1 13:35 lib
drwxr-xr-x 2 user ngegroup 4096 Sep 1 13:35 bin
drwxr-xr-x 5 user ngegroup 4096 Sep 1 13:35 ssl
drwxr-xr-x 4 user ngegroup 4096 Sep 1 13:35 share
[user@ngelinux001{none}]/cds/ngelinux/tools/openssl$ cd bin
[user@ngelinux001{none}]/cds/ngelinux/tools/openssl/bin$ ls -ltr
total 748
-rwxr-xr-x 1 user ngegroup 749904 Sep 1 13:35 openssl
-rwxr-xr-x 1 user ngegroup 6205 Sep 1 13:35 c_rehash
5. Install the missing library if any.
# wget https://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/o/openssl11-libs-1.1.1k-4.el7.x86_64.rpm
# yum install ./openssl11-libs-1.1.1k-4.el7.x86_64.rpm
[root@ngelinux001 openssl]# yum install ./openssl11-libs-1.1.1k-4.el7.x86_64.rpm
Loaded plugins: aliases, changelog, kabi, langpacks, product-id, search-disabled-repos, subscription-manager, tmprepo, verify,
: versionlock
This system is not registered with an entitlement server. You can use subscription-manager to register.
Loading support for Red Hat kernel ABI
Examining ./openssl11-libs-1.1.1k-4.el7.x86_64.rpm: 1:openssl11-libs-1.1.1k-4.el7.x86_64
Marking ./openssl11-libs-1.1.1k-4.el7.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package openssl11-libs.x86_64 1:1.1.1k-4.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================================================================
Package Arch Version Repository Size
================================================================================================================================
Installing:
openssl11-libs x86_64 1:1.1.1k-4.el7 /openssl11-libs-1.1.1k-4.el7.x86_64 3.6 M
Transaction Summary
================================================================================================================================
Install 1 Package
Total size: 3.6 M
Installed size: 3.6 M
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : 1:openssl11-libs-1.1.1k-4.el7.x86_64 1/1
base/productid | 1.6 kB 00:00:00
base2/productid | 1.6 kB 00:00:00
Verifying : 1:openssl11-libs-1.1.1k-4.el7.x86_64 1/1
Installed:
openssl11-libs.x86_64 1:1.1.1k-4.el7
Complete!
[root@ngelinux001 openssl]#
Now run the binary and use it to generate certificates, etc.
[root@ngelinux001 openssl]# ./openssl OpenSSL>
