XPressME Integration Kit

Trac

Version 1 から Version 2 における更新: TracEnvironment

差分発生行の前後
Ignore:
Timestamp:
Nov 29, 2010, 3:25:29 PM (13 years 前)
Author:
trac (IP: 127.0.0.1)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TracEnvironment

    v1 v2  
    1 = Trac Environment = #TracEnvironment 
     1= The Trac Environment = 
    22 
    3 Trac はプロジェクトのデータを保存するために、ディレクトリ構造とデータベースを使用します。このディレクトリを "Environment" と呼びます。 
     3Trac uses a directory structure and a database for storing project data. The directory is referred to as the “environment”. 
    44 
    5 == Environment の作成 == #CreatinganEnvironment 
     5== Creating an Environment == 
    66 
    7 新しい Trac Environment を作成するには、 [wiki:TracAdmin trac-admin] コマンドを使用します: 
     7A new Trac environment is created using  [TracAdmin#initenv trac-admin's initenv]: 
    88{{{ 
    99$ trac-admin /path/to/myproject initenv 
    1010}}} 
    1111 
    12 [wiki:TracAdmin trac-admin] はプロジェクトの名前、 
    13 データベースに接続するための文字列 (後で説明します) 、 
    14 ソースコードリポジトリの種類とパスを尋ねてきます。 
     12`trac-admin` will ask you for the name of the project and the 
     13database connection string (explained below). 
    1514 
    16 ''Note: Environment のディレクトリ配下は、 Web サーバの実行ユーザに書き込みパーミッションを 
    17 与える必要があります。適切なパーミッションの付与を忘れないようにしてください。 
    18 同じことが Subversion リポジトリにも当てはまります。 
    19 ただし、 Subversion リポジトリに Barkley DB のファイルシステムを使用していない場合は、 
    20 Trac は読み取りパーミッションしか必要としません。また、プロジェクト名に空白文字が混じっていると認証で問題が生じることがありますので注意してください  (See [http://trac.edgewall.org/ticket/7163 #7163])。'' 
     15=== Some Useful Tips 
     16 - The user under which the web server runs will require file system write permission to  
     17 the environment directory and all the files inside. Please remember to set 
     18 the appropriate permissions. The same applies to the source code repository,  
     19 although the user under which Trac runs will only require write access to a Subversion repository created with the BDB file system; for other repository types, check the corresponding plugin's documentation.  
     20  
     21 - `initenv` when using svn repository does not imply that trac-admin will perform `svnadmin create` for the specified repository path. You need to perform the `svnadmin create` prior to `trac-admin initenv` if you're creating a new svn repository altogether with a new trac environment, otherwise you will see a message "Warning: couldn't index the repository" when initializing the environment. 
    2122 
    22 == データベースに接続するための文字列 == #DatabaseConnectionStrings 
     23 - Non-ascii environment paths are not supported 
     24  
     25 - Also, it seems that project names with spaces can be problematic for authentication (see [trac:#7163]). 
    2326 
    24 バージョン 0.9 以降、 Trac は [http://sqlite.org/ SQLite] と 
    25 [http://www.postgresql.org/ PostgreSQL] データベースバックエンドの両方をサポートします。 
    26 [http://mysql.com/ MySQL] のサポートは 0.10 で加えられました。 デフォルトでは 
    27 SQLiLte を使用します。 (ほとんどのプロジェクトは SQLite で十分です)。データベース 
    28 ファイルは Environment ディレクトリに保存されますので、 Environment の残りと共に容易に 
    29 [wiki:TracBackup バックアップ] することができます。 
     27 - TracPlugins located in a [TracIni#inherit-section shared plugins folder] that is defined in an [TracIni#GlobalConfiguration inherited configuration] are currently not loaded during creation, and hence, if they need to create extra tables for example, you'll need to [TracUpgrade#UpgradetheTracEnvironment upgrade the environment] before being able to use it. 
    3028 
    31 === SQLite の接続文字列 === #EmbeddedSQLiteConnectionString 
    32 SQLite データベースに接続するための文字列は以下の通りです: 
     29== Database Connection Strings == 
     30 
     31Since version 0.9, Trac supports both [http://sqlite.org/ SQLite] and 
     32[http://www.postgresql.org/ PostgreSQL] database backends.  Preliminary 
     33support for [http://mysql.com/ MySQL] was added in 0.10.  The default is 
     34to use SQLite, which is probably sufficient for most projects. The database 
     35file is then stored in the environment directory, and can easily be  
     36[wiki:TracBackup backed up] together with the rest of the environment. 
     37 
     38=== SQLite Connection String === 
     39The connection string for an SQLite database is: 
    3340{{{ 
    3441sqlite:db/trac.db 
    3542}}} 
     43where `db/trac.db` is the path to the database file within the Trac environment. 
    3644 
    37 === PostgreSQL の接続文字列 === #PostgreSQLConnectionString 
    38 PostgreSQL や MySQL を代わりに使用する場合、異なる接続用文字列を 
    39 使用しなければなりません。 例えば PostgreSQL に接続するとき、 
    40 ユーザ名 `johndoe` でパスワード `letmein` で 
    41 同じマシンの `trac` と呼ばれるデータベースに接続するには以下のように指定します: 
     45=== PostgreSQL Connection String === 
     46If you want to use PostgreSQL or MySQL instead, you'll have to use a 
     47different connection string. For example, to connect to a PostgreSQL 
     48database on the same machine called `trac`, that allows access to the 
     49user `johndoe` with the password `letmein`, use: 
    4250{{{ 
    4351postgres://johndoe:letmein@localhost/trac 
    4452}}} 
    45 ''"/" 及び "@" はパスワードの一部として使用出来ないので注意してください'' 
     53''Note that due to the way the above string is parsed, the "/" and "@" characters cannot be part of the password.'' 
    4654 
    47 PostgreSQL がデフォルト以外のポート番号 (例えば、 9432) で起動しているときはこのようにします: 
     55If PostgreSQL is running on a non-standard port (for example 9342), use: 
    4856{{{ 
    4957postgres://johndoe:letmein@localhost:9342/trac 
    5058}}} 
    5159 
    52 UNIX ホストでは、 UNIX ソケットで接続するように設定できます。 
    53 この場合、環境変数 PGHOST に定義されたデフォルトソケットを使用します: 
     60On UNIX, you might want to select a UNIX socket for the transport, 
     61either the default socket as defined by the PGHOST environment variable: 
    5462{{{ 
    5563postgres://user:password@/database 
    5664}}} 
    57 ソケットを特定する場合はこうです: 
     65or a specific one: 
    5866{{{ 
    5967postgres://user:password@/database?host=/path/to/socket/dir 
    6068}}} 
    6169 
    62 PostgreSQL を使用するとき、 `trac-admin initenv` を実行する前に 
    63 データベースを作成しなければいけません。 
     70Note that with PostgreSQL you will have to create the database before running 
     71`trac-admin initenv`. 
    6472 
    65 [http://postgresql.org PostgreSQL] の詳細設定の方法については [http://www.postgresql.org/docs/ PostgreSQL ドキュメント] を参照してください。 
    66 下記は `tracuser` という名のデータベースユーザ及び `trac` という名のデータベースを作成します。 
     73See the [http://www.postgresql.org/docs/ PostgreSQL documentation] for detailed instructions on how to administer [http://postgresql.org PostgreSQL]. 
     74Generally, the following is sufficient to create a database user named `tracuser`, and a database named `trac`. 
    6775{{{ 
    6876createuser -U postgres -E -P tracuser 
    6977createdb -U postgres -O tracuser -E UTF8 trac 
    7078}}} 
    71 `createuser` を実行する時、'tracuser' のパスワードの入力を促されます。この新しいユーザはスーパーユーザではないので、他のデータベースを作ったり、他の role (訳注: PostgreSQL でのユーザ) を作る権限を与えられていません。これらの権限は trac のインスタンスを実行する為には必要ではありません。ユーザにパスワードを付与したくない場合、 `createuser` コマンドから `-P` と `-E` オプションを取り除いてください。また、データベースが UTF8 で作成する必要があることに注意してください。 LATIN1 のエンコードが原因のエラーを引き起こします。 SQL_ASCII でも同様です。 
     79When running `createuser` you will be prompted for the password for the user 'tracuser'. This new user will not be a superuser, will not be allowed to create other databases and will not be allowed to create other roles. These privileges are not needed to run a trac instance. If no password is desired for the user, simply remove the `-P` and `-E` options from the `createuser` command.  Also note that the database should be created as UTF8. LATIN1 encoding causes errors trac's use of unicode in trac.  SQL_ASCII also seems to work. 
    7280 
    73 デフォルト設定 (debian) の下では、 `postgres` ユーザとして `createuser` と `createdb` スクリプトを実行してください。 例えば: 
     81Under some default configurations (debian) one will have run the `createuser` and `createdb` scripts as the `postgres` user.  For example: 
    7482{{{ 
    7583sudo su - postgres -c 'createuser -U postgres -S -D -R -E -P tracuser' 
     
    7785}}} 
    7886 
    79 Trac はデフォルトで `public` スキーマを使用しますが、明示的に違うスキーマを指定することができます: 
     87Trac uses the `public` schema by default but you can specify a different schema in the connection string: 
    8088{{{ 
    8189postgres://user:pass@server/database?schema=yourschemaname 
    8290}}} 
    8391 
    84 === MySQL の接続文字列 === #MySQLConnectionString 
     92=== MySQL Connection String === 
    8593 
    86 MySQL を代わりに使用したい場合、違う接続文字列を使用します。 
    87 例えば、同じマシンにある `trac` という MySQL データベースに、 
    88 `johndoe` というユーザでパスワード `letmein` で接続する場合の 
    89 MySQL の接続文字列は次の通りです: 
     94If you want to use MySQL instead, you'll have to use a 
     95different connection string. For example, to connect to a MySQL 
     96database on the same machine called `trac`, that allows access to the 
     97user `johndoe` with the password `letmein`, the mysql connection string is: 
    9098{{{ 
    9199mysql://johndoe:letmein@localhost:3306/trac 
    92100}}} 
    93101 
    94 == ソースコードリポジトリ == #SourceCodeRepository 
     102== Source Code Repository == 
    95103 
    96 最初にリポジトリの ''type'' を指定し (例: Subversion ならば `svn` 、 
    97 これがデフォルトです)、その後、リポジトリの ''path'' を指定します。 
     104Since version 0.12, a single Trac environment can be connected to more than one repository. There are many different ways to connect repositories to an environment, see TracRepositoryAdmin. This page also details the various attributes that can be set for a repository (like `type`, `url`, `description`). 
    98105 
    99 リポジトリなしで、 Trac を使用したいときは、単に ''path'' 部分に何も入力しないままにして下さい。  
    100 (その場合 ''type'' の情報は影響しません) 
     106In Trac 0.12 `trac-admin` no longer asks questions related to repositories. Therefore, by default Trac is not connected to any source code repository, and the ''Browse Source'' toolbar item will not be displayed. 
     107You can also explicitly disable the `trac.versioncontrol.*` components (which are otherwise still loaded) 
     108{{{ 
     109[components] 
     110trac.versioncontrol.* = disabled 
     111}}} 
    101112 
    102 バージョン管理システムによっては、リポジトリへのパスだけではなく、リポジトリ内の ''scope'' を設定 
    103 することもできます。 Trac はそのスコープ以下に限定したファイルとチェンジセット 
    104 に関連する情報を表示します。 Trac のバックエンドに Subversion を 使う場合は、 
    105 この機能を利用できます; 他のリポジトリシステムについては、対応するプラグインのドキュメントで確認して下さい。 
     113For some version control systems, it is possible to specify not only the path to the repository, 
     114but also a ''scope'' within the repository. Trac will then only show information 
     115related to the files and changesets below that scope. The Subversion backend for 
     116Trac supports this; for other types, check the corresponding plugin's documentation. 
    106117 
    107 Subversion リポジトリの設定の一例です: 
     118Example of a configuration for a Subversion repository used as the default repository: 
    108119{{{ 
    109120[trac] 
     
    112123}}} 
    113124 
    114 スコープを絞った Subversion リポジトリの設定の一例です: 
     125The configuration for a scoped Subversion repository would be: 
    115126{{{ 
    116127[trac] 
     
    119130}}} 
    120131 
    121 == ディレクトリ構造 == #DirectoryStructure 
     132== Directory Structure == 
    122133 
    123 プロジェクト Environment のディレクトリは通常、以下に示すファイルとディレクトリから成り立ちます。 
     134An environment directory will usually consist of the following files and directories: 
    124135 
    125  * `README` - Environment について記述したドキュメント。 
    126  * `VERSION` - Environment のバージョン識別情報。 
    127  * `attachments` - 全ての添付ファイルはここに保存されます。 
     136 * `README` - Brief description of the environment. 
     137 * `VERSION` - Contains the environment version identifier. 
     138 * `attachments` - Attachments to wiki pages and tickets are stored here. 
    128139 * `conf` 
    129    * `trac.ini` - メインとなる設定ファイル。詳細は TracIni に記述しています。 
     140   * `trac.ini` - Main configuration file. See TracIni. 
    130141 * `db` 
    131    * `trac.db` - SQLite データベース (SQLite を使用している場合) 
    132  * `htdocs` - Web のリソースを格納するディレクトリ。 Genshi テンプレートから参照する。 '''''(0.11 の場合)''''' 
    133  * `log` - ログファイルのデフォルトディレクトリ。ログ機能が有効に設定され相対パスが与えられた場合に使用する。 
    134  * `plugins` - Environment に固有の [wiki:TracPlugins プラグイン] (Python eggs, [http://trac.edgewall.org/milestone/0.10 0.10] 以降) 
    135  * `templates` - カスタム (プロジェクトに固有の) !ClearSilver テンプレート '''''(0.10 の場合)''''' 
    136    * `site_css.cs` - カスタム CSS スタイルシート 
    137    * `site_footer.cs` - カスタムフッタ 
    138    * `site_header.cs` - カスタムヘッダ 
    139  * `templates` - カスタム (プロジェクトに固有の) Genshi テンプレート '''''(0.11 の場合)''''' 
    140    * `site.html` - カスタムヘッダ, フッタ, スタイルシート。 TracInterfaceCustomization#SiteAppearance に記載 
    141  * `wiki-macros` - Environment に固有の [WikiMacros Wiki マクロ] '''''(0.10 の場合)''''' 
     142   * `trac.db` - The SQLite database (if you're using SQLite). 
     143 * `htdocs` - directory containing web resources, which can be referenced in Genshi templates. '''''(since 0.11)''''' 
     144 * `log` - default directory for log files, if logging is turned on and a relative path is given. 
     145 * `plugins` - Environment-specific [wiki:TracPlugins plugins] (Python eggs or single file plugins, since [trac:milestone:0.10 0.10]) 
     146 * `templates` - Custom Genshi environment-specific templates. '''''(since 0.11)''''' 
     147   * `site.html` - method to customize header, footer, and style, described in TracInterfaceCustomization#SiteAppearance 
    142148 
    143   '''Note: Trac Environment のディレクトリとソースコードリポジトリのディレクトリを一緒にしないで下さい。 
    144 上記のディレクトリ構造は Subversion リポジトリのディレクトリ構造をざっくりと真似ているだけですが、 
    145 2つは同じ場所においては ''いけません'' 。''' 
     149'''Caveat:''' ''don't confuse a Trac environment directory with the source code repository directory.''  
     150 
     151This is a common beginners' mistake. 
     152It happens that the structure for a Trac environment is loosely modelled after the Subversion repository directory  
     153structure, but those are two disjoint entities and they are not and ''must not'' be located at the same place. 
    146154 
    147155---- 
    148156See also: TracAdmin, TracBackup, TracIni, TracGuide 
     157