Method One
sudo apt-get install OpenSSL
sudo apt-get install Libssl-dev method two
Download the compressed package to OpenSSL website
http://www.openssl.org/source/
What I'm downloading here is openssl-1.0.1q.tar.gz.
I'm using the root user login, so the following command saves Sudo, and if you're not logged in with the root user, add your own
1) Tar zxvf openssl-1.0.1q
2./config Shared (the default path for installation is/USR/LOCAL/SSL, please add –prefix=/yourpath if you want to change the directory)
3) Make
4) Make Test
5) make Install
Create a symbolic link (this can be done, see your needs)
#ln-S/usr/local/ssl/bin/openssl/usr/bin/openssl
#ln-S/usr/local/ssl/include/openssl/usr/include/openssl
Refreshing Dynamic Library Configuration
#vim/etc/ld.so.conf
Add at end of file
/usr/local/ssl/lib
Test (if you do not create a symbolic link, the following command takes a specific path)
OpenSSL version-a