Other XP Bloggers

Tuesday, October 16, 2007

Installing SVN 1.4 in a Nexenta Zone

Nexenta already provides a package for installing Subversion, but it is SVN 1.3. My goal in this posting is to install SVN 1.4 (the latest is 1.4.5) with Apache in a new Zone. I prefer to use a new Zone because it helps me determine all dependencies that I need to install alongside the primary package I am installing, it will keep my Subversion install free from any side effects of other programs, and a new Zone will look like a different computer with its own ip address on my network.

Step 1: Create a Subversion Zone

See these instructions for setting up a new zone for Nexenta. I named my zone svn_zone and put it in /export/home/zones/svn_zone.While the Nexenta zones tutorial gives you a shortcut for installing apache2 along with the base zone install, I do NOT recommend this, as my install hung Configuring apache2 when I originally tried. In any case, it is no big deal installing the base zone first and then explicitly installing the apache2 package.

Step 2: Setup the Subversion Dependencies

root@svn_zone:~# apt-get install apache2

root@svn_zone:~# apt-get install apache2-dev (for apr-util)

root@svn_zone:~# apt-get install libneon25 (for ra WebDAV support)

root@svn_zone:~# apt-get install libneon25-dev (for neon-config)

root@svn_zone:~# apt-get install gcc

root@svn_zone:~# apt-get install make

root@svn_zone:~# apt-get install python (we will use this for running make check)

Step 5: Setup Apache for Basic Authentication

root@svn_zone:~# htpasswd -cm /usr/local/svn_repository/conf/svn_users svn_admin (this sets up a users file with the user svn_admin and will prompt you for a password)

root@svn_zone:~# vi /etc/apache2/httpd.conf

The httpd.conf file should already contain the following two linesLoadModule dav_svn_module /usr/lib/apache2/modules/mod_dav_svn.soLoadModule authz_svn_module /usr/lib/apache2/modules/mod_authz_svn.so

Before those two lines add another line to explicitly make sure the dav_module is loaded; otherwise you will get an error similar to this:Cannot load /usr/lib/apache2/modules/mod_dav_svn.so into server: ld.so.1: apache2: fatal: relocation error: file /usr/lib/apache2/modules/mod_dav_svn.so: symbol dav_xml_get_cdata: referenced symbol not found.