Trac Installation

Gentoo Installation
Edit, e.g.: www-apps/trac mysql sqlite subversion vhosts Install: emerge -av trac

Ubuntu Installation
apt-get install python-mysqldb trac enables MySQL support in trac.

Upgrade
apt-get remove trac easy_install -U trac

Creating Project
I will try to list the steps needed to create a Trac project using
 * MySQL
 * Subversion
 * Apache

Create Database
mysql -uroot -p CREATE DATABASE trac_ project_name DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; CREATE USER 'trac_ project_name _user'@'localhost' IDENTIFIED BY ' somepassword '; GRANT ALL ON trac_ project_name .* TO trac_ project_name _user; Check that user can log in: mysql -utrac_ project_name _user -p somepassword Note that 'trac_ project_name _user' should be 16 characters or less.

Create Subversion Repository
svnadmin create /var/svn/ repository chown -R apache:apache /var/svn/ repository

Create Trac Project
trac-admin /var/lib/trac/ project_name initenv Project Name [My Project]> Project Name Database connection string [sqlite:db/trac.db]> mysql://trac_ project_name _user: somepassword @localhost/trac_ project_name Repository type [svn]> Path to repository [/path/to/repos]> /var/svn/ repository Templates directory [/usr/share/trac/templates]> Or the short form: trac-admin project_name initenv ' Project Name ' \ mysql://trac_ project_name _user: somepassword @localhost/trac_ project_name \ svn /var/svn/ repository /usr/share/trac/templates/ You can test the project using the built-in webserver: tracd --port PORT /var/lib/trac/ project_name

Serve using Apache
emerge -av mod_python Enable Python support in : APACHE2_OPTS="... -D PYTHON" Add this to your  or where your host is specified:  SetHandler mod_python PythonInterpreter main_interpreter PythonHandler trac.web.modpython_frontend PythonOption TracEnv /var/lib/trac/ project_name PythonOption TracUriRoot /projects/ project_URL  If you want to use trac plugins, add:  ...    SetEnv PYTHON_EGG_CACHE /var/cache/python-eggs/  and create the cache directory: mkdir /var/cache/python-eggs/ chown apache:apache /var/cache/python-eggs/ and restart apache.