cd ~/software
wget https://www.openssl.org/source/openssl-1.0.1f.tar.gz
tar zxvf openssl-1.0.1f.tar.gz
cd openssl-* 

./config --prefix=/usr zlib-dynamic --openssldir=/usr/local/ssl shared 
# do not specify --openssldir=/etc/ssl

make 
make install

I'm not sure if you need to do the whole --prefix=/usr zlib-dynamic --openssldir=/usr/local/ssl shared thing.... might just be able to run ./config.