Edgewall Software

Changes between Initial Version and Version 1 of Ubuntu-11.10


Ignore:
Timestamp:
Jan 7, 2012, 1:05:56 AM (12 years ago)
Author:
standa.fifik@…
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ubuntu-11.10

    v1 v1  
     1How to install Trac 0.12 on ubuntu 11.10 machine with apache2 using wsgi. (everytime I use vim you can user any editor you want (nano, gedit..))
     2
     3'''Install trac''' (and usefull plugins) from repository:
     4
     5{{{
     6sudo apt-get install trac trac-accountmanager trac-graphviz trac-icalviewplugin trac-masterticket trac-wysiwyg trac-wikitablemacro trac-tags trac-customfieldadmin trac-datefieldplugin
     7}}}
     8
     9If you're going to use sqlite for db (as I do) install python-sqlite:
     10
     11{{{
     12sudo apt-get install sqlite3 python-sqlite
     13}}}
     14
     15
     16'''install sendmail''' (if not installed already):
     17
     18{{{
     19sudo apt-get install sendmail
     20}}}
     21
     22'''add trac user:'''
     23
     24{{{
     25sudo adduser --system --shell /bin/sh --gecos 'trac project managment' --group --disabled-password --home /home/trac trac
     26}}}
     27
     28'''login as trac user''' start bash and swich to homedir:
     29
     30{{{
     31sudo su trac
     32bash
     33cd
     34}}}
     35
     36'''make directory for all projects and create new project'''
     37
     38{{{
     39mkdir projects
     40cd projects
     41trac-admin android initenv
     42}}}
     43and finish instalation
     44
     45'''back to your user'''.
     46pressing CTRL+d twice should get you back.
     47
     48now we'll configure apache
     49
     50Open apache apache site file what you want to use for trac (default should be fine). In my case I have Virtualhost for subdomain trac.
     51
     52{{{
     53vim /etc/apache2/sites-enabled/trac
     54}}}
     55and looks like:
     56
     57{{{
     58<VirtualHost *>
     59  ServerName trac.domain.my
     60  DocumentRoot /var/trac/projects
     61
     62  WSGIScriptAlias ^/([^/]+) /var/trac/projects/$1/deploy/cgi-bin/trac.wsgi
     63  <Directory /var/trac/projects>
     64    Options Indexes FollowSymLinks MultiViews
     65    AllowOverride None
     66    Order allow,deny
     67    allow from all
     68  </Directory>
     69
     70   
     71
     72
     73... trac unrelated stuff...
     74
     75</VirtualHost>
     76}}}
     77
     78WSGIScriptAlias does all the magic. it gets project name from url and redirects to trac.wsgi in that project.
     79If you're not running trac sites as subdomain but as folder in your documentroot (i.e. domain.ur/trac/myproject) replace ^/([^/]+) line with ^/'''trac/'''([^/]+)
     80