Using Subversion for Collaborative Development
Updated: 12/01/2006
General Information
This is a guide on how to setup an OpenBSD 3.9 based Subversion 1.40 and Apache 2.2.X Source Code Respository server that uses the fsfs db format with no authentication/security. Should you need Authentication you can read the FreeBSD Subversion guide on this site until I create the 4.0 based guide. This is not a definitive guide but a how to. Considering this, the methods used here may not be the best ones or the most correct and assume you have some knowledge of unix. If you have any updates and such, please e-mail them to me.Requirements
Installation
Install OpenBSD on a PC with at least 1 network interface card and assign it an IP address and make sure it has internet access (http://www.openbsd.org/faq/faq4.html). Then login to the console and add/install the packages above via pkg_add|
# # # # # # # |
pkg_add http://openbsd.mirrors.pair.com/ftp/3.9/packages/i386/libltdl-1.5.22p1.tgz pkg_add http://openbsd.mirrors.pair.com/ftp/3.9/packages/i386/libtool-1.5.22.tgz pkg_add http://openbsd.mirrors.pair.com/ftp/3.9/packages/i386/libxml-2.6.16p8 pkg_add http://openbsd.mirrors.pair.com/ftp/3.9/packages/i386/python-2.3.5p3 pkg_add http://openbsd.mirrors.pair.com/ftp/3.9/packages/i386/swig-1.3.24p1 pkg_add http://openbsd.mirrors.pair.com/ftp/3.9/packages/i386/gmake-3.80p1 pkg_add http://openbsd.mirrors.pair.com/ftp/3.9/packages/i386/wget-1.10.2p0.tgz |
|
# # # # |
wget http://webdav.org/neon/neon-0.25.5.tar.gz tar xfz neon-0.25.5.tar.gz cd neon-0.25.5 ./configure --with-ssl && make && make install && cd .. |
|
# # # # # |
wget http://apache.mirrors.pair.com/httpd/httpd-2.2.X.tar.gz tar xfz cd httpd-2.2.X ./configure --enable-dav --enable-dav-fs --enable-vhost-alias --enable-headers --enable-so \ --enable-maintainer-mode --enable-ssl --enable-deflate && make && make install && cd.. |
|
# # # # # # # |
wget http://subversion.tigris.org/downloads/subversion-1.4.0.tar.gz tar xfz subversion-1.4.0.tar.gz cd subversion-1.4.0 ./configure --with-apr=/usr/local/apache2/bin/apr-1-config --with-apr-util=/usr/local/apache2/bin/apu-1-config \ --with-zlib --with-apxs=/usr/local/apache2/bin/apxs --with-swig=/usr/local/bin/swig \ --enable-swig-bindings=perl,python --enable-maintainer-mode --with-httpd=/root/httpd-2.2.3 gmake && gmake install && cd .. |
Configuration
Configure Subversion user/group and repository.|
# # # # # # |
useradd -u3690 -g=uid -c"Subversion" -d/var/empty -s/sbin/nologin _svn mkdir /var/svn && mkdir /var/svn/svnrepos svnadmin create /var/svn/svnrepos/svnrepo0 svnadmin create /var/svn/svnrepos/svnrepo1 svnadmin create /var/svn/svnrepos/svnrepo2 chown -R _svn:_svn /var/svn/svnrepos |
/usr/local/apach2/conf/httpd.conf:
Apache Module Config:|
# LoadModule foo_module modules/mod_foo.so LoadModule dav_svn_module modules/mod_dav_svn.so LoadModule authz_svn_module modules/mod_authz_svn.so |
|
# If you wish httpd to run as a different user or group, you must run # httpd as root initially and it will switch. # # User/Group: The name (or #number) of the user/group to run httpd as. # It is usually good practice to create a dedicated user and group for # running httpd, as with most system services. # User _svn Group _svn |
|
<Location /svnroot> DAV svn SVNListParentPath on SVNParentPath /var/svn/svnrepos # AuthzSVNAccessFile /home/YOUR_USERNAME/svn/obj-sh/subversion/tests/cmdline/svn-test-work/authz # AuthType Basic # AuthName "SVN repos" # AuthUserFile /home/YOUR_USERNAME/svn/dav_svn.passwd # Require valid-user </Location> |
| # | /usr/local/apache2/apachectl start |
/etc/rc.local:
|
if [ -x /usr/local/apache2/bin/httpd ]; then echo -n ' Apache2 & Subversion'; /usr/local/apache2/apachectl start fi |
/etc/rc.shutdown:
|
if [ -x /usr/local/apache2/bin/httpd ]; then echo -n ' Apache2 & Subversion'; /usr/local/apache2/apachectl stop fi |
This guide is © 2006 - 2008 Amir Mesry.
Author: Amir Mesry
starkiller at web-illusions dot net