This is the procedure for creating Trac and SVN instances on compsoc1.
Replace "projectid" with the name of the instance.
Recovering a BDB Database and converting to FSFS
Some older SVN setups on compsoc1 were set to use bdb, but these tend to die horribly. Fix with:
1. Recover
as root:
svnadmin recover /var/svn/projectid/
2. Convert to FSFS
cd /var/svn/ svnadmin create --fs-type=fsfs fsfs-repo svnadmin dump projectid | svnadmin load fsfs-repo mv projectid projectid-old mv fsfs-repo projectid
3. Set permissions
chown -R svn:projectid projectid/
chmod -R 770 projectid/
find . -type d -exec chmod g+s {} \;
Create Subversion repositories
1. Create the user and group:
export PROJ=projectid groupadd $PROJ useradd -g $PROJ -d /var/svn/$PROJ/ $PROJ
2. Make the subversion repository
mkdir /var/svn/$PROJ/ svnadmin create --fs-type fsfs /var/svn/$PROJ/ chown -R svn:$PROJ /var/svn/$PROJ/ chmod -R 770 /var/svn/$PROJ/
3. Enable the Web Interface
- Edit /etc/apache2-svn/sites-enabled/000-default
- Add the following block below the similar blocks in both Virtual Hosts:
<Location /svn/projectid>
AuthType Basic
AuthName "Kent Computing Account"
AuthLDAPURL ldap://ldap.kent.ac.uk/o=kent.ac.uk,o=uni
Require user userid userid userid
</Location>
Replacing userid with the name of the users who should have access.
4. Stop and Start Apache SVN
apache2 -f /etc/apache2-svn/apache2.conf -k stop apache2 -f /etc/apache2-svn/apache2.conf -k start
Create Trac Instances
1. Make the folder
mkdir /var/trac/$PROJ/
2. Use the Trac Wizard
trac-admin /var/trac/$PROJ/ initenv
3. Copy WebAdmin Plugin
cp /var/trac/jrapp/plugins/TracWebAdmin-0.1.1dev_r2765-py2.3.egg /var/trac/$PROJ/plugins
4. Set up Admins
trac-admin /var/trac/$PROJ/ permission add user TRAC_ADMIN permission add user TRAC_ADMIN [...]
5. Change Permissions
chown -R $PROJ:$PROJ /var/trac/$PROJ/ chmod -R 770 /var/trac/$PROJ/
6. Set up the CGI
5. Configure Apache 2
6. Change the DNS
Only ben or evad can do this at present.
