Tuesday, April 3, 2012

Installing Subversion 1.7 on CentOS 5.5

Installing Subversion 1.7 on CentOS 5.5

Let me start by saying the least rewarding part of my job is sysadmin. While I remember hacking out makefiles for c and c++ programs back in college, much of what glues a system together is total black box to me. After nerd raging for a while I finalllllyyyy got my CentOS 5 VM to do what I want, and since I hate for this knowledge to go to waste...

First, I followed superlinuxadmin's tutorial which I will recap only the commands of. For the full article check here:


svn --version #Lets check which version we have now
yum remove subversion cd /usr/local/src/
wget http://apache.tradebit.com/pub/subversion/subversion-1.7.2.tar.gz #got this from http://subversion.apache.org/download/ on the recomended download section
tar zxf subversion-1.7.2.tar.gz # Make sure you use the same filename from the previous step
cd subversion-1.7.2
wget http://rahulsoni.me/files/apr-util-1.3.12.tar.gz
wget http://rahulsoni.me/files/apr-1.4.5.tar.gz
tar zxf apr-util-1.3.12.tar.gz
mv apr-util-1.3.12 apr-util # When using ./configure it will look for these files by default on a folder without version number
tar zxf apr-1.4.5.tar.gz
mv apr-1.4.5 apr # When using ./configure it will look for these files by default on a folder without version number
./configure

Got the same error he did

checking sqlite library version (via header)... unsupported SQLite version checking sqlite library version (via pkg-config)... none or unsupported 3.3 no An appropriate version of sqlite could not be found. We recommmend 3.7.6.3, but require at least 3.6.18.

Applied same fix:

sqlite3 -version #check current version
wget -q -O - http://www.atomicorp.com/installers/atomic | sh # To install Atomic repository
yum --enablerepo=atomic upgrade sqlite
sqlite3 -version #you should get the 3.7 version listed now

Tried to reconfigure as he did...

./configure make make install svn --version # Now you should see the latest version

But got...
checking zlib.h usability ... no
checking zlib.h presence ... no
checking zlib.h... no
configure: error: subversion requires zlib

Bummer. Thank god for helpful hackers over at the svnforum, this post from vumaravi helped:


Slightly modified from that, from the subversion source directory...

wget http://zlib.net/zlib-1.2.6.tar.gz #version may have changed, check site
tar xvf zlib-1.2.6.tar.gz
mv zlib-1.2.6 zlib
cd zlib
./configure --shared
make
make install
cd ..
./configure CPPFLAGS="-Izlib/ -Lzlib/"

Finally made it through the configure with only a warning! Hallelujah!

make
make install
svn -version

1.7.4! Happy :)

Now after an hour detour, back to real work....