Difference between revisions of "SVN Trac Install"

From C4 Wiki
Jump to: navigation, search
(add trac install howto)
Line 45: Line 45:
  chmod g+s $REP/db
  chmod g+s $REP/db
= Create Trac Wiki ==
= Create Trac Wiki =
  mkdir -p /home/www/trac/repository
  mkdir -p /home/www/trac/repository

Revision as of 02:14, 15 March 2005

Setup SVN For Multiple Users

Creat umask wrapper scripts to protect permissions on the database.

# backup
mv /usr/bin/svn /usr/bin/svn.orig &&
mv /usr/bin/svnserve /usr/bin/svnserve.orig &&
# create skripts
cat >> /usr/bin/svn << "EOF" &&
umask 002
/usr/bin/svn.orig "$@"
cat >> /usr/bin/svnserve << "EOF" &&
umask 002
/usr/bin/svnserve.orig "$@"
# set perms
chmod 0755 /usr/bin/svn{,serve}
# debian add diversion 
#/usr/sbin/dpkg-divert --divert /usr/bin/svn.orig  --add /usr/bin/svn
#/usr/sbin/dpkg-divert --divert /usr/bin/svnserve.orig  --add /usr/bin/svnserve

Setup SVN For Group Access

Add a group which has r/w access to the repository.

addgroup --system svn

Add Apache User To SVN Group

Add the user running the apache process to the svn group. Either by editing /etc/group directly or by:

usermod -g www-data -G svn apache

Change Permissions On The Repository

The svn group needs write access to the svn repository database.

chown svn:svn -R $REP/
chmod -R g+w $REP/
chmod g+s $REP/db

Create Trac Wiki

mkdir -p /home/www/trac/repository
trac-admin /home/www/trac/repository initenv

Edit Trac Options

trac-admin /home/www/trac/repository
vi conf/trac.ini

Change Permissions On The Trac Wiki

The apache user needs full access to the trac directory.

chown -R www-data  /home/www/trac/repository/*

Add Trac To Apache Config

# your repository
ScriptAlias /repository /usr/share/trac/cgi-bin/trac.cgi
<Location /repository>
    SetEnv TRAC_ENV "/home/www/trac/repository"
# icons
<Directory "/usr/share/trac/htdocs/">
        Options -Indexes -MultiViews
        AllowOverride None
        Order allow,deny
        Allow from all
Alias /trac "/usr/share/trac/htdocs/"