MacPorts から trac をインストール。 Subversion と Apache はすでにインストール済み。 mod_python だとエラーになってうまくいかなかったので、 fastcgi で動作させる。
sudo port install trac sudo port install mod-fastcgi
/Users/trac を Trac のホームにする。すでに example リポジトリはある。
trac-admin example initenv
質問に適当に答えて完了。
あと Apache の設定ファイルに設定を追加していく。 Debian と同じように設定ファイルを分割する。
AddHandler fastcgi-script .fcgi LoadModule fastcgi_module modules/mod_fastcgi.so Include conf/extra/httpd-trac.conf
ScriptAlias /trac "/opt/local/share/trac/cgi-bin/trac.fcgi" <Location "/trac"> SetEnv TRAC_ENV_PARENT_DIR "/Users/trac" order deny,allow deny from all allow from all </Location> <Location "/trac/example/login"> AuthType Digest AuthName "example" AuthUserFile /Users/trac/auth Require valid-user </Location>
Digest 認証ファイルを作成する。
cd /Users/trac sudo htdigest -c auth "example" ussy
Apache を再起動後に http://localhost/trac でログインまで確認できた。