tracをインストールしてみた

インタアクトによってローカライズされた trac-ja を使う。

必要なもの

Python が最新の2.5でないのは ClearSilver が対応していないから。
PySQLite は 2.4.0 が最新版だけど trac-admin コマンドを実行したときにエラーが出た。以前にダウンロードした 2.3.3 を試してみたら大丈夫だったので,こちらを使うことにした。

インストール

Subversion はインストール済みだったけど,ついでにアップデート。やり方は省略。

Python, PySQLite, subversion python binding, CleasSilver

インストーラだからダブルクリックしてインストールするだけ。

Python は C:\usr\python24 にインストールした。パスを通すのを忘れずに。

DocUtils

ファイルを展開して:

 ^o^ >cd docutils-0.4
 ^o^ >python setup.py install
trac

これも同様。ファイルを展開して:

 ^o^ >cd trac-0.10.4-ja-1
 ^o^ >python setup.py install

Thank you for choosing Trac 0.10.4. Enjoy your stay! と出たので無事完了。

trac の設定

まずはリポジトリを作っておく。

 ^o^ >svnadmin create D:/svn/sample

tracの設定には trac-admin コマンドを使う。

 ^o^ >python C:\usr\python24\scripts\trac-admin D:/www/trac/sample initenv
 Creating a new Trac environment at D:\www\trac\sample
 
 Trac will first ask a few questions about your environment
 in order to initalize and prepare the project database.
 
  Please enter the name of your project.
  This name will be used in page titles and descriptions.
 
 Project Name [My Project]> Sample Project
 
  Please specify the connection string for the database to use.
  By default, a local SQLite database is created in the environment
  directory. It is also possible to use an already existing
  PostgreSQL database (check the Trac documentation for the exact
  connection string syntax).
 
 Database connection string [sqlite:db/trac.db]>
 
  Please specify the type of version control system,
  By default, it will be svn.
 
  If you don't want to use Trac with version control integration,
  choose the default here and don't specify a repository directory.
  in the next question.
 
 Repository type [svn]>
 
  Please specify the absolute path to the version control
  repository, or leave it blank to use Trac without a repository.
  You can also set the repository location later.
 
 Path to repository [/path/to/repos]> d:/svn/sample
 
  Please enter location of Trac page templates.
  Default is the location of the site-wide templates installed with Trac.
 
 Templates directory [C:\usr\python24\share\trac\templates]>
 
 Creating and Initializing Project
  Installing default wiki pages
  C:\usr\python24\share\trac\wiki-default\CamelCase => CamelCase
  C:\usr\python24\share\trac\wiki-default\checkwiki.py => checkwiki.py
  C:\usr\python24\share\trac\wiki-default\InterMapTxt => InterMapTxt

  (snip)

  C:\usr\python24\share\trac\wiki-default\WikiPageNames => WikiPageNames
  C:\usr\python24\share\trac\wiki-default\WikiProcessors => WikiProcessors
  C:\usr\python24\share\trac\wiki-default\WikiRestructuredText => WikiRestructur e
 dText
  C:\usr\python24\share\trac\wiki-default\WikiRestructuredTextLinks => WikiRestr u
 cturedTextLinks
  C:\usr\python24\share\trac\wiki-default\WikiStart => WikiStart
  Indexing repository
 
 ---------------------------------------------------------------------
 Project environment for 'Sample Project' created.
 
 You may now configure the environment by editing the file:
 
   D:\www\trac\sample\conf\trac.ini
 
 If you'd like to take this new project environment for a test drive,
 try running the Trac standalone web server `tracd`:
 
   tracd --port 8000 D:\www\trac\sample
 
 Then point your browser to http://localhost:8000/sample.
 There you can also browse the documentation for your installed
 version of Trac, including information on further setup (such as
 deploying Trac to a real web server).
 
 The latest documentation can also always be found on the project
 website:
 
   http://trac.edgewall.org/
 
 Congratulations!

D:\www\trac\wample\conf\trac.ini ファイルを編集:文字コードだけ。

  :
 [trac]
  :
 default_charset = japanese.shift_jis
  :

tracd

trac にはスタンドアロンのサーバがついている:

 ^o^ >python c:/usr/python24/scripts/tracd --port 8000 d:/www/trac/sample

これでブラウザから http://localhost:8000/ にアクセスすれば,プロジェクトの一覧が表示される。