Changes between Version 2 and Version 3 of TracInstall
- Timestamp:
- Dec 31, 2005, 4:43:10 PM (18 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TracInstall
v2 v3 1 = Trac インストールガイド =1 = Trac Installation Guide = 2 2 [[TracGuideToc]] 3 3 4 Webベースのプロジェクト管理ツールTracはサーバサイドのCGIもしくはスタンドアローンのプログラムとして実装されています。Tracは[http://www.python.org/ Python] で記述されており、 5 組み込みデータベースとして[http://www.sqlite.org/ SQLite] を使用します。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 can use [http://sqlite.org/ SQLite] or [http://www.postgresql.org/ PostgreSQL] as database. For HTML rendering, Trac uses the [http://www.clearsilver.net/ Clearsilver] templating system. 6 5 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], version 2.1以上 (2.3以上 推奨). 13 * RPMベースのシステムではpython-devel とpython-xml パッケージも必要になります。 14 * [http://subversion.tigris.org/ Subversion], version 1.0以上 (1.1以上 推奨) 15 * [http://svnbook.red-bean.com/svnbook-1.1/ch08s02.html#svn-ch-8-sect-2.3 Subversion Python bindings] (警告: Tracは [http://pysvn.tigris.org/ PySVN] パッケージ '''ではなく''' Subversion distributionに含まれる[http://www.swig.org/ SWIG] bindingsを使用します!) 16 * [http://www.sqlite.org/ SQLite], version 2.8.x または 3.0.x 17 * [http://pysqlite.sf.net/ PySQLite], version 0.5以上1.1.0未満 (SQLite 2.8.xの場合), version 1.1.1以上 (SQLite 3.0.xの場合) 18 * [http://clearsilver.net/ Clearsilver], version 0.9.3 以上 19 * [http://docutils.sourceforge.net/ docutils], version 0.3.3以上 (??) 20 * CGI が動作するWebサーバ(検証環境は[http://httpd.apache.org/ Apache] ) 12 * [http://www.python.org/ Python], version >= 2.3. 13 * Python 2.4 is not supported on Windows since there are no Subversion bindings available for it. 14 * For RPM-based systems you might also need the `python-devel` and `python-xml` packages. 15 * [http://subversion.tigris.org/ Subversion], version >= 1.0. (>= 1.1 recommended) and corresponding [http://svnbook.red-bean.com/svnbook-1.1/ch08s02.html#svn-ch-8-sect-2.3 Python bindings] 16 * 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). 17 * If Subversion was already installed without the SWIG bindings, you'll need to re-`configure` Subversion and `make swig-py`, `make install-swig-py`. 18 * [http://www.clearsilver.net/ ClearSilver], version >= 0.9.3 19 * With python-bindings (`./configure --with-python=/usr/bin/python`) 21 20 22 === オプショナル パッケージ===21 === For SQLite === 23 22 24 * [http://www.modpython.org/ mod_python] (TracModPython 参照) 23 * [http://www.sqlite.org/ SQLite], version 2.8.x or 3.x 24 * [http://pysqlite.org/ PySQLite] 25 * version 1.0.x (for SQLite 2.8.x) 26 * version 1.1.x or 2.x (for SQLite 3.x) 25 27 26 == Tracのインストール == 27 多くのPythonプログラムと同様、ソースディレクトリの一番上で次のコマンドを実行してTracのpythonモジュールをインストールしてください: 28 === For PostgreSQL === 29 30 * [http://www.postgresql.org/ PostgreSQL] 31 * [http://initd.org/projects/psycopg1 psycopg1], [http://initd.org/projects/psycopg2 psycopg2], or [http://pypgsql.sourceforge.net/ pyPgSQL] 32 33 === Optional Requirements === 34 35 * A CGI-capable web server (see TracCgi), or 36 * a [http://www.fastcgi.com/ FastCGI]-capable web server (see TracFastCgi), or 37 * [http://httpd.apache.org/ Apache] with [http://www.modpython.org/ mod_python 3.1.3+] (see TracModPython) 38 * [http://peak.telecommunity.com/DevCenter/setuptools setuptools], version >= 0.5a13 for using plugins (see TracPlugins) 39 * [http://docutils.sourceforge.net/ docutils], version >= 0.3.3 for WikiRestructuredText. 40 * [http://silvercity.sourceforge.net/ SilverCity] and/or [http://www.gnu.org/software/enscript/enscript.html Enscript] for [wiki:TracSyntaxColoring syntax highlighting]. 41 42 '''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]. 43 44 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. 45 46 == Installing Trac == 47 48 Like most Python programs, the Trac Python package is installed by running the following command at the top of the source directory: 28 49 {{{ 29 50 $ python ./setup.py install 30 51 }}} 31 52 32 この手順は、Pythonソースコードをバイトコンパイルして、Pythonの {{{site-packages}}} ディレクトリにインストールします。 33 また、ディレクトリ {{{cgi-bin}}} , {{{template}}} , {{{htdocs}}} , {{{wiki-default}}} は、$prefix/share/trac/ディレクトリにすべてコピーされます。 53 ''Note: you'll need root permissions or equivalent for this step.'' 34 54 35 さらに、このスクリプトではコマンドラインツールの[wiki:TracAdmin trac-admin] をインストールします。 55 This will byte-compile the python source code and install it in the `site-packages` directory 56 of your Python installation. The directories `cgi-bin`, `templates`, `htdocs`, `wiki-default` and `wiki-macros` are all copied to `$prefix/share/trac/.` 36 57 37 [wiki:TracAdmin trac-admin] ツールは [wiki:TracEnvironment プロジェクト環境]の生成やメンテナンスに使用する、Tracの''中枢''コマンドです。 58 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. 38 59 39 '''Note:''' この操作にはrootもしくは同等の権限が必要です。 60 === Advanced Users === 40 61 41 特定のプラットホームへのTracのインストールについての詳細は、[http://projects.edgewall.com/trac/wiki/TracInstallPlatforms TracInstallPlatforms] ページ(main project ウェブサイトの)を参照してください。 42 43 === 上級ユーザ === 44 Tracを上記以外の場所にインストールしたい場合や、その他の高度なインストールオプションを見たい場合は次のコマンドを実行してください: 62 To install Trac to a custom location, or find out about other advanced installation options, run: 45 63 {{{ 46 64 $ python ./setup.py --help 47 65 }}} 48 66 49 == プロジェクト環境の作成 == 50 51 Trac EnvironmentはTracがwikiページ、チケット、レポート、設定などのような 52 情報を保存するバックエンドストレージフォーマットです。 53 Trac EnvironmentはSQLiteデータベース、人間が読むことができるconfigurationファイル、 54 ログファイルおよび添付ファイルを含むディレクトリで構成されます。 55 56 [wiki:TracAdmin trac-admin]を使用して、新しいTrac environmentを作成します。: 57 67 Specifically, you might be interested in: 58 68 {{{ 59 $ trac-admin /path/to/projectenv initenv69 $ python ./setup.py install --prefix=/path/you/want 60 70 }}} 61 71 62 [wiki:TracAdmin trac-admin] は、Subversionリポジトリがどこに位置しているか、Tracのテンプレート63 ディレクトリがどこにあるのかを、あなたに確認します。(通常のインストールの場合はデフォルト値にしておくのがよいでしょう。)64 72 65 '''Note:''' Webサーバの起動ユーザには、このenvironmentディレクトリ、およびその配下のすべてのファイルに対する 66 書き込みパーミッションが必要です。 '''適当なパーミッションを設定しておくのを忘れないようにしてください。 ''' 73 == Creating a Project Environment == 67 74 68 Subversion リポジトリのファイルについても ([http://svn.collab.net/repos/svn/trunk/notes/fsfs FSFS Subversion バックエンド]を使用している場合を除き、) 適切なパーミッションを付与することが必要です。 75 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. 69 76 70 == Apacheの設定 == 77 A new environment is created using [wiki:TracAdmin trac-admin]: 78 {{{ 79 $ trac-admin /path/to/trac_project_env initenv 80 }}} 71 81 72 "{{{trac/cgi-bin/trac.cgi}}}" をWebサーバの{{{/cgi-bin/}}}ディレクトリにコピー(またはシンボリックリンク)してアクセスできるようにしてください。または、"{{{trac/cgi-bin/}}}"ディレクトリを直接使用するようApacheを設定してください。(どちらでも好きな方法で構いません。) 82 [wiki:TracAdmin trac-admin] will prompt you for the information it needs to create the environment, such as the name of the project, the path to an existing subversion 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. The only option where the default value is likely to not work is the path to the Subversion repository, so make sure that one's correct. 73 83 74 最後にApacheの設定を編集し、以下に示すような設定を追加してください。(ファイル名などはインストールにあわせて変更してください。) 84 Also note that the values you specify here can be changed later by directly editing the [wiki:TracIni] configuration file. 75 85 76 {{{ 77 Alias /trac/ "/usr/share/trac/htdocs/" #or where you installed the trac htdocs 78 #You have to allow people to read the files in htdocs 79 <Directory "/usr/share/trac/htdocs"> 80 Options Indexes MultiViews 81 AllowOverride None 82 Order allow,deny 83 Allow from all 84 </Directory> 86 ''Note: The user account under which the web server runs will require write permissions to the environment 87 directory and all the files inside.'' 85 88 86 89 87 # Trac need to know where the database is located 88 <Location "/cgi-bin/trac.cgi"> 89 SetEnv TRAC_ENV "/path/to/projectenv" 90 </Location> 90 == Running the Standalone Server == 91 91 92 # You need this to allow users to authenticate 93 # trac.htpasswd can be created with 94 # cmd 'htpasswd -c trac.htpasswd' (UNIX) 95 # do 'man htpasswd' to see all the options 96 <Location "/cgi-bin/trac.cgi/login"> 97 AuthType Basic 98 AuthName "trac" 99 AuthUserFile /somewhere/trac.htpasswd 100 Require valid-user 101 </Location> 92 After having created a Trac environment, you can easily try the web interface by running the standalone server [wiki:TracStandalone tracd]: 93 {{{ 94 $ tracd --port 8000 /path/to/projectenv 102 95 }}} 103 96 104 '''Note:''' もしもApacheが Set''''''Env に関してエラーを返す場合はmod_envのロードモジュールがコメントアウトされていることを確認してください(Apache 1.3)。 97 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. 105 98 106 '''Note:''' 新しいプロジェクト環境を作成する時、{{{trac-admin}}} はあなたのプロジェクト用にカスタマイズされた設定の抜粋を表示します。107 99 108 '''Note:''' [http://httpd.apache.org/docs/suexec.html Apache suEXEC] 機能を使用している場合はプロジェクトウェブサイトの[http://projects.edgewall.com/trac/wiki/ApacheSuexec ApacheSuexec] を参照してください。 100 == Running Trac on a Web Server == 109 101 110 == Tracを使おう == 102 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. 111 103 112 '''おめでとうございます!''' これで次のディレクトリにてあなたのTracが動いているはずです。 104 == Configuring Authentication == 113 105 114 http://<yourhostname>/cgi-bin/trac.cgi 106 The process of adding, removing, and configuring user accounts for authentication depends on the specific way you run Trac. To learn about how to accomplish these tasks, please visit one of the following pages: 115 107 116 subversionリポジトリをブラウズしたり、チケットを作成したり、 117 タイムラインを見るなど、Tracの全機能が使えるはずです。 108 * TracStandalone if you use the standalone server, `tracd`. 109 * TracCgi if you use the CGI or FastCGI methods. 110 * TracModPython if you use the mod_python method. 118 111 119 但し、デフォルトではanonymousユーザ (HTTP認証を通らないユーザ) はTracの全機能のうち限られた一部にしかアクセスできないことは覚えておいてください。 112 == Using Trac == 120 113 121 '''Note:'''長い醜いURLを使いたくない場合は、Apache configを変更すれば“かわいく”すっきりさせることができます。詳しくはprojectウェブサイトの[http://projects.edgewall.com/trac/wiki/TracPrettyUrls TracPrettyUrls]を参照してください。 114 Once you have your Trac site up and running, you should be able to browse your subversion repository, create tickets, view the timeline, etc. 122 115 123 登録したユーザに追加の権限を与える方法は TracPermissions (wikiのページ) に記載されています。続けてお読みください。 116 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. 124 117 125 さらなるユーザドキュメンテーションに関しては、 TracGuide を見てください。 126 127 ''では楽しんで!'' 118 ''Enjoy!'' 128 119 129 120 [http://projects.edgewall.com/trac/wiki/TracTeam The Trac Team] 130 121 131 122 ---- 132 参考: TracGuide, TracUpgrade, TracPermissions, TracInstallPlatforms, TracModPython 123 See also: TracGuide, TracCgi, TracFastCgi, TracModPython, TracUpgrade, TracPermissions