ページ更新: 2007-07-16 (月) (5732日前)
関連: All-In-One Trac, SQLite#SQLiteDatabaseBrowser (2007-01-05 新規作成) WindowsにTrac関連のソフトウェアを丸ごとインストールする Trac Lightning (旧 Trac月:TracLight, TracPack) について。 同様の物は他に All-In-One Trac がある。 目次 情報源 #[編集]Trac Lightning-1.8.0 #Trac Lightning 1.8.0の記事を以下のサイトに書きました。 第2回 Trac Lightningで簡単インストール:ITpro (2008-05-13) [編集]TracLight-1.3.3 (2007-07-16) #[編集]ソフトウェアの構成 #主なソフトウェア:
主なプラグイン:
インストール #OSはWindows 2000 Professional SP4 + Microsoft Update で 2007-07-16までのパッチ適用済み。 VMware Workstation 6.0.0 の上で稼働しているもの。 注:インストーラーをWindows 2000で起動すると、一部の文字が□で表示されます。 Windows XP Professional ではちゃんと表示されます。 注:Maven 2.x、Apache Continuum を使うには、Javaが必要。 [編集] スタートメニュー、ディレクトリ構成、環境変数 #[編集]スタートメニュー #[編集] ディレクトリ構成 #[編集] システム環境変数 #
TracPack-0.10.3-ja-1 #[編集]インストール #(略) [編集]インストールの結果 #[編集]ファイルの配置 #C:\TRACPACK | startApache.bat ... Apache起動バッチファイル | unins000.dat | unins000.exe | +-apache2/ ... Apache2 | +-bin/ | | | : | | | htdigest.exe ... Digest認証ファイル作成 | | | htpasswd.exe ... Basic認証ファイル作成 | | | : | | +-iconv/ | | | +-cgi-bin/ | | : | | trac.cgi ... trac cgi版 | | trac.fcgi ... trac fcgi版 | | | +-conf/ | | httpd.conf ... Apache設定ファイル | | : | | | +-error/ | +-htdocs/ | | index.html ... http://localhost/ | | | +-icons/ | +-include/ | +-lib/ | +-logs/ | | access.log ... Apacheアクセスログ | | error.log ... Apacheエラーログ | | | +-modules/ | : | mod_authz_svn.so ... Subversion path-based authorization module for Apache | mod_dav_svn.so ... Subversion plug-in for the Apache DAV module | mod_python.so ... Embedding Python within Apache. | : +-bin/ | create-project.bat ... Tracプロジェクト(TracEnv), Subversionリポジトリ作成バッチファイル | post-commit.bat ... Subversion post-commitフック | trac/contrib/trac-post-commit-hookを実行 | readline.dll ... (未確認だが、sqlite3.exeが使うのだと思う) | setenv.bat ... 環境変数PATHをその場で設定 | SQLite Database Browser.exe ... SQLite Database Browser (GUI版) | sqlite3.exe ... SQLite 3クライアント(コマンドライン版) | create-project.batで使用(dbinit.sqlを実行) | trac-admin.bat ... trac-admin | +-install/ | | dbinit.sql ... Tracプロジェクト作成時にtrac.dbを修正 | | (resolution,priority,ticket_typeを設定) | | replace.py ... スクリプトを書き換える | +-replace/ | create-project.bat.in | httpd.conf.in | post-commit.bat.in | setenv.bat.in | startApache.bat.in | trac-admin.bat.in | +-plugins/ ... Tracのプラグイン。 | Tracプロジェクト作成時にpluginsディレクトリにコピーされる | IniAdmin-0.1-py2.4.egg | TracAccountManager-0.1.3dev_r1709-py2.4.egg | TracWebAdmin-0.1.2dev_r4429-py2.4.egg | TracXMLRPC-0.1-py2.4.egg | WebAdminUsers-0.1.0-py2.4.egg | +-projects/ | | htpasswd ... SubversionとTracの認証用。Basic認証。(httpd.conf, trac.ini) | | | +-svn/ ... Subversionリポジトリ群を置くディレクトリ | | +-SampleProject/ ... サンプルのリポジトリ (http://localhost/svn/SampleProject/) | | +-conf/ | | +-dav/ | | +-db/ | | +-hooks/ | | | post-commit.bat ... post-commitフック... trac/contrib/trac-post-commit-hookを実行 | | | : | | +-locks/ | | | +-trac/ ... Tracプロジェクト(TracEnv)群を置くディレクトリ | +-SampleProject/ ... サンプルのプロジェクト (http://localhost/trac/SampleProject) | +-attachments/ | +-conf/ | | trac.ini ... Tracの設定ファイル | | : | | | +-db/ | | trac.db ... TracのDB (SQLite3) | | | +-htdocs/ | +-log/ | +-plugins/ ... Tracプラグイン。create-project.batによってコピーされたもの | | IniAdmin-0.1-py2.4.egg | | TracAccountManager-0.1.3dev_r1709-py2.4.egg | | TracWebAdmin-0.1.2dev_r4429-py2.4.egg | | TracXMLRPC-0.1-py2.4.egg | | WebAdminUsers-0.1.0-py2.4.egg | | | +-templates/ | +-wiki-macros/ | +-python/ ... Python | +-DLLs/ | +-Doc/ | +-include/ | +-Lib/ | | +-bsddb/ | | +-compiler/ | | +-curses/ | | +-distutils/ | | +-email/ | | +-encodings/ | | +-hotshot/ | | +-idlelib/ | | +-lib-old/ | | +-lib-tk/ | | +-logging/ | | +-site-packages/ | | | | easy-install.pth ... setuptools | | | | japanese.pth ... JapaneseCodecs? | | | | neo_cgi.pyd ... ClearSilver | | | | README.txt | | | | setuptools.pth ... setuptools | | | | | | | +-japanese/ ... JapaneseCodecs? | | | +-libsvn/ ... Subversion - Python binding | | | +-mod_python/ ... mod_python | | | +-pysqlite2/ ... PySQLite2 | | | +-setuptools-0.6c3-py2.4.egg/ ... setuptools | | | +-svn/ ... Subversion - Python binding | | | +-trac/ ... Tracプログラム本体 | | +-test/ | | +-xml/ | | | +-libs/ | +-pysqlite2-doc/ | +-Scripts/ | | easy_install-2.4.exe | | easy_install.exe | | trac-admin ... trac-admin | | trac-postinstall.py | | tracd ... tracd | | win32_postinstall.py | | | +-share/ | | +-man/ | | | +-man1/ | | | trac-admin.1 ... trac-admin man | | | tracd.1 ... tracd man | | +-trac/ ... Trac | | +-cgi-bin/ | | | trac.cgi | | | trac.fcgi | | +-conf/ | | +-htdocs/ | | +-plugins/ | | +-templates/ | | +-wiki-default/ | | +-wiki-macros/ | | | +-tcl/ | +-Tools/ | +-subversion/ ... Subversion | | | +-bin/ | | : | | svn.exe ... Subversionクライアント(コマンドライン版) | | svnadmin.exe | | svndumpfilter.exe | | svnlook.exe | | svnserve.exe | | svnsync.exe | | svnversion.exe | | : | +-iconv/ | +-licenses/ | +-share/ +-trac/ ... Tracインストールファイル (trac-0.10.3-ja-1.zipを展開した物?)[編集] スタートメニュー #cmd
SQLite Database Browser.exe
startApache
cmd #Trac/Subversion/Apacheのコマンドライン操作が必要なときに使用する。
[編集] SQLite Database Browser #Tracを使う上では特に必要はないが、こういうツールが同梱されているのは面白いと思う。 (もしかしてsqlite3.exeの結果の確認用だったり?) メニューによると、Version 1.3 のようだ。 試しに、サンプルプロジェクトのDB (C:\TracPack\projects\trac\SampleProject\db\trac.db) を開き、 enumテーブルを表示してみた。 (enumテーブルは priority,resolution,ticket_typeなどの名称を管理している。 create-project.bat はTracプロジェクト作成時にこのテーブルの内容を変更(日本語化)している) [編集] startApache #[編集] trac.ini #サンプルプロジェクトの trac.ini (C:\TracPack\projects\trac\SampleProject\conf\trac.ini) 詳しくは Trac 設定ファイル を参照のこと。 # -*- coding: utf-8 -*- [attachment] max_size = 262144 render_unsafe_content = false [browser] downloadable_paths = /trunk, /branches/*, /tags/* hide_properties = svk:merge [changeset] max_diff_bytes = 10000000 max_diff_files = 0 wiki_format_messages = true [header_logo] alt = height = -1 link = http://example.org/ src = common/trac_banner.png width = -1 [logging] log_file = trac.log log_level = DEBUG log_type = none [mimeviewer] enscript_modes = text/x-dylan:dylan:4 enscript_path = enscript max_preview_size = 262144 mime_map = text/x-dylan:dylan,text/x-idl:ice,text/x-ada:ads:adb php_path = php silvercity_modes = tab_width = 8 [notification] always_notify_owner = false always_notify_reporter = false always_notify_updater = true mime_encoding = base64 smtp_always_bcc = smtp_always_cc = smtp_default_domain = smtp_enabled = false smtp_from = trac@localhost smtp_password = smtp_port = 25 smtp_replyto = trac@localhost smtp_server = localhost smtp_subject_prefix = __default__ smtp_user = use_public_cc = false use_short_addr = false use_tls = false [project] descr = My example project footer = Visit the Trac open source project at<br /><a href="http://trac.edgewall.org/">http://trac.edgewall.org/</a> icon = common/trac.ico name = SampleProject url = http://example.org/ [search] min_query_length = 3 [ticket] default_component = default_milestone = default_priority = major default_type = defect default_version = restrict_owner = false [timeline] changeset_long_messages = false changeset_show_files = 0 default_daysback = 30 ticket_show_details = false [trac] authz_file = authz_module_name = base_url = check_auth_ip = true database = sqlite:db/trac.db default_charset = iso-8859-15 default_handler = WikiModule htdocs_location = ignore_auth_case = false mainnav = wiki,timeline,roadmap,browser,tickets,newticket,search metanav = login,logout,settings,help,about permission_store = DefaultPermissionStore repository_dir = C:\\TracPack/projects/svn/SampleProject repository_type = svn # request_filters = <set in global trac.ini> templates_dir = C:\\TracPack/trac/templates timeout = 20 [wiki] ignore_missing_pages = false split_page_names = false [account-manager] password_format = htpasswd password_store = HtPasswdStore password_file = C:\TracPack/projects/htpasswd[編集] httpd.conf #C:/TRACPACK/apache2/conf/httpd.conf : ServerRoot "C:\TracPack/apache2" : DocumentRoot "C:\TracPack/apache2/htdocs" : ### Add for SVN and Trac LoadModule authz_svn_module modules/mod_authz_svn.so LoadModule dav_svn_module modules/mod_dav_svn.so LoadModule python_module modules/mod_python.so <LocationMatch "/[^/]+/login"> AuthType Basic AuthName "Trac Project Authentication" AuthUserFile "C:\TracPack\projects\htpasswd" Require valid-user </LocationMatch> ScriptAlias /trac "C:\TracPack/apache2/cgi-bin/trac.cgi" <Location "/trac"> # SetEnv TRAC_ENV_PARENT_DIR "C:\TracPack\projects\trac" SetHandler mod_python PythonHandler trac.web.modpython_frontend PythonOption TracEnvParentDir "C:\TracPack\projects\trac" PythonOption TracUriRoot /trac </Location> <Location "/svn"> DAV svn SVNParentPath "C:\TracPack\projects\svn" AuthName "SVN Repository" AuthType Basic Require valid-user AuthUserFile "C:\TracPack\projects\htpasswd" </Location>[編集] Trac,Subversionの画面 #[編集]Apache DocumentRoot #http://localhost/ (C:\TracPack\apache2\htdocs\index.html) [編集] Tracプロジェクト一覧 #[編集] Trac SampleProject #http://localhost/trac/SampleProject [編集] Subversion SampleProject #http://localhost/svn/SampleProject/ (C:\TracPack\projects\svn\SampleProject) [編集] Trac SampleProjectへログイン〜Admin画面を表示 #[編集] その他 #(調査中)
[編集] メモ TracPack-0.10.3-ja-1 #[編集]同梱されているプラグイン #
trac-post-commit-hook #使い方は C:\TracPack\trac\contrib\trac-post-commit-hook の先頭のコメントを参照のこと。 Trac Projectのリポジトリでは、以下の場所にある:
また、Trac FAQ では以下の項目を参照: [編集] svnコマンド等の文字化け #環境変数APR_ICONV_PATHを設定しておくと良い。 その場限りで、コマンドラインで設定するなら次のようにする: set APR_ICONV_PATH=C:\TracPack\subversion\iconv[編集] JapaneseCodecsが同梱されている #Python 2.4.XではCJKCodecsが標準で含まれていたと思うが、Trac PackではさらにJapaneseCodecsが追加されている。 ……ということは、Codecsは両方使えたりする? [編集]TODO: Tracサンプルプロジェクトに設定されている権限 #(TODO:adminとguestの権限を確認しておく。 デフォルトと異なるのはadminにTRAC_ADMIN権限が付加されていることだけだと思うが。 Web、trac-adminの両方で。trac-adminの使用例を兼用。Webのは既存のページのでいいや) [編集]TODO: Digest認証の設定方法 #(TODO:Basic認証はあんまり好きじゃないので、Digest認証の手順も書いておく) Digest認証の設定方法(cmdから):詳しくはhtdigest - manage user files for digest authenticationを参照。 htdigest -c htdigest "Trac Project" admin admin admin htdigest htdigest "Trac Project" guest guest guest httpd.conf設定: 詳しくはApache Module mod_auth_digestを参照。 <Location "/trac/SampleProject/login"> AuthType Digest AuthName "Sample Project" AuthDigestFile "c:/path/to/htdigest" Require valid-user </Location> <Location /svn/SampleProject> AuthType Digest AuthName "Sample Project" AuthDigestFile "c:/path/to/htdigest" Require valid-user </Location> trac.ini設定: 詳しくはAccountManagerPlugin#HtDigestStoreを参照。 [account-manager] htdigest_realm = Sample Project password_file = c:/path/to/htdigest password_store = HtDigestStore ) [編集]TODO: httpd.confの文法確認方法 #(TODO:Apache configtestの手順を書いておく。cmdから) ヘルプより抜粋: Apache.exe -w -t -f path/to/httpd.conf -d path/to/initial/server/root -w : hold on console on error -t : run syntax check for config files -f file : specify an alternate ServerConfigFile -d directory : specify an alternate initial ServerRoot[編集] コメント #コメントを ソフト/Bug Tracking/trac#comment に引っ越しました (2007-06-08) |