Thursday, March 20, 2014

Building OpenSSL 1.0.1F for RHEL 6


So today I wanted to install openssl 1.0.1F on my centos boxes, usually I will wait for an RPM, or just build from source. Today, I did a little of both using rpmbuild utility. You will need to have the rpmbuild utilities installed.

First download the source. What i did different for a 64bit build was I first untar'ed the file, then ran this against the spec file.

sed -i 's@/usr/lib@/usr/lib64@g' openssl.spec

then ran

tar zcvf ./openssl-1.0.1fa.tar.gz openssl-1.0.1f/

rpmbuild -ts ./openssl-1.0.1f.tar.gz
Which will creates the source rpm. Then run

rpmbuild -tb ./openssl-1.0.1fa.tar.gz

Which will create these packages:

openssl-1.0.1f-1.x86_64.rpm            openssl-devel-1.0.1f-1.x86_64.rpm
openssl-debuginfo-1.0.1f-1.x86_64.rpm  openssl-doc-1.0.1f-1.x86_64.rpm

then if you eff up an install.

cd /usr/lib64/

sudo ln -s libssl.so.1.0.0 libssl.so.10
sudo ln -s libcrypto.so.1.0.0 libcrypto.so.10
 
Then run yum update to make sure it worked.