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
- OpenBSD 3.9
- Apache 2.2.X
- neon-0.25.5
- subversion-1.4.0
- libltdl-1.5.22p1
- libtool-1.5.22
- libxml-2.6.16p8
- python-2.3.5p3
- swig-1.3.24p1
- gmake-3.80p1
- wget-1.10.2p0(makes web download so much easier)
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 |
Download and install Neon 25.5
# # # # |
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 .. |
Download and install Apache 2.2.X
# # # # # |
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.. |
Download and install Subversion 1.40
# # # # # # # |
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 |
Edit the Apache2 httpd.conf to read subversion repositories
/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
|
Apache User & Group Config
# 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
|
Apache SVN Directive Config
<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>
|
Start Apache2 to start svn repo
|
# |
/usr/local/apache2/apachectl start |
Add Apache2 to startup and shutdown scripts
/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
|
Reboot the system to test and enjoy!
This guide is © 2006 - 2010 Amir Mesry.
Author: Amir Mesry
starkiller at web-illusions dot net
Find this guide useful?
Support the author: