100 likes | 110 Views
OpenSSL is a useful utility to generate SSL certificates. Here are the steps to install OpenSSL in Ubuntu. #ubuntu #ssl #security <br><br>Visit https://techimbo.com/how-to-install-openssl-in-ubuntu/
E N D
How to Install OpenSSL in Ubuntu
Update Ubuntu System Open terminal and run the following command to update your Ubuntu system packages. $ sudo apt-get update && sudo apt-get upgrade
Check OpenSSL version You may check the version of openssl on your system. If it is present on your system, you will see the latest version number, else it will give you an error. $ openssl version -a 1.1.0
Install Prerequisites Install prerequisites with the following command. $ sudo apt install build-essential checkinstall zlib1g-dev -y
Download SSL Run the following command to download the source package of OpenSSL. We are using OpenSSL 1.1.1. You may change it as per your requirement. $ cd /usr/local/src/ $ sudo wget https://www.openssl.org/source/openssl-1.1.1c.tar.gz Extract the downloaded file with the following command. $ sudo tar -xf openssl-1.1.1c.tar.gz Navigate to extracted folder. $ cd openssl-1.1.1c
Install OpenSSL Run the following command to install OpenSSL. $ sudo ./config --prefix=/usr/local/ssl --openssldir=/usr/local/ssl shared zlib $ sudo make $ sudo make test $ sudo make install
Configure OpenSSL Shared Libraries Create a new configuration file openssl-1.1.1c.conf for OpenSSL at /etc/ld.so.conf.d/ $ sudo vi /etc/ld.so.conf.d/openssl-1.1.1c.conf Add the following line to it. /usr/local/ssl/lib Save and exit the file. Reload it with the following command. $ sudo ldconfig -v
Configure OpenSSL Binary ( 1 of 2) Next, we are going to replace the binary of our old OpenSSL version at /usr/bin/openssl with the new one that we just installed at /usr/local/ssl/bin/openssl First we backup binary files. Then copy it with the following command. $ sudo mv /usr/bin/c_rehash /usr/bin/c_rehash.backup $ sudo mv /usr/bin/openssl /usr/bin/openssl.backup Open environment PATH variable. sudo vi /etc/environment
Configure OpenSSL Binary ( 2 of 2) Add :/usr/local/bin/openssl folder to PATH variable. Please note the colon at the beginning of folder path. PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/lo cal/games:/usr/local/ssl/bin" Save and close the file. Now reload the PATH environment with the following command. $ source /etc/environment Now if you check the OpenSSL version again, it will show the latest version, indicating that Ubuntu is picking the right OpenSSL. $ openssl version -a 1.1.1
Thank You Visit for details https://techimbo.com/how-to-install-openssl-in-ubuntu/