Edgewall Software

Changes between Initial Version and Version 1 of TracOnOsxServerNoFink


Ignore:
Timestamp:
Jul 18, 2006, 2:08:25 PM (18 years ago)
Author:
thibaud.guillaume-gentil@…
Comment:

first add

Legend:

Unmodified
Added
Removed
Modified
  • TracOnOsxServerNoFink

    v1 v1  
     1[[PageOutline(2-4)]]
     2= Trac + SVN Installation on Mac OS X Server  10.4.7 =
     3
     4== Requirements ==
     5
     6Mac OS X Server 10.4.7 + XCode 2.3 ([http://developer.apple.com/tools/xcode/ Download])
     7
     8||[http://projects.edgewall.com/trac/ Trac]||0.9.6||
     9||[http://www.python.org/ Python]||2.3.5 (as installed with OS X 10.4.7)||
     10||[http://httpd.apache.org/ Apache]||2.0.58||
     11||[http://www.modpython.org/ mod_python]||3.2.8||
     12||[http://www.swig.org/ Swig]||1.3.29||
     13|| [http://subversion.tigris.org/ Subversion]||1.3.2||
     14||[http://www.sqlite.org/ SQLite]||3.1.3 (as installed with OS X 10.4.7)||
     15||[http://pysqlite.org/ PySQLite]||2.2.2||
     16||[http://clearsilver.net/ Clearsilver]||0.10.3||
     17||[http://docutils.sourceforge.net/ Docutils]||0.4||
     18
     19== Preliminaries ==
     20
     21Install Mac OS X Server 10.4.7 and XCode 2.3
     22
     23Download all binaries and untar it in the folder {{{/usr/local/temp}}}  (for example)
     24
     25== Binairies Installation ==
     26'''The order of installation it's very important respect it, please!'''
     27
     28=== Swig ===
     29
     30{{{
     31cd <swig-distribution-top-dir>
     32./configure --with-python=/usr/bin/python
     33make
     34sudo make install
     35}}}
     36
     37=== Apache 2 ===
     38
     39{{{
     40cd <apache2-distribution-top-dir>
     41./configure --enable-mods-shared=most --enable-ssl --with-mpm=worker --without-berkeley-db –-enable-so
     42make
     43sudo make install
     44}}}
     45
     46=== mod_python ===
     47
     48{{{
     49cd <mod_python-distribution-top-dir>
     50./configure --with-apxs=/usr/local/apache2/bin/apxs --with-python=/usr/bin/python
     51make
     52sudo make install
     53}}}
     54
     55=== Subversion ===
     56
     57{{{
     58cd <subversion-distribution-top-dir>
     59./configure -prefix=/usr/local  --without-berkeley-db --enable-swig-bindings=python \
     60    --with-swig=/usr/local/bin/swig PYTHON2=/System/Library/Frameworks/Python.framework/Versions/2.3/ \
     61    --mandir=/usr/local/share/man --with-ssl  --with-apxs=/usr/local/apache2/bin/apxs --with-zlib \
     62    --enable-swig-bindings=no --with-apr=/usr/local/apache2 --with-apr-util=/usr/local/apache2
     63make
     64sudo make install
     65}}}
     66
     67swig svn python bindings
     68
     69{{{
     70cd <subversion-distribution-top-dir>
     71make swig-py
     72sudo make install-swig-py
     73echo /usr/local/lib/svn-python > /Library/Python/2.3/site-packages/svn-python.pth
     74}}}
     75
     76=== PySQLite ===
     77
     78{{{
     79cd <pysqlite-distribution-top-dir>
     80sudo python setup.py install
     81}}}
     82
     83=== Clearsilver ===
     84
     85{{{
     86cd <clearsilver-distribution-top-dir>
     87./configure --prefix=/usr/local --with-python=/usr/bin/python --disable-ruby
     88make
     89# >>> here modify first line of scripts/document.py to use same python  (#!/usr/bin/ python)
     90sudo make install
     91}}}
     92
     93=== Docutils ===
     94
     95{{{
     96cd < docutils-distribution-top-dir>
     97sudo python setup.py install
     98}}}
     99
     100== Trac + SVN Configuration ==
     101
     102First choose a location for your subversion repository, e.g. {{{/var/svn/your_project}}}, and one for you trac environment, e.g. {{{/var/trac/your_project}}}.
     103
     104You may need to manage access rights on the trac env directory tree. This may be done by first creating a unix group dedicated to this trac project, e.g. {{{trac}}}, and assigning the various users to this group. The apache {{{www}}} user should be one of these. If you need a nice description of how to do this, look at the [http://developer.apple.com/internet/opensource/cvsoverview.html Apple CVSOverview] (then search for the text "create a new group" or "!NetInfo Manager").
     105
     106In my configuration Apache2 is the {{{nobody}}} user so you can try:
     107
     108{{{
     109sudo chgrp -R nobody /var/trac
     110sudo chmod -R 770 /var/trac
     111sudo chgrp -R nobody /var/svn
     112sudo chmod -R 770 /var/svn
     113}}}
     114
     115=== SVN Repository ===
     116
     117{{{
     118svnadmin create /var/svn/your_project
     119}}}
     120
     121Subversion executables are installed into /usr/local/bin, which is not in the default path in Mac OS X Server v10.4. To add /usr/local/bin to a user's default path, create a .profile file in your home directory (or simply add the line if you already have a .profile file):
     122
     123{{{
     124cd ~
     125echo 'export PATH="$PATH:/usr/local/bin"' >> .profile
     126}}}
     127
     128To make sure the repository is ok, play with it a little:
     129{{{
     130cd /tmp
     131mkdir proj
     132cd proj
     133mkdir trunk branches tags
     134cd ..
     135svn import proj file:///var/svn/your_project -m "Import First"
     136rm -r proj
     137svn co file:///var/svn/your_project proj
     138cd proj
     139svn update
     140}}}
     141
     142=== Trac Environment ===
     143
     144{{{
     145trac-admin /var/trac/your_project initenv
     146}}}
     147
     148Your {{{trac-admin}}} binary may not be in your search path - if {{{trac-admin}}} isn't found, try:
     149
     150{{{
     151cd ~
     152echo 'export PATH="$PATH:/System/Library/Frameworks/Python.framework/Versions/Current/bin/trac*"' >> .profile
     153}}}
     154
     155== Apache2 Configuration and Right Access ==
     156
     157=== apache httpd.conf ===
     158
     159Open and edit  {{{httpd.conf}}} in {{{/usr/local/apache2/conf}}}
     160
     161Add this module (if not already exist) at line ~265
     162
     163{{{
     164LoadModule dav_svn_module     modules/mod_dav_svn.so
     165LoadModule authz_svn_module   modules/mod_authz_svn.so
     166
     167LoadModule python_module modules/mod_python.so
     168}}}
     169
     170Add and configure access to Trac and SVN path at line ~1040
     171
     172{{{
     173<Location /your_project/>
     174   SetHandler mod_python
     175   PythonHandler trac.web.modpython_frontend
     176   PythonOption TracEnv /var/trac/your_project
     177</Location>
     178
     179<Location "/your_project/login">
     180  AuthType Basic
     181  AuthName "emersion"
     182  AuthUserFile /var/trac/your_project/.htpasswd
     183  Require valid-user
     184</Location>
     185
     186<Location /your_project/svn>
     187    DAV svn
     188    SVNPath /var/svn/eMersion
     189   
     190    AuthzSVNAccessFile /var/svn/your_project/conf/authz
     191   
     192    AuthType Basic
     193    AuthName "Reférentiel Subversion"
     194    AuthUserFile /var/trac/your_project/.htpasswd
     195    Require valid-user
     196</Location>
     197}}}
     198
     199=== Trac and SVN .htpasswd ===
     200
     201Trac ans SVN can share the same {{{.htpasswd}}}, but you can separate it if you want.
     202
     203create the {{{.htpasswd}}} in {{{/var/trac/your_project/}}}, for exampe:
     204
     205{{{
     206[users]
     207YourName:8d2yxeC7vAkiQ
     208HisName:7$4k2Ci4QoVFc
     209}}}
     210
     211{{{[users]}}} is important for the AuthzSVNAccessFile.
     212
     213For generate password you can use [http://www.engr.sjsu.edu/daluu/scripts/htpasswd.php this web site]
     214
     215=== SVN authz ===
     216
     217Edit the file {{{authz}}}  in {{{/var/svn/your_project/conf/}}}, for example:
     218
     219{{{
     220[groups]
     221admin = YourName
     222
     223[/]
     224@admin = rw
     225HisName = r
     226* =
     227}}}
     228
     229for more details on this configuration's file please [http://svnbook.red-bean.com/en/1.2/svn-book.html#svn.serverconfig.httpd.authz read this]
     230
     231=== Start apache2 ===
     232
     233Now you can start apache2:
     234
     235{{{
     236sudo /usr/local/apache2/bin/apachectl start
     237}}}
     238
     239You can check if everything is working well:
     240
     241 * for trac [http://localhost:80/your_project]
     242 * for svn direct access [http://localhost:80/your_project/svn]
     243
     244For external access please make your own apache's configuration
     245
     246thibaud.guillaume-gentil [at] epfl.ch