Edgewall Software

Changes between Version 70 and Version 71 of TracOnDebian


Ignore:
Timestamp:
Aug 31, 2005, 5:40:16 PM (19 years ago)
Author:
jim@…
Comment:

Moving Sarge installation to new page

Legend:

Unmodified
Added
Removed
Modified
  • TracOnDebian

    v70 v71  
    8383
    8484== Debian Sarge 3.1 (stable) ==
    85 If you have Debian Sarge 3.1 you can directly start from this Line, after you've installed Apache2.  From a basic installation of the final 3.1 stable, you'll need to install apache2, subversion, trac, and libapache2-svn.
    8685
    87    ...
    88 {{{
    89 apt-get install trac
    90 }}}
    91  * Getting Subversion working:
     86See TracOnDebianSarge
    9287
    93    I decided to keep my Subversion project at /var/svn/project. Here are the commands I entered to get SVN up and running:
    94 {{{
    95 mkdir /var/svn
    96 mkdir /var/svn/project
    97 mkdir /tmp/project
    98 mkdir /tmp/project/branches
    99 mkdir /tmp/project/tags
    100 mkdir /tmp/project/trunk
    101 svnadmin create /var/svn/project
    102 svn import /tmp/project file:///var/svn/project -m "initial import"
    103 rm -rf /tmp/project
    104 }}}
    105    I added the following to /etc/apache2/sites-available/default:
    106 {{{
    107 #SVN dir
    108 <Location /svn>
    109   DAV svn
    110   SVNParentPath /var/svn
    111   SVNAutoversioning on
    112   AuthType Basic
    113   AuthName "SVN - Your Project"
    114   AuthUserFile /ect/apache2/svn.passwd
    115   Require valid-user
    116 </Location>
    117 }}}
    118    Then I fixed permissions, added User and restarted apache2:
    119 {{{
    120 find /var/svn/project -type f -exec chmod 660 {} \;
    121 find /var/svn/project -type d -exec chmod 2770 {} \;
    122 chown -R root.www-data /var/lib/svn/repository
    123 cd /etc/apache2
    124 htpasswd2 -c svn.passwd user1 (you'll be prompted for the password)
    125 htpasswd2 svn.passwd user2 (you'll be prompted for the password)
    126 apache2 -k restart
    127 }}}
    128    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!
    129 
    130 UPDATE: I had some problems with the WebDAV module not loading. To enable this, you need to create some sym links inside /etc/apache2/mods-enabled. I typed this to get it to work:
    131 {{{
    132 a2enmod dav
    133 a2enmod dav_fs
    134 /etc/init.d/apache2 force-reload
    135 }}}
    136 
    137 If you are having problems restarting and the error is something like "Unknown DAV provider: svn" try installing the libapache2-svn module by typing
    138 {{{
    139 apt-get install libapache2-svn
    140 apache2 -k restart
    141 }}}
    142 
    143  * Getting Trac running:
    144  
    145    I put my trac environment at /var/trac/project. I'm not using the mod_python extentions at the moment. First I ran
    146 {{{
    147 mkdir /var/trac
    148 trac-admin /var/trac/project initenv
    149 chown -R www-data /var/trac/project
    150 }}}
    151    The "trac-admin" command above prompted me to enter the project name, the path to the trac environment, and the path to the Trac templates directory; then it printed out a bunch of stuff.
    152 
    153    Next, 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:
    154 {{{
    155 Alias /trac "/usr/share/trac/htdocs"
    156 ScriptAlias /proj /usr/share/trac/cgi-bin/trac.cgi
    157 <Location "/proj">
    158  SetEnv TRAC_ENV "/var/trac/project"
    159 </Location>
    160  
    161 <Directory "/usr/share/trac/htdocs">
    162   Options Indexes MultiViews
    163   AllowOverride None
    164   Order allow,deny
    165   Allow from all
    166 </Directory>
    167  
    168 # You need something like this to authenticate users
    169 <Location "/proj/login">
    170   AuthType Basic
    171   AuthName "project"
    172   AuthUserFile /var/www/trac.htpasswd
    173   Require valid-user
    174 </Location>
    175 }}}
    176    Now to fix the permissions, add a couple of users, and restart Apache:
    177 {{{
    178 cd /var/www
    179 htpasswd -c trac.htpasswd user1     (you'll be prompted for the password)
    180 htpasswd trac.htpasswd bar user2    (you'll be prompted for the password)
    181 apache2 -k restart
    182 }}}
    183    Finally, test by going to !http://servername.foo.com/proj/
    184 
    185 On my installation, I do get some errors ("Python C API version mismatch for module ''blah''") when I run trac-admin at the commandline. Apache also logs similar errors. This is probably because I didn't upgrade to Python2.2 until ''after'' I installed Trac. Hopefully these errors will be avoided by upgradng Python first (as I have advised above), but in any case they don't seem to hurt Trac at all. Everything (except email notifications which I don't need anyway) works perfectly!
    186 ----
     88== Running Trac from trunk ==
    18789Furthermore, there is a guide on building the Debian Trac package from the trunk at TracOnDebianFromTrunk