PR

[RT3] Request Tracker のインストール(まとめ直し)

pc.casey.jp » [RT3] Request Tracker のインストールが、うまくまとまっていないことと、別の方法で負担を軽減できることがわかったので、インストールまでを再度やり直し。

なお、前回はServersMan@VPSだったが、今回はVMware上に仮想サーバーをCentOS5.5で構築したので少し環境は違う。

インストールしたてなので準備

# yum install httpd
# service httpd start
# chkconfig httpd on

うまく接続できないので、 pc.casey.jp » CentOS インストール後にやっておくこと の一部をやっておく。

IPアドレスでアクセスできた(デフォルトが表示された)のを確認したところで、Firefox hosts切替アドオン-SwitchHosts にrt.example.com として登録しておく。

ダウンロード

まず、最新版をダウンロードしてくる。

# wget http://download.bestpractical.com/pub/rt/release/rt.tar.gz

スポンサードリンク

展開する。

# tar xzf rt.tar.gz

ディレクトリに入る。

# cd rt-3.8.8/

それでは行きます!

./configure

# ./configure

checking for a BSD-compatible install… /usr/bin/install -c
checking for gawk… gawk
checking for perl… /usr/local/bin/perl
checking for chosen layout… relative
checking if user www exists… not found
checking if user www-data exists… not found
checking if user apache exists… found
checking if group www exists… not found
checking if group www-data exists… not found
checking if group apache exists… found
checking if group rt3 exists… not found
checking if group rt exists… not found
checking if group apache exists… found
checking if database name is valid… yes
checking for gcc… no
checking for cc… no
checking for cl.exe… no
configure: error: in `/root/rt-3.8.8′:
configure: error: no acceptable C compiler found in $PATH
See `config.log’ for more details.

ユーザとグループの追加

checking if user www exists… not found
checking if user www-data exists… not found
checking if group www exists… not found
checking if group www-data exists… not found
checking if group rt3 exists… not found
checking if group rt exists… not found

上記を以下のように解決する。

# groupadd www
# adduser admin -G www -p password

gccの導入

checking for gcc… no

上記を以下のように解決する。

# yum install gcc

再度configure

#  ./configure

エラーはなくなった。

# make testdeps

環境をチェックする。

/usr/local/bin/perl ./sbin/rt-test-dependencies –verbose –with-mysql –with-fastcgi
perl:
>=5.8.3(5.8.8) …found
users:
rt group (rt3) …found
bin owner (root) …found
libs owner (root) …found
libs group (bin) …found
web owner (www) …found
web group (www) …found
CLI dependencies:
Term::ReadKey …MISSING


Email::Address …MISSING
make: *** [testdeps] エラー 1

# make fixdeps

Install module Term::ReadKey
You haven’t configured the CPAN shell yet.
Please run `/usr/local/bin/perl -MCPAN -e shell` to configure it.
make: *** [fixdeps] エラー 1

エラーを解決してくれる・・・ハズなのだが、モジュールが足りなかったらしい。

# cpan install Term::ReadKey

# fixdeps

お茶が飲める。いや、ご飯が食べられる。

一発でうまくいくとは思わなかったけれど、エラーは以下のとおり。

SOME DEPENDENCIES WERE MISSING.
ICAL missing dependencies:
Data::ICal …MISSING
GPG missing dependencies:
GnuPG::Interface …MISSING
CORE missing dependencies:
Class::ReturnValue …MISSING
Sys::Syslog >= 0.16 …MISSING
Encode >= 2.21 …MISSING
MIME::Entity …MISSING
File::Temp >= 0.18 …MISSING
FASTCGI missing dependencies:
CGI >= 3.38 …MISSING
MASON missing dependencies:
XML::RSS …MISSING
MYSQL missing dependencies:
DBD::mysql …MISSING
make: *** [fixdeps] エラー 1

そういえばMySQLをインストールしていなかった

関係あるかどうかわからないけど、必要なものだから入れておこう。

# yum install mysql
# yum isntall httpd-devel

# fixdeps

SOME DEPENDENCIES WERE MISSING.
MASON missing dependencies:
XML::RSS …MISSING
MYSQL missing dependencies:
DBD::mysql …MISSING
make: *** [fixdeps] エラー 1

# make testdeps

XML::RSS …MISSING
DBD::mysql …MISSING
SOME DEPENDENCIES WERE MISSING.
XML::RSS …MISSING
DBD::mysql …MISSING
make: *** [testdeps] エラー 1

そういや、PHPも入れてないよね

# yum install php
# yum install php-mbstring
# yum install php-mysql
# yum install mysql-server
# chkconfig mysqld on

pc.casey.jp » [MySQL] MySQLの初期設定 も参照。

さて、まずXML::RSSを解決する

cpanに接続してエラーを見てみる。

/usr/bin/perl -MCPAN -e’install XML::RSS’

まず、 DateTime が無いらしいから入れる。

/usr/bin/perl -MCPAN -e’install DateTime’

今度は、 DateTime::Locale が無いらしいから入れる。

/usr/bin/perl -MCPAN -e’install DateTime::Locale’

テストしてみる

/usr/bin/perl -MCPAN -e’install XML::RSS’

今度は DateTime::TimeZone が無いらしいから入れる。

/usr/bin/perl -MCPAN -e’install DateTime::TimeZone’

テストしてみる

/usr/bin/perl -MCPAN -e’install XML::RSS’

Ok!

# make testdeps

All dependencies have been found.

よし、OKだ。

# make install

/usr/local/bin/perl ./sbin/rt-test-dependencies –verbose –with-mysql –with-fastcgi

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

設定を今すぐしなさいよという文と場所。

# make initialize-database

設定前に試してみる。

/usr/local/bin/perl -I/opt/rt3/local/lib -I/opt/rt3/lib sbin/rt-setup-database –action init –dba root –prompt-for-dba-password
In order to create or update your RT database, this script needs to connect to your  mysql instance on localhost as root
Please specify that user’s database password below. If the user has no database
password, just press return.

Password:
Working with:
Type:   mysql
Host:   localhost
Name:   rt3
User:   rt_user
DBA:    root
Failed to connect to dbi:mysql:;host=localhost as user ‘root’: Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)make: *** [initialize-database] エラー 255

よし、いい感じ。

php-mbstring

コメント