Edgewall Software

Changes between Version 13 and Version 14 of TracOnDebianSarge


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

Split, corrected some typos and small rewrite

Legend:

Unmodified
Added
Removed
Modified
  • TracOnDebianSarge

    v13 v14  
    1 See TracOnDebian.
     1= Installing and Running Trac on Debian Sarge =
     2
     3== Running from Trunk ==
     4
     5There is a page on running from trunk on TracOnDebianFromTrunk
     6
     7== Non-Default packages ==
     8Sarge users who want to track Edgewall's latest version need to add a few lines to their '''/etc/apt/sources.list''' :
     9{{{
     10# Trac and clearsilver
     11deb http://ftp.edgewall.com/pub/debian sarge trac
     12}}}
     13
     14Then update APT's cache :
     15{{{
     16 $ apt-get update
     17}}}
     18
     19Whether the above steps to get Edgewall's version instead of Debian's were followed or not, installing Trac should be as simple as installing the '''trac''' package.
     20
     21== Debian Sarge 3.1 (stable) ==
     22If 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.
     23
     24=== Prerequisites ===
     25
     26{{{
     27  $ apt-get install apache2
     28  $ apt-get install subversion
     29  $ apt-get install libapache2-svn
     30  $ apt-get install trac
     31}}}
     32
     33 * Getting Subversion working:
     34
     35   To create a Subversion project at '''/var/svn/project''', issue these commands to get SVN up and running:
     36
     37_Note:_  As of this writing, the default Subversion package uses the BDB filesystem;   if this is acceptable, feel free to omit the extra argument to '''svnadmin create'''.
     38
     39{{{
     40  $ mkdir /var/svn
     41  $ mkdir /var/svn/project
     42  $ mkdir /tmp/project
     43  $ mkdir /tmp/project/branches
     44  $ mkdir /tmp/project/tags
     45  $ mkdir /tmp/project/trunk
     46  $ svnadmin create /var/svn/project --fs-type fsfs
     47  $ svn import /tmp/project file:///var/svn/project -m "initial import"
     48  $ rm -rf /tmp/project
     49}}}
     50
     51   Add the following to '''/etc/apache2/sites-available/default''':
     52{{{
     53#SVN dir
     54<Location /svn>
     55  DAV svn
     56  SVNParentPath /var/svn
     57  SVNAutoversioning on
     58  AuthType Basic
     59  AuthName "SVN - Your Project"
     60  AuthUserFile /etc/apache2/svn.passwd
     61  Require valid-user
     62</Location>
     63}}}
     64   Fix permissions to the repository, added user passwords, and restart apache2:
     65{{{
     66  $ find /var/svn/project -type f -exec chmod 660 {} \;
     67  $ find /var/svn/project -type d -exec chmod 2770 {} \;
     68  $ chown -R root.www-data /var/svn/project
     69}}}
     70   Enable installed apache modules
     71{{{
     72  $ a2enmod dav
     73  $ a2enmod dav_fs
     74}}}
     75   Add Subversion users.  Note the different syntax for creating the first user from creating each additional user.
     76{{{
     77cd /etc/apache2
     78htpasswd2 -c svn.passwd user1 (you'll be prompted for the password)
     79htpasswd2 svn.passwd user2 (you'll be prompted for the password)
     80}}}
     81   Restart Apache2.
     82
     83{{{
     84  $ apache2 -k restart
     85}}}
     86
     87Go to !http://servername.foo.com/svn/project to see the empty directories as imported. Do not move on to the next step until this works correctly!
     88
     89 * Getting Trac running:
     90 
     91   These instructions will install a trac environment at '''/var/trac/project''', without using the mod_python extentions.  Initialize the Trac environment with the following commands:
     92{{{
     93  $ mkdir /var/trac
     94  $ trac-admin /var/trac/project initenv
     95  $ find /var/trac/project -type f -exec chmod 660 {} \;
     96  $ find /var/trac/project -type d -exec chmod 2770 {} \;
     97}}}
     98   The '''trac-admin''' command above will prompt you 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.
     99
     100   Next, edit '''/etc/apache2/sites-available/default'''.  Comment out the existing {{{ScriptAlias}}} and  {{{<Directory "/usr/lib/cgi-bin">}}} directives.  To install trac at a URL like !http://servername.foo.com/proj , add this at the end:
     101{{{
     102Alias /trac "/usr/share/trac/htdocs"
     103ScriptAlias /proj /usr/share/trac/cgi-bin/trac.cgi
     104<Location "/proj">
     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 "/proj/login">
     117  AuthType Basic
     118  AuthName "project"
     119  AuthUserFile /var/www/trac.htpasswd
     120  Require valid-user
     121</Location>
     122}}}
     123   Providing /etc/apache2/svn.passwd in the space above will allow you to use the same usernames and passwords in both Subversion and Trac.  If you choose to authenticate, seperately, add Trac users, and restart Apache:
     124{{{
     125  $ cd /var/www
     126  $ htpasswd -c trac.htpasswd user1     (you'll be prompted for the password)
     127  $ htpasswd trac.htpasswd bar user2    (you'll be prompted for the password) 
     128  $ apache2 -k restart
     129}}}
     130   Finally, test by going to !http://servername.foo.com/proj/