Subversion for SysAdmins PDF Print E-mail
Written by David Torre   

Installing Apache with mod_dav_svn

We'll begin by using Yum to install Python, Apache, and mod_dav_svn. This is done by typing the following, as root:

yum -y install httpd mod_dav_svn subversion python

Depending on your Yum repository configuration, you may or may not grab the latest versions of Subversion and mod_dav_svn. If you plan on using the web front-end ViewVC, ensure Python is at version 2.0 or greater, and that Subversion is at 1.2.0 or greater. For example:

[root@server ~]# rpm -qa | grep subversion && python -V
subversion-1.1.4-2.ent
Python 2.3.4

As you can see, my Python installation is fine, but Subversion is slightly out of date. Again, if you plan on using ViewVC, Subversion must be at v1.2, which means our mod_dav_svn must also be updated. Therefore, let's grab the latest Subversion and mod_dav_svn packages from Dag Wieers:

wget http://dag.wieers.com/your-distro/subversion-1.2.1-0.1.2.el4.rf.i386.rpm
wget http://dag.wieers.com/your-distro/mod_dav_svn-1.2.1-0.1.2.el4.rf.i386.rpm

Now upgrade the two RPMs we just downloaded:

[root@server ~]# rpm -Uvh *.rpm
Preparing...                ########################################### [100%]
1:subversion            ########################################### [ 50%]
2:mod_dav_svn      ########################################### [100%]

Our Python and Subversion packages should show be at suitable version levels for use with ViewVC:

[root@server ~]# rpm -qa | grep subversion && python -V
subversion-1.2.1-0.1.2.el4.rf
Python 2.3.4

Apache Startup

Now that the Apache server has been installed, we're going to go ahead and start it, and ensure it auto-starts upon subsequent reboots. However, you must first set the “ServerName” parameter in: /etc/httpd/conf/httpd.conf to reflect your machine's hostname or IP. You may also want to update the ServerAdmin parameter as well. My httpd.conf appears as follows:

# If your host doesn't have a registered DNS name, enter its IP address here.
# You will have to access it by its address anyway, and this will make
# redirections work in a sensible way.
#
ServerName svn.unixvoodoo.com:80

Now to start Apache, and ensure it auto-starts after each reboot:

[root@server ~]# service httpd start
Starting httpd:                                            [  OK  ]
[root@server ~]# chkconfig httpd on

ViewVC Installation (Optional)

You should now head over to http://www.viewvc.org/download.html and grab the latest copy of ViewVC. For our exercise, I'll download the latest version to a temporary directory for extraction, the run the viewvc-install script. Simply hit enter to accept all defaults:

[root@server viewvc-1.0.4]# ./viewvc-install
This is the ViewVC 1.0.4 installer.
It will allow you to choose the install path for ViewVC.  You will now
be asked some installation questions.  Defaults are given in square brackets.
Just hit [Enter] if a default is okay.
Installation path [/usr/local/viewvc-1.0.4]:
DESTDIR path (generally only used by package maintainers) []:
Installing ViewVC to /usr/local/viewvc-1.0.4:
...removed...
ViewVC file installation complete.
Consult the INSTALL document for detailed information on completing the
installation and configuration of ViewVC on your system.  Here's a brief
overview of the remaining steps:
1) Edit the /usr/local/viewvc-1.0.4/viewvc.conf file.
2) Either configure an existing web server to run
/usr/local/viewvc-1.0.4/bin/cgi/viewvc.cgi.
Or, copy /usr/local/viewvc-1.0.4/bin/cgi/viewvc.cgi to an
already-configured cgi-bin directory.
Or, use the standalone server provided by this distribution at
/usr/local/viewvc-1.0.4/bin/standalone.py.

At this point, all required software has been installed. In the next section, we'll walk through the initial configuration and security of your newly installed Subversion repository.



 
Copyright © 2006-2010 Atomic Fission