Installing OpenSSL on Ubuntu Linux
This short tutorial shows you how to install OpenSSL on Ubuntu 12.04. The process is very simple. For this tutorial, I'll be installing openssl version 1.0.1g (released Apr 07, 2014). Linux kernel is 3.2.0-23-powerpc-smp. I have used a Mac Mini (powerpc/ppc architecture). GCC version number is 4.6.3. Your configuration may be different from mine but the installation steps below should work fine for most configurations.
According to openssl.org,
"The OpenSSL Project is a collaborative effort to develop a robust, commercial–grade, full–featured, and Open Source toolkit implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols as well as a full-strength general purpose cryptography library. The project is managed by a worldwide community of volunteers that use the Internet to communicate, plan, and develop the OpenSSL toolkit and its related documentation.
Before starting, please check to see if there is a latest version available to download. Visit http://www.openssl.org/source/ to find out about the available versions. IMPORTANT: See Configuring Ubuntu Linux After Installation to install the development tools required to compile and install openssl from source code.
Steps to download, compile, and install are as follows. Note: Replace 1.0.1g with your version number:
Run the command below,
Also, download the MD5 hash to verify the integrity of the downloaded file. In the same folder, where you downloaded the OpenSSL file, do the following:
The last two commands (above) generate two strings of alpha-numeric characters. Check to see if both strings are identical or not. If not, repeat the steps above from "Downloading OpenSSL". If yes, your file has been downloaded properly. Please note that if you are using openssl for a highly secure/critical setup (or for any other reason) then you should also check the PGP signatures (not covered in this tutorial for simplicity).
Extracting files from the downloaded package:
tar -xvzf openssl-1.0.1g.tar.gz
Now, enter the directory where the package is extracted.
./config --prefix=/usr/local/openssl --openssldir=/usr/local/openssl
Replace "/usr/local/openssl" above with the directory path where you want to copy the files and folders. Note: check for any error message.
Note: check for any error message.
As root (for privileges on destination directory), run the following.With sudo,
sudo make install
Note: check for any error messages.
Thats it. OpenSSL has been successfully installed. You can run the version command to see if it worked or not.
/usr/local/openssl/bin/openssl version OpenSSL 1.0.1g 7 Apr 2014
Did this tutorial help a little? How about buy me a cup of coffee?
Please feel free to use the comments form below if you have any questions or need more explanation on anything. I recommend thoroughy testing on a production-like test system first before moving to production.