Tracインストレーションガイド
============================
ウェブベースのプロジェクト管理ツール、TracはサーバサイドのCGIプログラムとして
実装されています。TracはPythonで記述されており、組み込みデータベースとして
SQLiteを使用します。HTMLレンダリングのために、TracはClearsilverテンプレート
システムを使用します。

Requirements
------------
To install Trac, the following software packages must be installed:

  * Python, version >= 2.1.
      + Please keep in mind, that for RPM-based systems you will also need
        python-devel and python-xml packages.
  * Subversion, version >= 1.0. (>=1.0.5 recommended)
  * Subversion Python bindings.
  * PySQLite, version >= 0.5.
  * Clearsilver, version >= 0.9.3
  * A CGI-capable web server (we QA-test on Apache2 )

Tracのインストール
------------------
    $ python ./setup.py install

この手順は、Pythonソースコードをバイトコンパイルして、Pythonのsite-packages
ディレクトリにインストールします。また、ディレクトリcgi-bin, template, htdocs, 
wiki-defaultは、$prefix/share/trac/ディレクトリにすべてコピーされます。

さらに、このスクリプトではコマンドラインツールのtrac-adminをインストールします。
trac-adminツールはプロジェクト環境の生成やメンテナンスに使用する、Tracの中枢
コマンドです。

Note: この操作にはroot権限が必要です。

Advanced Users
--------------
To install Trac in a different location, and other advanced installation
options, run:

    $ python ./setup.py --help

Installing Trac on Windows
--------------------------
If you downloaded the Trac installer (the .exe file), installing is simply a
matter of running the installer. 

 * NOTE: The windows installer also includes the Clearsilver DLL, so you do
         _NOT_ have to install it manually when using the installer.

After running the installer, configuration and installation is the same as
for other platforms.

プロジェクト環境の作成
----------------------
Trac EnvironmentはTracがwikiページ、チケット、レポート、設定などのような情報を
保存するバックエンドストレージフォーマットです。Trac EnvironmentはSQLite
データベース、人間が読むことができるconfigurationファイル、ログファイルおよび
添付ファイルを含むディレクトリで構成されます。

trac-adminを使用して、新しいTrac environmentを作成します。:

    $ trac-admin /path/to/projectenv initenv

Note: Webサーバの起動ユーザは、このenvironmentディレクトリ、およびその配下の
すべてのファイルに対する書き込みパーミッションが必要です。

trac-adminは、Subversionリポジトリがどこに位置しているか、Tracのテンプレート
ディレクトリがどこにあるのかを、あなたに確認します。
(デフォルト値にすることが望ましい)

Apacheの設定
------------
"trac/cgi-bin/trac.cgi"をWebサーバの/cgi-bin/ディレクトリにコピー(または
シンボリックリンク)してください。または、"trac/cgi-bin/" ディレクトリを
直接使用するようApacheを設定するか好きな方法で構いません。

最後にApacheの設定を編集し、以下に示すような設定を追加してください。(ファイル名
などはインストールにあわせて変更してください):

Alias /trac/ "/usr/share/trac/htdocs/" #or where you installed the trac docs
#You have to allow people to read the files in htdocs
<Directory "/usr/share/trac/htdocs/">
        Options Indexes MultiViews
        AllowOverride None
        Order allow,deny
        Allow from all
</Directory>


# Trac need to know where the database is located
<Location "/cgi-bin/trac.cgi">
        SetEnv TRAC_ENV "/path/to/projectenv"
</Location>

# You need this to allow users to authenticate
# trac.htpasswd can be created with 
# cmd 'htpasswd -c trac.htpasswd' (UNIX)
# do 'man htpasswd' to see all the options
<Location "/cgi-bin/trac.cgi/login">
        AuthType Basic
        AuthName "trac"
        AuthUserFile /somewhere/trac.htpasswd
        Require valid-user
</location>

Note: 新しいenvironmentを作成するとき、trac-adminは、あなたのプロジェクト向けに
カスタマイズした設定を表示します。

Tracを使う
----------
You should now have a working Trac installation at:

http://<yourhostname>/cgi-bin/trac.cgi

これで、指定したSubversionリポジトリをブラウズしたり、ticketsを作成したり、
timelineを見たりすることができます。これだけは覚えておいてください。
(ログインしていない)匿名ユーザでは、Tracへのアクセスは、一部の機能に制限されます。

ログイン済みユーザに追加の権限を与えるための方法は、TracPermissions(wikiのページ)
に記載されています。続けて読んでください。

さらなるユーザドキュメンテーションに関しては、TracGuideを見てください。

Enjoy!

/The Trac Team

Please also consider joining the mailing list at
<http://lists.edgewall.com/mailman/listinfo/trac/>.


Visit the Trac open source project at <http://trac.edgewall.com/>
