#freeze
''目次''
#contents
~
----
*目的 [#o8911ec5]
*準備 [#sd8556ca]
*インストール [#i2e4a6a0]
+ソースの取得
# wget -P /usr/local/src http://www.i-act.co.jp/project/products/downloads/trac-0.10.4-ja-1.zip
~
+ソースの解凍
# cd /usr/local/src
# unzip trac-0.10.4-ja-1.zip
~
+インストール
# cd trac-0.10.4-ja-1
# export PATH=/usr/local/python/bin:$PATH ← Pythonにパスを通す
# python setup.py install
*Tracプロジェクト初期設定 [#n7f5262b]
+プロジェクト作成
# trac-admin /home/trac/hoge-project initenv
Project Name [My Project]> [Hoge project]
Database connection string [sqlite:db/trac.db]> [postgres://tracuser@localhost/trac_hoge-project]
Repository type [svn]> [空Enter]
Path to repository [/path/to/repos]> [/home/svn/hoge-project]
Templates directory [/usr/local/python/share/trac/templates]> [空Enter]
~
+Apacheの設定(httpd.confの編集)
# vi /usr/local/apache2/conf/httpd.conf
Include conf/extra/httpd-trac.conf ← 追記
~
+Apacheの設定(httpd-trac.confの作成)
# vi /usr/local/apache2/conf/extra/httpd-trac.conf
<Location /trac>
SetEnv PYTHON_EGG_CACHE /tmp/python_egg_cache
SetHandler mod_python
PythonHandler trac.web.modpython_frontend
PythonOption TracEnvParentDir /home/trac
PythonOption TracUriRoot /trac
PythonDebug On
</Location>
<LocationMatch /trac/[-_[:alnum:]]+/login>
AuthType Basic
AuthName "Trac"
AuthUserFile /usr/local/apache2/conf/users
Require valid-user
</LocationMatch>