Debian (sarge) 標準の Trac 0.8 インストール手順
方針
- とにかく簡単に。凝った設定はしない。
- とにかくTracさえ動けば良い(Subversion を使った構成管理は考えない)。
- インストール作業を簡単にするため Debian(sarge) 標準のパッケージを利用。
- だから、バージョンが古くても気にしない。
- 一応日本語入力ができることを確認。
Subversion リポジトリの作成
svnadmin create /var/lib/svn/repos chown -R www-data:www-data /var/lib/svn/repos
Trac 初期設定
trac-admin /var/lib/trac/issue initenv Creating a new Trac environment at /var/lib/trac/issue 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]> issue Please specify the absolute path to the project Subversion repository. Repository must be local, and trac-admin requires read+write permission to initialize the Trac database. Path to repository [/var/svn/test]> /var/lib/svn/repos Please enter location of Trac page templates. Default is the location of the site-wide templates installed with Trac. Templates directory [/usr/share/trac/templates]> Creating and Initializing Project : : (以下省略) :
Apache のユーザ権限にする。
chmod -R www-data:www-data /var/lib/trac/issue
Apache の設定
trac パッケージをインストールすれば、apache2 もインストールされる。
trac は apache2 の CGIとして動作させる。
ln -s /usr/share/trac/cgi-bin/trac.cgi /usr/lib/cgi-bin/trac.cgi
- Basic認証ファイルの作成
htpasswd -c /var/lib/trac/issue/conf/trac.htpasswd okinaka
- /etc/apache2/sites-available/trac を作成。
Alias /trac "/usr/share/trac/htdocs/"SetEnv TRAC_ENV "/var/lib/trac/issue" AuthType Basic AuthName "issue" AuthUserFile /var/lib/trac/issue/conf/trac.htpasswd Require valid-user
- 設定ファイルを有効にする。
a2ensite trac
確認
Apache を再起動して確認する。
http://localhost/cgi-bin/trac.cgi