Edgewall Software

Changes between Version 41 and Version 42 of TracOnDebian


Ignore:
Timestamp:
Dec 29, 2004, 1:21:44 PM (19 years ago)
Author:
bryan@…
Comment:

More verbose instructions for Debian Woody

Legend:

Unmodified
Added
Removed
Modified
  • TracOnDebian

    v41 v42  
    3131'''Note:''' While installing Trac on Debian Woody you might get some harmless warnings when the installation process byte-compiles some source files.
    3232
     33'''More notes for Trac 0.8 on Debian Woody:'''
     34
     35Notice, this is what worked for me on a '''new''' Woody system I built just to host Trac (in a VMware image, yet!), so I was able to be a little free with modifications I made. Be more careful if you are adding Trac to a system you use for other tasks - don't blame me if these instructions break something!
     36
     37These instructions ignore the above and start at the very beginning.
     38
     39 * Subversion really wants Apache2 installed. If you run {{{apache2 -v}}} and get an error, you'll need to install Apache2.
     40  I removed apache 1.3 and installed Apache2 with the following: 
     41{{{
     42apt-get install apache2-common apache2-doc apache2-mpm-worker libapache2-svn
     43  apt-get remove apache
     44  apache2 -k start
     45}}}
     46 * Trac 0.8 runs better with Python 2.2 and python-xml (without them, diffs and attachment uploading may not work):
     47{{{
     48apt-get install python 2.2 python-xml
     49cd /usr/bin
     50mv python python.orig
     51ln -s python2.2 python
     52cp -R /usr/lib/python2.1/site-packages /usr/lib/python2.2
     53apache2 -k restart
     54}}}
     55 * After completing these pre-requisites, I added the following to /etc/apt/sources.list
     56{{{
     57deb http://ftp.edgewall.com/pub/debian woody trac
     58deb http://people.debian.org/~adconrad woody subversion
     59}}}
     60   and ran
     61{{{
     62apt-get install trac
     63}}}
     64 * Getting Subversion working:
     65
     66   I decided to keep my Subversion project at /var/svn/project. Here are the commands I entered to get SVN up and running:
     67{{{
     68mkdir /var/svn
     69mkdir /var/svn/project
     70mkdir /tmp/project
     71mkdir /tmp/project/branches
     72mkdir /tmp/project/tags
     73mkdir /tmp/project/trunk
     74svnadmin create /var/svn/project
     75rm -rf /tmp/project
     76svn import /tmp/project file:///var/svn/project -m "initial import"
     77}}}
     78   I added the following to /etc/apache2/sites-available/default:
     79{{{
     80  #SVN dir
     81  <Location /svn>
     82    DAV svn
     83    SVNParentPath /var/svn
     84  </Location>
     85}}}
     86   Then I fixed permissions and restarted apache2:
     87{{{
     88chown /var/svn/nim www-data
     89chown -R /var/svn/nim/* www-data
     90apache2 -k restart
     91}}}
     92   I was able to test by going to !http://servername.foo.com/svn/project where I could see the empty directories as imported. I did not move on to the next step until this worked right!
     93
     94 * Getting Trac running:
     95 
     96   I put my trac environment at /var/trac/project. I'm not using the mod_python extentions at the moment. First I ran
     97{{{
     98trac-admin /var/trac/project initenv  (will prompt you for several things and print lots of output)
     99}}}
     100   Then I edited /etc/apache2/sites-available/default. I commented out the existing {{{ScriptAlias}}} and  {{{<Directory "/usr/lib/cgi-bin">}}} directives, and added this at the end:
     101{{{
     102  Alias /trac "/usr/share/trac/htdocs"
     103  ScriptAlias /cgi-bin/ /usr/share/trac/cgi-bin/
     104  <Location "/cgi-bin/trac.cgi">
     105            SetEnv TRAC_ENV "/var/trac/project"
     106  </Location>
     107 
     108  <Directory "/usr/share/trac/htdocs">
     109    Options Indexes MultiViews
     110    AllowOverride None
     111    Order allow,deny
     112    Allow from all
     113  </Directory>
     114 
     115  # You need something like this to authenticate users
     116  <Location "/cgi-bin/trac.cgi/login">
     117  AuthType Basic
     118  AuthName "project"
     119  AuthUserFile /var/www/trac.htpasswd
     120  Require valid-user
     121  </Location>
     122}}}
     123  Now to fix the permissions, add a couple of users, and restart Apache:
     124{{{
     125cd /var/www
     126htpasswd -c trac.htpasswd user1     (you'll be prompted for the password)
     127htpasswd trac.htpasswd bar user2    (you'll be prompted for the password)
     128apache2 -k restart
     129}}}
     130  Finally, test by going to !http://servername.foo.com/cgi-bin/trac.cgi
     131
     132  On my installation, I do get some errors ("Python C API version mismatch for module ''blah''") when I run trac-admin at the commandline. This is probably because I didn't upgarde to Python2.2 until ''after'' I installed Trac. Hopefully these errors will be avoided by upgradng Python first, but in any case they don't seem to hurt Trac at all. Everything works perfectly! ''bryan@lockwoods.us''
     133
     134
    33135Furthermore, there is a guide on building the Debian Trac package from the trunk at TracOnDebianFromTrunk