Request Trackerのインストール | システム運用便り

システム運用便り

システム運用の会社を経営しています。業務のことから日々思うことまで、つれづれなるままにつづるBlogです。

久々に、システムを構築してみましたよ。


CentOS5にRequest Trackerをインストールしてみた。


Perl モジュール、開発環境、ライブラリなどをインストール。

# yum install perl-*

# yum install ccp gcc* autoconf* automake* libtool m4

# yum install gd gd-devel libpng libpng-devel libjpeg libjpeg-devel freetype freetype-devel

RT のインストール

$ su -
# wget http://download.bestpractical.com/pub/rt/release/rt-3.8.8.tar.gz
# tar xzf rt-3.8.8.tar.gz
# cd rt-3.8.8
# ./configure

make testdeps コマンドを実行し、Perl モジュールがインストール済みかどうかチェックする。

# make testdeps
/usr/local/bin/perl ./sbin/rt-test-dependencies --verbose --with-mysql --with-fastcgi
perl:
>=5.8.3(5.10.0) ...found
users:
rt group (apache) ...found
bin owner (root) ...found
libs owner (root) ...found
libs group (bin) ...found
web owner (apache) ...found
web group (apache) ...found
CLI dependencies:
Term::ReadKey ...found
Getopt::Long >= 2.24 ...found
HTTP::Request::Common ...found
Term::ReadLine ...found
Text::ParseWords ...found
LWP ...found
CORE dependencies:
Class::ReturnValue ...MISSING
以下省略

...MISSING になっているモジュールをインストールしていく。

CPAN を使い Perl モジュールの不足分をインストール

# perl -MCPAN -e 'install モジュール名'

RT のソースコードのあるディレクトリに戻って、再度 make testdeps する。

# make testdeps
...
Everything was found.

と表示されれば、必要なモジュールが全てそろっているので、make install する。

# make install
...
Congratulations. RT has been installed.


You must now configure RT by editing /opt/rt3/etc/RT_SiteConfig.pm.

(You will definitely need to set RT's database password in
/opt/rt3/etc/RT_SiteConfig.pm before continuing. Not doing so could be
very dangerous. Note that you do not have to manually add a
database user or set up a database for RT. These actions will be
taken care of in the next step.)

After that, you need to initialize RT's database by running
'make initialize-database'

/opt/rt3/ 以下に RT がインストールされるので、
データベースを作成する前に、RT の設定内容を RT_SiteConfig.pm に記述する

# Base Configuration
Set($rtname, 'rt.example.com');
Set($Organization , "example.com");
Set($MinimumPasswordLength , "5");
Set($Timezone , 'US/Eastern');

# Database Configuration
Set($DatabaseType , 'mysql');
Set($DatabaseHost , 'MySQLサーバアドレス');
Set($DatabasePort , '');
Set($DatabaseUser , 'データベースユーザ名');
Set($DatabasePassword , 'データベースユーザのパスワード');
Set($DatabaseName , 'データベース名');
Set($DatabaseRequireSSL , undef);

# Web interface configuration
Set($WebBaseURL , "http://rt.example.com:$WebPort");

1;

データベースの初期化

RT_SiteConfig.pm の記述に従って、データベースを初期化する

# make initialize-database


Apacheの設定

/etc/httpd/conf.d/perl.confに下記の設定を追加。

Listen ip_of_the_rt.example.com:80
<VirtualHost ip_of_the_rt.example.com:80>
ServerName rt.example.com
ServerAdmin Email.Address@example.com


DocumentRoot /opt/rt3/share/html

AddDefaultCharset UTF-8
PerlRequire /opt/rt3/bin/webmux.pl


<Directory /opt/rt3/share/html>
Order allow,deny
Allow from all

SetHandler perl-script
PerlResponseHandler RT::Mason
</Directory>
</VirtualHost>


Apacheを起動する。

初期ユーザーネームとパスワードでブラウザでログインする。
ユーザネーム: root
パスワード: password