Menu Close

How to install Subversion (from source) on Solaris 9 / RHEL 5.1

Subversion is one of the most popular open source version control tools currently available. Many organizations are moving from clunky, proprietary version control or configuration management software to Subversion. Recently, I compiled and built Subversion 1.6.4 on Solaris 9. While compiling and building software from source is usually straightforward with the 3-step “configure-make-make install” process, doing so on Solaris(unlike Linux) can be a bit frustrating at times, primarily due to the lack of packages/tools that are commonly available on Linux. So, here are the steps I followed to build subversion 1.6.4 from source on Solaris 9:

Note: By default, Solaris 9 does not have the gcc C compiler and some other packages generally available on Linux platforms. I had installed packages libiconv, gcc and libxml2 to the default build installed by my Sys Admins. You do not require root privileges to install subversion. I installed subversion using a non-root user. Refer this UPDATE for instructions specific to Red Hat Enterprise Linux 5.1

 

STEP 1: Download, unzip and extract the source code:

#
# Download subversion. Use your browser or the wget command below:
#
wget http://subversion.tigris.org/downloads/subversion-1.6.4.tar.gz
#
# Unzip and extract source (can be done in many ways)
#
gunzip subversion-1.6.4.tar.gz
tar xvf subversion-1.6.4.tar

The above commands create a directory called subversion-1.6.4.

 

STEP 2: Download, unzip and extract the dependencies (source):

#
# Download subversion dependencies. Use your browser or the wget command below:
#
wget http://subversion.tigris.org/downloads/subversion-deps-1.6.4.tar.gz
#
# Unzip and extract source (can be done in many ways)
#
gunzip subversion-deps-1.6.4.tar.gz
tar xvf subversion-deps-1.6.4.tar

The above commands will add the contents of the subversion-deps-1.6.4.tar archive into the subversion-1.6.4 directory created in STEP 1.

 

STEP 3: Remove the serf directory:

Subversion 1.6.4 uses two HTTP client libraries called neon and serf to enable users access the subversion repository using a browser (via HTTP/WebDAV). You don’t need both libraries and since the serf library made it mandatory to have SSL as a pre-requisite, I removed the serf library and used only neon. I’ve provided some feedback regarding this requirement to the serf team. This meant I could access the subversion repository via HTTP, but not via HTTPS (SSL) which met my requirements. However, if you do need HTTPS, then ensure you have an SSL installation (e.g. OpenSSL) and pass the appropriate options (–with-ssl) to subversion during the configure process. Refer Subversion INSTALL file.

#
# Remove serf directory within subversion-1.6.4
#
cd subversion-1.6.4
rm -rf serf

 

STEP 4: Set your PATH:

Set the PATH variable correctly, so that binaries like gcc (typically in /usr/local/bin) and make (typically in /usr/ccs/bin) can be accessed. For example, my PATH is /bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/ccs/bin

 

STEP 5: Build Subversion:

Compile and build Subversion as follows:

#
# Change directory to subversion-1.6.4 and execute the following commands:
# Note: The --with-apxs option is required to build and load the mod_dav_svn to access subversion repositories via Apache using the WebDAV protocol. It creates the svn modules (mod_dav_svn.so and mod_authz_svn.so) in the Apache modules directory.
#
./configure --prefix=/wherever-you-want --with-apxs=/apache-ServerRoot/bin/apxs
make
make install

 

STEP 6: Test Subversion:

Test Subversion as follows:

#
# Change directory to where subversion-1.6.4 has been installed (cd /wherever-you-want)
#
bin/svn --version

If subversion is built properly, the above command will display subversion’s version and allowed methods of accessing the repository. For my installation, the output is given below:

svn, version 1.6.4 (r38063)
  compiled Sep  4 2009, 20:42:03
 
Copyright  2000-2009 CollabNet.
Subversion is open source software, see _http://subversion.tigris.org/
This product includes software developed by CollabNet (_http://www.Collab.Net/).
 
The following repository access (RA) modules are available:
 
* ra_neon : Module for accessing a repository via WebDAV protocol using Neon.
 - handles 'http' scheme
* ra_svn : Module for accessing a repository using the svn network protocol.
 - handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.
 - handles 'file' scheme

 

—– T H E     E N D —–

 

Note: Installing subversion on Solaris 10 is as straightforward as doing so on Linux systems as Solaris 10 includes all the GNU software goodies in /usr/sfw/bin , where sfw => Sun Freeware

 

UPDATE (27th October 2009): I just installed Subversion 1.6.5 and 1.6.6 on Red Hat Enterprise Linux 5.1. The steps involved are the same as listed above for Solaris 9 with the exception of STEP 5 (Build Subversion) which was done as follows:

#
# Change directory to subversion-1.6.5/zlib (or subversion-1.6.6/zlib) and execute the following commands:
#
./configure --prefix=/mysvn-location --shared
make
make install
#
# Change directory to subversion-1.6.5 (or subversion-1.6.6)  and execute the following commands:
# Note: The --with-apxs option is required to build and load the mod_dav_svn to access subversion repositories via Apache using the WebDAV protocol. It creates the svn modules (mod_dav_svn.so and mod_authz_svn.so) in the Apache modules directory.
#
./configure --prefix=/mysvn-location --with-zlib=/mysvn-location --with-apxs=/apache-ServerRoot/bin/apxs
make
make install
VN:F [1.9.22_1171]
Rating: +6 (from 6 votes)
Print Friendly, PDF & Email
(Visited 97 times, 1 visits today)

Leave a Reply

Your email address will not be published. Required fields are marked *