This blog entry gives step by step instruction to the installation of Trac on Ubuntu 8.04 with an existing SVN repository.
| Part1: setup trac and svn through Apache |
- Open a terminal or ssh into the machine or vm you want to install trac
- Install apache2 (if apache is installed before, this will just update apache to the newest version), install python, python-setuptools (for easy_install)
- sudo apt-get install apache2 libapache2 mod-python libapache2-svn python-setuptools python-subversion
- You can use sudo apt-get install Trac to install trac, however it willn't install the newest version
- Make a directory for trac
- Now make a new configuration file for Apache (When apache starts, it will look for this file for configuration):
- create a new configuration file under /etc/apache2/sites-available and name it 'Trac'
- sudo vim /etc/apache2/sites-available/Trac
- Paste the following content:
ServerAdmin your@email.com // put your email address here
DocumentRoot /var/www/
Options FollowSymLinks
AllowOverride None
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
ErrorLog /var/log/apache2/error.log
LogLevel warn
CustomLog /var/log/apache2/access.log combined
ServerSignature On
// the following block can be commented out, because we set the svn config in
// /etc/apache2/mods-available/dav_svn.conf
#
#DAV svn
#SVNParentPath /svn
#AuthType Basic
#AuthName "Subversion Repository"
#AuthUserFile /etc/svnauth
#Require valid-user
#
SetHandler mod_python
PythonHandler trac.web.modpython_frontend
PythonOption TracEnvParentDir /trac
PythonOption TracUriRoot /trac
AuthType Basic
AuthName "Trac"
AuthUserFile /etc/subversion/passwd // points to svn authentication file,
// in this way all the svn users
// can access trac too
Require valid-user
- Disable the default apache config file:
- sudo a2dissite default // the default apache config file is under /etc/apache2/mods-available/
- Enable the new (Trac) apache config file:
- Restart Apache:
- sudo /etc/init.d/apache2 restart
- Edit trac.ini (/etc/trac.ini will store the default configuration for each Trac project instance)
- sudo vim /var/lib/trac/vdoxxTrac/conf/trac.ini
|