Edgewall Software

Changes between Version 1 and Version 2 of TracOnArchLinux


Ignore:
Timestamp:
Jun 25, 2007, 3:02:34 PM (17 years ago)
Author:
dlin.tw@…
Comment:

add trac & svn config

Legend:

Unmodified
Added
Removed
Modified
  • TracOnArchLinux

    v1 v2  
     1[[PageOutline(2-3)]]
    12= Installing Trac on !ArchLinux for Multiple Projects using Mod_Python =
    23[http://www.archlinux.org ArchLinux] is powered by a simple and lightweight package management system. It is release by rolling binary system.  Keep update by command line '''pacman -Syu''' will get the most recent version.
    34
    4 == install depend packages from binary ==
     5In following steps, I set these variable for simply input
     6{{{
     7TROOT=/home/trac  # put the multiple trac project's db
     8SROOT=/home/svn   # put the multiple project subversion repositories
     9PRJ=project1      # put each project's name
     10}}}
     11
     12== install packages ==
     13=== install depend packages from binary ===
    514{{{
    615pacman -S mod_python python-pysqlite
    716}}}
    8 == Download trac from binary ==
     17=== Download trac from binary ===
    918Trac is already on community repository, check /etc/pacman.conf, make sure uncomment the following.
    1019{{{
     
    2130}}}
    2231
    23 == or, build trac from source ==
     32=== or, build trac from source ===
    2433if want the newest version trac.
    2534
     
    4453}}}
    4554
    46 to be continue...
     55use following line to restart apache, check /var/log/httpd/error.log, if failed
     56{{{
     57/etc/rc.d/httpd restart
     58}}}
     59
     60Tips: you can check it by http://your_server_ip/server-info after following config
     61{{{
     62edit /etc/httpd/conf/httpd.conf uncomment following line
     63Include /etc/httpd/conf/extra/httpd-info.conf
     64
     65edit /etc/httpd/conf/extra/httpd-info.conf modify the "Allow from" to your client ip address
     66}}}
     67
     68== setup subversion for each project ==
     69mkdir -p $SROOT/$PRJ
     70mkdir /tmp/$PRJ
     71mkdir /tmp/$PRJ/branches
     72mkdir /tmp/$PRJ/tags
     73mkdir /tmp/$PRJ/trunk
     74svnadmin create $SROOT/$PRJ
     75svn import /tmp/$PRJ file://$SROOT/$PRJ -m "initial import"
     76rm -rf /tmp/$PRJ
     77svn ls -v file://$SROOT/$PRJ   # check it
     78
     79== setup trac db for each project ==
     80mkdir -p $TROOT
     81
     82setup by interactive questions
     83{{{
     84trac-admin $TROOT/$PRJ initenv
     85}}}
     86or, by command line parameters
     87{{{
     88trac-admin $TROOT/$PRJ initenv $PRJ sqlite:db/trac.db svn $SROOT/$PRJ /usr/share/trac/templates
     89}}}
     90
     91== configure apache ==
     92{{{
     93chown -R nobody $SROOT $TROOT  # allow httpd's owner 'nobody' could read/write
     94
     95edit /etc/httpd/conf/httpd.conf,  uncomment following line
     96Include /etc/httpd/conf/extra/httpd-vhosts.conf
     97
     98edit /etc/httpd/conf/extra/httpd-vhosts.conf, append following lines
     99<VirtualHost *:80>
     100    ServerAdmin dlin@mail.taifex.com.tw
     101    DocumentRoot /home/trac/
     102    ServerName 192.168.13.203
     103    ErrorLog /var/log/httpd/trac.error_log
     104    CustomLog /var/log/httpd/trac.access_log common
     105    <Location /prjs> #set up Trac handling
     106        SetHandler mod_python
     107        PythonHandler trac.web.modpython_frontend
     108        PythonOption TracEnvParentDir /home/trac     <-- change to $TROOT value
     109        PythonOption TracUriRoot /prjs
     110    </Location>
     111</VirtualHost>
     112}}}
     113