Changes between Version 1 and Version 2 of TracInstall
- Timestamp:
- Jun 21, 2008, 6:11:58 PM (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TracInstall
v1 v2 1 = Trac インストールガイド =1 = Trac Installation Guide = 2 2 [[TracGuideToc]] 3 3 4 Trac は軽量なプロジェクト管理ツールで、 Web ベースのアプリケーションとして実装されています。 Trac は Python で記述されており、データベースが必要です。 ([http://sqlite.org/ SQLite], [http://www.postgresql.org/ PostgreSQL], [http://mysql.com/ MySQL] が使用可能です)。 HTML レンダリングには [http://www.clearsilver.net/ Clearsilver] テンプレートシステムを使用します。4 Trac is a lightweight project management tool that is implemented as a web-based application. Trac is written in the Python programming language and needs a database (either [http://sqlite.org/ SQLite], [http://www.postgresql.org/ PostgreSQL], or [http://mysql.com/ MySQL] works). For HTML rendering, Trac uses the [http://www.clearsilver.net/ ClearSilver] templating system. 5 5 6 以下に示すのは、 Trac のインストールと設定要件に関する一般的な説明です。 Trac を特定のシステムにインストールするための説明は Trac のメインサイトの [http://trac.edgewall.org/wiki/TracInstallPlatforms TracInstallPlatforms] に掲載されています。インストールに必要なタスクをよく理解するためにこれらの一般的な説明を最初に必ず読んでください。 6 What follows are generic instructions for installing and setting up Trac and its requirements. While you can find instructions for installing Trac on specific systems at [http://projects.edgewall.com/trac/wiki/TracInstallPlatforms TracInstallPlatforms] on the main Trac site, please be sure to first read through these general instructions to get a good understanding of the tasks involved. 7 7 8 == インストール要件==8 == Requirements == 9 9 10 ソフトウェア要件:10 To install Trac, the following software packages must be installed: 11 11 12 * [http://www.python.org/ Python], バージョン 2.3 以上。13 * RPM をベースとしたシステムでは `python-devel` と `python-xml` パッケージも必要かもしれません。14 * もし Windows 上で Trac を Subversion とともに使用するならば、 Python 2.4 用にプリコンパイルされた Subversion bindings がないので、 Python 2.3 が必要になるでしょう。15 * 2006-09-20: この記述はもはや正しくないかもしれません。 http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=91 を参照して下さい。 Subversion 1.4.0 用の python 2.4 の バイナリの bindings が利用可能となっています。16 * [http://www.clearsilver.net/ ClearSilver], バージョン 0.9.3 以上。17 * python-bindings (`./configure --with-python=/usr/bin/python`)18 * データベースと使用するデータベースに適切な Python のドライバが必要です。19 データベースとして SQLite, PostgreSQL, MySQL ''(実験的)'' が使用できます。12 * [http://www.python.org/ Python], version >= 2.3. 13 * For RPM-based systems you might also need the `python-devel` and `python-xml` packages. 14 * If you want to use Trac with Subversion on Windows, note that there are no precompiled Subversion bindings for Python 2.4, so you probably need Python 2.3. 15 * 2006-09-20: This seems to be no longer true, see http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=91. For subversion 1.4.0 python 2.4 binary bindings are available. 16 * [http://www.clearsilver.net/ ClearSilver], version >= 0.9.3 17 * With python-bindings (`./configure --with-python=/usr/bin/python`) 18 * You also need a database system and the corresponding python drivers for it. 19 The database can be either SQLite, PostgreSQL or MySQL ''(experimental)''. 20 20 21 === SQLite 利用===21 === For SQLite === 22 22 23 * [http://www.sqlite.org/ SQLite], バージョン 2.8.x か 3.x(推奨)24 * [http://pysqlite.org/ PySQLite], バージョン 1.x (SQLite 2.x 用) またはバージョン 2.x (SQLite 3.x 用)。詳細は[http://trac.edgewall.org/wiki/PySqlite PySqlite] 参照。23 * [http://www.sqlite.org/ SQLite], version 2.8.x or 3.x (preferred) 24 * [http://pysqlite.org/ PySQLite], version 1.x (for SQLite 2.x) or version 2.x (for SQLite 3.x). For details see [http://trac.edgewall.org/wiki/PySqlite PySqlite] 25 25 26 ''Note: Trac のバージョン 0.9 以前では PySQLite 2.x は '''動きません'''。''26 ''Note: Versions of Trac prior to 0.9 do '''not''' work with PySQLite 2.x.'' 27 27 28 ''Note: リポジトリの 'contrib' セクションにある 'trac-post-commit-hook.py' スクリプトを使用するつもりならば、PySQLite 2.x は Trac 0.9+/SQLite 3.x が必要です。28 ''Note: It appears that PySQLite 2.x is required for Trac 0.9+/SQLite 3.x if you plan to use the 'trac-post-commit-hook.py' script available from the 'contrib' section of the source repository.'' 29 29 30 ''Note: Mac OS X のユーザは気を付けて下さい; Apple 社が供給している SQLite は AFP や SMP といったネットワークファイルシステムにおけるファイルのロックを実現するためのコードが含まれています。これは現在の主流ではありませんので、ソースコードから自分で SQLite をビルドする場合、このようなファイルシステムでは正しく動かないでしょう。- たいていの場合、 "{{{database is locked}}}" というエラーがでるでしょう。 アップル社のコードのバージョン 3.3.6 で利用可能な [http://www.alastairs-place.net/2006/07/sqlite_and_mac/ パッチ] があります。それ以外では、アップル社が供給しているバージョン (現在 3.1.3) を使用するのがたぶん最良でしょう。30 ''Note: Users of Mac OS X please take care; the Apple-supplied SQLite contains additional code to support file locking on network filesystems like AFP or SMB. This is not presently (3.3.6) in the mainline sources, so if you build your own SQLite from source it will not function correctly on such filesystems - typically it gives the error "{{{database is locked}}}". [http://www.alastairs-place.net/2006/07/sqlite_and_mac/ A patch] is available for version 3.3.6, based on Apple's code, otherwise you're probably best off using the Apple supplied version (presently 3.1.3).'' 31 31 32 === PostgreSQL 利用===32 === For PostgreSQL === 33 33 34 34 * [http://www.postgresql.org/ PostgreSQL] 35 35 * [http://initd.org/projects/psycopg2 psycopg2] or [http://pypgsql.sourceforge.net/ pyPgSQL] 36 36 37 ''Note: PostgreSQL に対応しているのは Trac バージョン 0.9 以降です。''37 ''Note: PostgreSQL support requires Trac version 0.9 or later.'' 38 38 39 === MySQL 利用===39 === For MySQL === 40 40 41 ''' 注意''': MySQL の対応は現在実験段階です。動くかもしれませんが、まだ十分にテストはされていません。41 '''Warning''': MySQL support is currently experimental. That means it works for some people, but has not been tested extensively yet. 42 42 43 43 * [http://mysql.com/ MySQL], version 4.1 or later 44 44 * [http://sf.net/projects/mysql-python MySQLdb], version 1.2.1 or later 45 45 46 ''Note: MySQL に対応しているのは Trac バージョン 0.10 以降です。''46 ''Note: MySQL support requires Trac version 0.10 or later.'' 47 47 48 === オプション要件===48 === Optional Requirements === 49 49 50 ==== バージョン管理システム====51 * [http://subversion.tigris.org/ Subversion], バージョン 1.0 以降(1.2.3 もしくは 1.3.1以降推奨) と 対応する [http://svnbook.red-bean.com/svnbook-1.1/ch08s02.html#svn-ch-8-sect-2.3 Python bindings]。トラブルシューティングについては、 [http://projects.edgewall.com/trac/wiki/TracSubversion TracSubversion] を参照して下さい。52 * Trac は Subversion の配布物の中の [http://www.swig.org/ SWIG] bindings を使用します。[http://pysvn.tigris.org/ PySVN]''' ではありません'''。(ときどき標準の SWIG bindings と混同します)53 * もし Subversion が SWIG bindings なしでインストールされていた場合、 Subversion をre-`configure` して `make swig-py`, `make install-swig-py` を実行する必要があります。54 * サードパーティが提供しているほかのバージョン管理システムに対応しています。 [http://projects.edgewall.com/trac/wiki/PluginList PluginList] と[http://projects.edgewall.com/trac/wiki/VersioningSystemBackend VersioningSystemBackend] を参照して下さい。50 ==== Version Control System ==== 51 * [http://subversion.tigris.org/ Subversion], version >= 1.0. (either 1.2.3 or >= 1.3.1 recommended) and corresponding [http://svnbook.red-bean.com/svnbook-1.1/ch08s02.html#svn-ch-8-sect-2.3 Python bindings]. For troubleshooting, check [http://projects.edgewall.com/trac/wiki/TracSubversion TracSubversion] 52 * Trac uses the [http://www.swig.org/ SWIG] bindings included in the Subversion distribution, '''not''' [http://pysvn.tigris.org/ PySVN] (which is sometimes confused with the standard SWIG bindings). 53 * If Subversion was already installed without the SWIG bindings, you'll need to re-`configure` Subversion and `make swig-py`, `make install-swig-py`. 54 * Support for other version control systems is provided via third-parties. See [http://projects.edgewall.com/trac/wiki/PluginList PluginList] and [http://projects.edgewall.com/trac/wiki/VersioningSystemBackend VersioningSystemBackend]. 55 55 56 ==== Web サーバ====57 * CGI を利用可能な Web サーバ (see TracCgi) または58 * [http://www.fastcgi.com/ FastCGI] を利用可能な Web サーバ(see TracFastCgi) または59 * [http://httpd.apache.org/ Apache] と[http://www.modpython.org/ mod_python 3.1.3+] (see TracModPython)60 * mod_python の開発バージョンをインストールするとき、 Python と Apache が必要です。 (実際のライブラリとヘッダファイル)56 ==== Web Server ==== 57 * A CGI-capable web server (see TracCgi), or 58 * a [http://www.fastcgi.com/ FastCGI]-capable web server (see TracFastCgi), or 59 * [http://httpd.apache.org/ Apache] with [http://www.modpython.org/ mod_python 3.1.3+] (see TracModPython) 60 * When installing mod_python the development versions of Python and Apache are required (actually the libraries and header files) 61 61 62 Apache 1.3 で実行するには、 Trac 0.8.4 と[http://www.modpython.org/ mod_python 2.7] を使用することで可能となります。([http://trac.edgewall.org/wiki/TracModPython2.7 TracModPython2.7] 参照) Trac 0.9 ではテストしていないので、動くかどうかは分かりません。 62 For those stuck with Apache 1.3, it is also possible to get Trac 0.8.4 working with [http://www.modpython.org/ mod_python 2.7] (see [wiki:TracModPython2.7 TracModPython2.7]). This hasn't been tested with Trac 0.9, so it may or may not work. 63 63 64 ==== その他の Python のユーティリティ====65 * プラグインを使用する場合 [http://peak.telecommunity.com/DevCenter/setuptools setuptools], バージョン 0.6 以上。(see TracPlugins)66 * WikiRestructuredText を使用する場合 [http://docutils.sourceforge.net/ docutils], バージョン 0.3.9 以上67 * [ wiki:TracSyntaxColoring シンタックス ハイライト] を使用する場合 [http://silvercity.sourceforge.net/ SilverCity] または [http://www.gnu.org/software/enscript/enscript.html Enscript] もしくは両方。68 * !SilverCity 0.9.6 には [http://sourceforge.net/tracker/index.php?func=detail&aid=1424436&group_id=45693&atid=443739 バグ] があり、 Trac で Python のシンタックスハイライトを壊してしまいます。更新バージョンが利用可能になるまで、バージョン 0.9.5 を使用することを推奨します。64 ==== Other Python Utilities ==== 65 * [http://peak.telecommunity.com/DevCenter/setuptools setuptools], version >= 0.6 for using plugins (see TracPlugins) 66 * [http://docutils.sourceforge.net/ docutils], version >= 0.3.9 for WikiRestructuredText. 67 * [http://silvercity.sourceforge.net/ SilverCity] and/or [http://www.gnu.org/software/enscript/enscript.html Enscript] for [wiki:TracSyntaxColoring syntax highlighting]. 68 * Note that !SilverCity 0.9.6 has a [http://sourceforge.net/tracker/index.php?func=detail&aid=1424436&group_id=45693&atid=443739 bug] that breaks Python syntax highlighting in Trac. Until an update is made available, we recommend using version 0.9.5. 69 69 70 '' 注意''': これらのソフトウェアの依存するパッケージに利用可能なバージョンがいろいろありますが、かならずしも互換性あるとは限りません。上記のバージョン番号に注意してください。もし Trac が動かないようだったら、すべての依存関係をもう一度確認してください。確認したうえで、 [http://trac.edgewall.org/wiki/MailingList メーリングリスト] や [http://trac.edgewall.org/wiki/IrcChannel IRCチャンネル] をたずねてみてください。70 '''Attention''': The various available versions of these dependencies are not necessarily interchangable, so please pay attention to the version numbers above. If you are having trouble getting Trac to work please double-check all the dependencies before asking for help on the [http://projects.edgewall.com/trac/wiki/MailingList MailingList] or [http://projects.edgewall.com/trac/wiki/IrcChannel IrcChannel]. 71 71 72 これらのパッケージの最もよいインストール方法を理解するためにパッケージ付属のドキュメントを読んでください。加えて、 [http://trac.edgewall.org/wiki/TracInstallPlatforms プラットフォーム特有の説明] にも、インストール時の依存関係が記述されています。ただしそれもインストールしようとしている Trac のバージョンより古いバージョンにおける情報かもしれないということを覚えておいて下さい。(特に、 73 いくつかのページは Trac 0.8 の説明になっています。) 72 Please refer to the documentation of these packages to find out how they are best installed. In addition, most of the [http://projects.edgewall.com/trac/wiki/TracInstallPlatforms platform-specific instructions] also describe the installation of the dependencies. Keep in mind however that the information there might concern older versions of Trac than the one you're installing (in particular, 73 there are still some pages that are about Trac 0.8). 74 74 75 == Trac のインストール==75 == Installing Trac == 76 76 77 多くの Python プログラムと同様、ソースディレクトリの一番上で次のコマンドを実行することで、 Trac の Python パッケージをインストールできます:77 Like most Python programs, the Trac Python package is installed by running the following command at the top of the source directory: 78 78 {{{ 79 79 $ python ./setup.py install 80 80 }}} 81 81 82 ''Note: このステップをおこなうには root 権限、またはそれと同等の権限が必要です。''82 ''Note: you'll need root permissions or equivalent for this step.'' 83 83 84 この手順は、 Python ソースコードをバイトコンパイルして、 Python の `site-packages` ディレクトリにインストールします。 85 また、ディレクトリ `cgi-bin`, `template`, `htdocs`, `wiki-default`, `wiki-macros` 配下のすべてのファイルを `$prefix/share/trac/` ディレクトリにコピーします。 `conf` と `plugins` ディレクトリは `$prefix/share/trac` 配下に新規に作成されます (''[http://trac.edgewall.org/milestone/0.10 milestone:0.10] 以降'')。 84 This will byte-compile the python source code and install it in the `site-packages` directory 85 of your Python installation. The directories `cgi-bin`, `templates`, `htdocs`, `wiki-default` and `wiki-macros` are all copied to `$prefix/share/trac/`. `conf` and `plugins` stub directories are also created under `$prefix/share/trac/` (''since [milestone:0.10]''). 86 86 87 さらに、このスクリプトでは [wiki:TracEnvironment Trac environment] を作成したりメンテナンスするためのコマンドラインツールである [wiki:TracAdmin trac-admin] や、スタンドアロンで動作するサーバ [wiki:TracStandalone tracd] をインストールします。 87 The script will also install the [wiki:TracAdmin trac-admin] command-line tool, used to create and maintain [wiki:TracEnvironment project environments], as well as the [wiki:TracStandalone tracd] standalone server. 88 88 89 === 上級オプション===89 === Advanced Options === 90 90 91 T rac を上記以外の場所にインストールしたい場合や、その他の高度なインストールオプションを見たい場合は次のコマンドを実行してください:91 To install Trac to a custom location, or find out about other advanced installation options, run: 92 92 {{{ 93 93 $ python ./setup.py install --help 94 94 }}} 95 95 96 詳細は [http://docs.python.org/inst/inst.html Installing Python Modules] を参照。 96 Also see [http://docs.python.org/inst/inst.html Installing Python Modules] for detailed information. 97 97 98 単純にインストールする場所を変えたいのであれば、以下の通りです:98 Specifically, you might be interested in: 99 99 {{{ 100 100 $ python ./setup.py install --prefix=/path/to/installdir 101 101 }}} 102 102 103 == プロジェクト環境の作成==103 == Creating a Project Environment == 104 104 105 [wiki:TracEnvironment Trac environment] は Trac が Wiki ページ、チケット、レポート、設定などのような情報を保存するバックエンドストレージです。 [wiki:TracEnvironment Trac environment] は基本的に、人間が読むことができる設定ファイル、その他いろいろなファイルとディレクトリを含んだディレクトリです。 105 A [wiki:TracEnvironment Trac environment] is the backend storage where Trac stores information like wiki pages, tickets, reports, settings, etc. An environment is basically a directory that contains a human-readable configuration file and various other files and directories. 106 106 107 [wiki:TracAdmin trac-admin] を使用して、新しい Trac environment を作成します。:107 A new environment is created using [wiki:TracAdmin trac-admin]: 108 108 {{{ 109 109 $ trac-admin /path/to/myproject initenv 110 110 }}} 111 111 112 [wiki:TracAdmin trac-admin] がプロジェクト環境を作成するのに必要な情報を聞いてきます。たとえば、プロジェクトの名前や、[wiki:TracEnvironment#SourceCodeRepository ソースコードリポジトリ] の種類とパス、 [wiki:TracEnvironment#データベースに接続するための文字列 データベースに接続するための文字列] などです。もしこれらのオプションで設定を何にすればいいのか分からなければ、デフォルト値を使用するために空白にしておいてください。特にデータベースに接続するための文字列は SQLite をインストールしている限り、動くでしょう。ソースコードリポジトリへのパスを空白にしておくとバージョン管理に関する機能が無効になりますが、システムが動いてさえいれば、後からいつでも追加することができます。112 [wiki:TracAdmin trac-admin] will prompt you for the information it needs to create the environment, such as the name of the project, the type and the path to an existing [wiki:TracEnvironment#SourceCodeRepository source code repository], the [wiki:TracEnvironment#DatabaseConnectionStrings database connection string], and so on. If you're not sure what to specify for one of these options, just leave it blank to use the default value. The database connection string in particular will always work as long as you have SQLite installed. Leaving the path to the source code repository empty will disable any functionality related to version control, but you can always add that back when the basic system is running. 113 113 114 また、ここで指定した値は後で [wiki:TracIni 設定ファイル] を編集することによって変更できます。 114 Also note that the values you specify here can be changed later by directly editing the [wiki:TracIni] configuration file. 115 115 116 ''Note: Web サーバの起動ユーザには、この environment ディレクトリ、117 およびその配下のすべてのファイルに対する書き込みパーミッションが必要です。''116 ''Note: The user account under which the web server runs will require write permissions to the environment 117 directory and all the files inside.'' 118 118 119 119 120 == スタンドアロンサーバを起動する==120 == Running the Standalone Server == 121 121 122 Trac environment を作成した後, スタンドアロンサーバの [wiki:TracStandalone tracd] を起動することによって簡単に Web インタフェースを使ってみることができます。 122 After having created a Trac environment, you can easily try the web interface by running the standalone server [wiki:TracStandalone tracd]: 123 123 {{{ 124 124 $ tracd --port 8000 /path/to/myproject 125 125 }}} 126 126 127 そして、ブラウザを起動して、 `http://localhost:8000/` にアクセスしてみてください。 tracd が認識しているすべての環境が簡単にリストされます。作成した環境へのリンクをクリックし、実際の Trac を見るべきです。 127 Then, fire up a browser and visit `http://localhost:8000/`. You should get a simple listing of all environments that tracd knows about. Follow the link to the environment you just created, and you should see Trac in action. 128 128 129 129 130 == Web サーバで Trac を起動する==130 == Running Trac on a Web Server == 131 131 132 Trac は“"本当の" Web サーバに接続するための 3 つのオプションを提供しています: [wiki:TracCgi CGI], [wiki:TracFastCgi FastCGI] と [wiki:TracModPython mod_python] です。まともなパフォーマンスを引き出すために、 FastCGI か mod_python を使用することをおすすめします。132 Trac provides three options for connecting to a “real” web server: [wiki:TracCgi CGI], [wiki:TracFastCgi FastCGI] and [wiki:TracModPython mod_python]. For decent performance, it is recommended that you use either FastCGI or mod_python. 133 133 134 == 認証の設定==134 == Configuring Authentication == 135 135 136 ユーザアカウントの追加・削除・設定はどのような方法で Trac を動かしているかによります。基本的な手順は TracCgi ページの [wiki:TracCgi#認証を追加する 認証を追加する] セクションに書かれています。使用しているフロントエンドでの認証の設定方法を学ぶには、以下のページのどれかを参照してください:136 The process of adding, removing, and configuring user accounts for authentication depends on the specific way you run Trac. The basic procedure is described in the [wiki:TracCgi#AddingAuthentication "Adding Authentication"] section on the TracCgi page. To learn how to setup authentication for the frontend you're using, please refer to one of the following pages: 137 137 138 * TracStandalone スタンドアロンサーバ `tracd` を使用している場合139 * TracCgi CGI または FastCGI を使用している場合140 * TracModPython mod_python を使用している場合138 * TracStandalone if you use the standalone server, `tracd`. 139 * TracCgi if you use the CGI or FastCGI methods. 140 * TracModPython if you use the mod_python method. 141 141 142 == Trac を使う==142 == Using Trac == 143 143 144 一度、 Trac のサイトを構築して起動したら、 Subversion のリポジトリをブラウズしたり、チケットを登録したり、タイムラインを見たりすることができます。 144 Once you have your Trac site up and running, you should be able to browse your subversion repository, create tickets, view the timeline, etc. 145 145 146 デフォルトの設定では、 anonymous ユーザ (ログインしていないユーザ) でも大半の機能を使用できますが、全てではありません。認証を設定し、認証済みのユーザがすべての機能を利用できるように [wiki:TracPermissions 権限] を追加するのを忘れないで下さい。 146 Keep in mind that anonymous (not logged in) users can by default access most but not all of the features. You will need to configure authentication and grant additional [wiki:TracPermissions permissions] to authenticated users to see the full set of features. 147 147 148 '' それでは楽しんで!''148 '' Enjoy! '' 149 149 150 [http:// trac.edgewall.org/wiki/TracTeam The Trac Team]150 [http://projects.edgewall.com/trac/wiki/TracTeam The Trac Team] 151 151 152 152 ----