Sunday, June 10, 2007

Installing Subversion on Linux

Last year I installed a Subversion server on a Windows server. It was really quite easy. This week I needed to do the same thing on a Linux server. It turned out to be almost as easy. Almost.

The server in question was a server from Rackspace. It had Red Hat Enterprise Linux 4 running on it. One nice thing about Rackspace is that their servers are pretty bare bones. In this case, the typical LAMP stack was needed, so all that was on there, but that was about it.

My first (notice I said first) approach was to install a Subversion RPM. Here is what I got when I tried that:
[root@123038-www1 XXX]# rpm -ivh subversion-1.4.3-1.i386.rpm
error: Failed dependencies:
apr >= 0.9.7 is needed by subversion-1.4.3-1.i386
apr-util >= 0.9.7 is needed by subversion-1.4.3-1.i386
libneon.so.24 is needed by subversion-1.4.3-1.i386
neon >= 0.24.7 is needed by subversion-1.4.3-1.i386
Suggested resolutions:
neon-0.24.7-4.i386.rpm
Nice! Luckily I found the exact neon RPM suggested, so I tried that:
[root@123038-www1 XXX]# rpm -ivh neon-0.24.7-4.i386.rpm
warning: neon-0.24.7-4.i386.rpm: V3 DSA signature: NOKEY, key ID e01260f1
error: Failed dependencies:
libcrypto.so.0.9.7 is needed by neon-0.24.7-4.i386
libssl.so.0.9.7 is needed by neon-0.24.7-4.i386
That's just not cool. What to do? Build it myself, of course. What's nice is that Collab has both the source for Subversion, and the source for its dependencies. So I built the dependencies, and then built Subversion , and then ... it worked! Not too bad.

The nicest part came next. Configuring it was just as easy as it was on Windows. I followed the same guide I had found a year ago, and everything worked flawlessly.

One interesting thing is that in this case I already had Apache 2.2 running on the server. For the Windows install, I had installed Apache specifically for Subversion. I ran Subversion in a different directory of that server, but on the same Apache instance and same port obviously. There's probably some potential security or performance issues with this. Maybe I should have run a second instance of Apache listening on a different port?

One final nice thing. The Apache instance already had DAV enabled. This was convenient. I guess this is standard for Rackspace? It's not standard for Apache.

No comments:

Post a Comment