Well, we're off to a rocky start. First off, the Ubuntu server kernel expects a particular processor extension that does not exist in the virtualbox emulation: see here for a fix.
Anyway, after a little shell magic, we're up and running. NOW for software. You need to apt-get the following (not exhaustive) list:
trac apache2 libapache2-mod-wsgi svn python python-pysqlite2 openssl maven ant tomcat5.5 libapache2-mod-jk
Now, to test out some of said software. First, make sure you're using some reasonable networking scheme. If you're lame like me and used NAT because you didn't want another interface just now (or you really didn't know what you were doing at the time), the Help for virtual box provides you a method of doing port forwarding from the host to the client. You need to restart the virtual-box GUI after you're done.
Run the following:
mkdir /path/to/my/project
Run the following:
svnadmin create /path/to/my/project/svn
Obviously replacing the path.
There's some more magic we have to do here eventually (and integrate in with Apache). I'm going to cover this later, as I'm running out of steam.
you need to set up a trac project:
mkdir /path/to/my/project/trac
trac-admin /path/to/my/project/trac initenv
Enter a project name. I took all defaults except for Subversion location (/path/to/my/project/svn
).
You then need to make a file for the WSGI module, mine looks like the following:
import os
os.environ['TRAC_ENV'] = '/path/to/my/project/trac'
os.environ['PYTHON_EGG_CACHE'] = '/path/to/my/project/trac/eggs'
import trac.web.main
application = trac.web.main.dispatch_request
My file is called main.wsgi
and is located in /path/to/my/project/trac
.
Now it's time to edit apache configuration (I'm lazy soo....)
sudo vi /etc/apache2/sites-available/default
Ok, inside here we need to change the app to be our TRAC project...
THEN we need to give apache ownership of the TRAC files...
chown -R www-data /path/to/my/project/trac
You now have Trac running on Apache (with an SVN repository).
Of course no software distribution is complete without the mandatory downloading of plugins. Trac is no exception. Let's pick out some fun ones:
So... if I ever get enough time I might place some script around all this to auto-generate the svn repostiory, trac directory and apache configuration, along with default installs of the plugins. That way you can make new projects quickly and easily AND get all the nice management features (which is the major point of maven).
Not bad eh? If we add the "magic project creation script" with a web front end, we might even have something to fight sourceforge with. But onto the real meat of this server... the nice Maven integration.