Si Sapis, Sis Apis

A software developer's blog

Wednesday, September 12, 2007

 

Setting Up a Subversion/Trac Server

I've been postponing this for a long time. Every time I would have to configure an Ubuntu box as a Trac server, I would start gathering documentation again, reminding myself that I should just write the steps down so that I wouldn't need to look for them next time. Well, this time I finally did it.

Basic Server InstallationConfigure text editor (optional)
Since we are about to start installing & configuring our server software, make sure your favourite text editor is installed:
Install packages
Configure Apache
Enable SSL:
Generate Certificate:
Create Virtual Host:
sudo cp /etc/apache2/sites-available/default /etc/apache2/sites-available/$SITENAME
sudo vim /etc/apache2/sites-available/$SITENAME
Change:
NameVirtualHost *:443
add:
SSLEngine on
SSLCertificateFile /etc/apache2/ssl/apache.pem
SSLProtocol all
SSLCipherSuite HIGH:MEDIUM

Enable the site:

Add basic authentication.
For first user:
sudo htpasswd -c -m /etc/apache2/dav_svn.passwd $AUTH_USER
for rest of users:
sudo htpasswd -m /etc/apache2/dav_svn.passwd $AUTH_USER2

Enable and configure WebDAV and SVN:
Add to /etc/apache2/mods-available/dav_svn.conf:
DAV svn
SVNParentPath /var/svn
AuthType Basic
AuthName "Subversion Repository"
AuthUserFile /etc/apache2/dav_svn.passwd
Require valid-user
SSLRequireSSL
Restart Apache

Configure Subversion
Add repositories:
Test Subversion
Web access:
An initial import:
… and check-out:
Configure Trac
Create the directory:
Enable mod_python:
Put this into /etc/apache2/apache2.conf:
SetHandler mod_python
PythonHandler trac.web.modpython_frontend
PythonOption TracEnvParentDir /var/trac
PythonOption TracUriRoot /trac
AuthType Basic
AuthName "Trac"
AuthUserFile /etc/apache2/dav_svn.passwd
Require valid-user
SSLRequireSSL

Restart Apache.
Configure Trac using trac-admin.
Congratulations, you are done!

References
  1. Installation of Subversion on Ubuntu, with Apache, SSL, and BasicAuth
  2. Configuring Trac with mod_python
  3. Ubuntu
  4. Subversion
  5. Trac

Labels: , , , , , ,


Archives

August 2007   September 2007   September 2009  

This page is powered by Blogger. Isn't yours?

Subscribe to Posts [Atom]