|
We're mostly going to be following the TracUbuntuMultipleProjects tutorial from the Trac wiki. A lot of this tutorial is based (ie copied!) from that post. Some others were mixed in there for good measure, I've tried to list those I could at the end of the article. Install Trac from the repositories - a whole bunch of other dependencies will be added too, mostly related to python and graphiz. sudo apt-get install php5-cli python-setuptools libapache2-mod-python libapache2-svn python-pygments graphiz trac Create the directory where all the Trac projects will live. sudo mkdir /var/trac We'll be putting Trac on our default web site, you may want to use a different Virtual Host. sudo vim /etc/apache2/sites-enabled/000-default Just before the </VirtualHost> add: <Location /projects> #set up Trac You've got the Subversion repository setup already right? If not, check out Part One. Set the correct permissions for the Trac pages, and restart Apache to make everything so far take effect. sudo chown -R www-data /usr/share/trac Create a test project in Trac. Accept all the defaults, apart from when it asks for the Subversion path, put /var/svn/myproject. sudo trac-admin /var/trac/myproject initenv That should end with a "Congratulations!" message. If not, well, oops. Make sure all the files are web-accessible sudo chown -R www-data:www-data /var/trac/myproject And try it out (I had to restart Apache one more time, not sure why) Go to http://yourmachine/projects to see Trac it working. AuthenticationNow we're going to add Basic Authentication to Trac. This just uses Apache HTTP auth. First add an admin account to the project sudo htpasswd -c /var/trac/myproject/.htpasswd admin Edit your Apache site configuration to allow AuthConfig statements sudo vim /etc/apache2/sites-enabled/000-default Add this at the top of the file <Directory /var/www/> Add this just before the </VirtualHost> <Location /projects/myproject> And that should be it. Just one last restart and you can now visit your Projects site again, and this time be prompted for authentication. sudo apache2ctl graceful Upgrade to latest TracThe version of Trac shipped in the Ubuntu repositories (at the time I'm writing this) is 0.10.4 - so you might want to upgrade to the latest version (0.11) Install the new version of Trac sudo easy_install Trac The new version needs Python Eggs sudo mkdir /var/www/.python-eggs Let admin (change to whoever you like) admin the project sudo trac-admin /var/trac/myproject permission add admin TRAC_ADMIN Restart and test! sudo apache2ctl graceful AdditionsFinally, we can install some additional Trac modules to make things work better sudo easy_install http://svn.edgewall.org/repos/genshi/trunk/ I needed to persuade Trac that some odd "CTP" files were actually PHP files. To do this, just add the custom extension to the relevant MIME type sudo vim /etc/mime.types So it says something like application/x-httpd-php phtml pht php ctp Using LDAPsudo vim /etc/apache2/sites-enabled/000-default Should now have the following <Location> section <Location /svn> References
Last Updated on Wednesday, 16 July 2008 19:23
|
||||||||||||||||||||
|
||||||||||||||||||||
|
<< Start < Prev 1 2 3 4 5 6 7 8 9 10 Next > End >> |
||||||||||||||||||||
| Page 6 of 11 |




















