| 274 | == OS X 10.5, basic Trac + clearsilver + Apache == |
| 275 | |
| 276 | By Toby Thain, mailto:toby@telegraphics.com.au |
| 277 | |
| 278 | === Trac === |
| 279 | Download and extract 0.10.4, then as root, |
| 280 | {{{ |
| 281 | # python ./setup.py install |
| 282 | }}} |
| 283 | |
| 284 | Note that the correct template directory (as specified in {{{ PROJECT/conf/trac.ini }}} is |
| 285 | {{{ |
| 286 | templates_dir = /System/Library/Frameworks/Python.framework/Versions/2.5/share/trac/templates |
| 287 | }}} |
| 288 | |
| 289 | === clearsilver === |
| 290 | Typically, the build is problematic. I did: |
| 291 | {{{ |
| 292 | # ./configure --with-python=`which python` --disable-ruby --disable-java --disable-perl --disable-apache --disable-csharp |
| 293 | # make |
| 294 | # make install |
| 295 | }}} |
| 296 | |
| 297 | Then I had to: |
| 298 | {{{ |
| 299 | # mv /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/neo_cgi.so /Library/Python/2.5/site-packages |
| 300 | }}} |
| 301 | |
| 302 | === Apache2 === |
| 303 | Edit {{{ /etc/apache2/httpd.conf }}}, at line 115 enable '''mod_fastcgi''': |
| 304 | {{{ |
| 305 | LoadModule fastcgi_module libexec/apache2/mod_fastcgi.so |
| 306 | }}} |
| 307 | |
| 308 | Hard link {{{ trac.fcgi }}} in Apache's cgi-bin dir: |
| 309 | {{{ |
| 310 | # ln /System/Library/Frameworks/Python.framework/Versions/2.5/share/trac/cgi-bin/trac.fcgi /Library/WebServer/CGI-Executables/ |
| 311 | }}} |
| 312 | |
| 313 | Create file {{{ /etc/apache2/other/trac.conf }}}, e.g. |
| 314 | {{{ |
| 315 | # Enable fastcgi for .fcgi files |
| 316 | <IfModule mod_fastcgi.c> |
| 317 | AddHandler fastcgi-script .fcgi |
| 318 | FastCgiIpcDir /var/lib/apache2/fastcgi |
| 319 | </IfModule> |
| 320 | |
| 321 | ScriptAlias /trac /Library/WebServer/CGI-Executables/trac.fcgi |
| 322 | <Location "/trac"> |
| 323 | SetEnv TRAC_ENV "/path/to/projectdir" |
| 324 | </Location> |
| 325 | |
| 326 | FastCgiConfig -initial-env TRAC_ENV=/path/to/projectdir |
| 327 | }}} |
| 328 | |
| 329 | Then |
| 330 | {{{ |
| 331 | # apachectl restart |
| 332 | }}} |
| 333 | |
| 334 | Browse to http://localhost/trac/ |
| 335 | |