DebianLennyInstallGuide

From Request Tracker Wiki
Jump to: navigation, search


Unofficial Installation Guide

This is an unofficial installation guide. It may be outdated or apply only to very specific configurations and versions. The official and maintained installation steps for RT are in the README and UPGRADING documents included in the official .tar.gz packages.

Outdated

This page contains out of date and possibly misleading information or instructions such as installation methods or configuration examples that no longer apply. Please consider this warning when reading the page below.


Request-Tracker 3.8.1 on Debian Lenny

Repository Installation

Taken from http://www.debianadmin.com/howto-setup-request-tracker-36-on-debian-etch.html with a few changes:

Preparing your system

  • Install Postfix, fetchmail using the following command
apt-get install postfix fetchmail
  • Select “Internet Site” when prompted
  • Install MySQL Server 5 using the following command. You must also set a root password of your choice for this installation to continue.

aptitude install mysql-server-5.0

  • Install Request-Tracker Apache2 package using the following command

aptitude install rt3.8-apache2

  • Install Request-Tracker 3.6 using the following command. When you are prompted to choose if dbconfig-common should be used select "NO" and continue with default choices.
aptitude install request-tracker3.6

Configuring Request Tracker

The Request Tracker Configuration file is located at /etc/request-tracker3.6/RT_SiteConfig.pm. The following is an example configuration to run RT on the localhost with the necessary adjustments for RT operation. The domain "example.org" is used purely for demonstration purposes. You are welcome to edit the additional variables per the comments to suit your organisation.

RT_SiteConfig.pm # # These are the bits you absolutely must edit. # # To find out how, please read # /usr/share/doc/request-tracker3.6/NOTES.Debian

Mysql Database Configuration

The tutorial directs the installer to set a root password for mysql but that should have been done during the installation of mysql-server-5.0 so here are the steps following that:

Create the user “rtuser” :

mysql -u root -p

mysql> GRANT ALL PRIVILEGES ON rtdb.* TO ‘rtuser’@'localhost’ IDENTIFIED BY ‘wibble’; FLUSH PRIVILEGES; QUIT

  • 7. Set up RT database :
/usr/sbin/rt-setup-database-3.6 --action init --dba root --prompt-for-dba-password

You should see something like the following :

Password: Now creating a database for RT.

Creating mysql database rtdb. 
Now populating database schema. 
Creating database schema. 
readline() on closed filehandle SCHEMA_LOCAL at /usr/sbin/rt-setup-database-3.6 line 223.
Done setting up database schema.
Now inserting database ACLs Done setting up database ACLs.
Now inserting RT core system objects Checking for existing system user…not found.
This appears to be a new installation. Creating system user…done.
Now inserting RT data Creating Superuser ACL…done.
Creating groups…3.4.5.6.7.8.9.done.
Creating users…10.12.done.
Creating queues…1.2.done.
Creating ACL…2.3.done.
Creating ScripActions…1.2.3.4.5.6.7.8.9.10.11.12.13.14.15.16.17.done.
Creating ScripConditions…1.2.3.4.5.6.7.8.9.10.done.
Creating templates…1.2.3.4.5.6.7.8.9.10.11.12.done.
Creating scrips…1.2.3.4.5.6.7.8.9.10.11.12.13.14.done.
Creating predefined searches…1.2.3.done.
Done setting up database content.

Configuring Apache

  • Set up Apache2

Add the following two lines to /etc/apache2/sites-enabled/000-default at the end of the file just before the closing virtualhost tag:

Include “/etc/request-tracker3.6/apache2-modperl2.conf”

RedirectMatch ^/$ /rt/
  • Enable mod rewrite by using the command:
# a2enmod rewrite
cd /etc/apache2/mods-enabled/
  • The following may produce a message: "ln: creating symbolic link `./rewrite.load': File exists" This doesn't seem to cause any problems.
ln -s ../mods-available/rewrite.load .
  • Restart Apache2
  1. /etc/init.d/apache2 restart

http://localhost/rt/

Login as user “root” Password is “password”

Now you can start configuring the tickets and using RT. It is advised you change the root password to something more cryptic.

Manual Installation

copied from http://www.debianadmin.com/howto-setup-request-tracker-36-on-debian-etch.html and edited for my company

  1. setup base system with very minimalistic install
  2. update sources then upgrade aptitude update aptitude full-upgrade
  3. install the following packages aptitude install apache2 openssl mysql-server-5.0 postfix fetchmail libc6-dev libc-dev libmudflap0-dev make gcc gawk libapache2-mod-perl2 libxml-handler-composer-perl libxml-generator-perl unzip mlocate
  4. choose "Internet Site with smart host" in postfix configuration and use yourmailserver as smart host.
  5. setup your mysql root password (NOTE: This is different from your system root password!) mysqladmin -u root password <yourpassword>
  6. download and unpack download: wget http://download.bestpractical.com/pub/rt/release/rt.tar.gz tar -xzvf rt.tar.gz cd ./rt-3.8.1
  7. configure CPAN perl -MCPAN -e shell

Choose auto config

Would you like me to configure as much as possible automatically? [no]yes

when asked about building prerequisites choose "follow"

Policy on building prerequisites (follow, ask or ignore)? [ask] follow

Once you're done and get the cpan> prompt run o conf init

cpan>o conf init

this time choose choose enter no for auto config

Would you like me to configure as much as possible automatically? [yes]no

once you're done go ahead and install Bundle::CPAN as per http://search.cpan.org/~andk/Bundle-CPAN-1.857/CPAN.pm "Bundle::CPAN - Bundle to optimize the behaviour of CPAN.pm"

cpan> install Bundle::CPAN

.. ... install everything, including optional packages exit cpan once its complete

cpan> exit

  1. lets start the rt install ./configure
  2. run make testdeps make testdeps

Expect to see errors a fews time due to the missing dependencies you should get something similar at the end. We will be running make testdeps a few times to make sure all dependencies are satisfied.

make: *** [testdeps] Error 1

  1. now run make fixdeps make fixdeps

keep hitting yes when asked about prepending.

Shall I follow them and prepend them to the queue of modules we are processing right now? [yes]

run make testdeps to see if we are still missing dependencies

make testdeps

you might get the following message

SOME DEPENDENCIES WERE MISSING.

ICAL missing dependencies:
Data::ICal...MISSING
make: *** [fixdeps] Error 1

simply re-run for any missing dependencies

make fixdeps

..
All dependencies have been found.

to make sure everything is satisfied

make testdeps

and you should get the following

All dependencies have been found

  1. now run make install make install

Configuration

  1. once completed you will need to edit RT_SiteConfig.pm backup: cp /opt/rt3/etc/RT_SiteConfig.pm /opt/rt3/etc/RT_SiteConfig.pm.orig vim /opt/rt3/etc/RT_SiteConfig.pm

edit your RT_SiteConfig.pm to reflect your specific settings

Set($rtname , "rt.yourdomain.com"); Set($Organization , "yourdomain.com"); Set($CorrespondAddress , 'rt@rt.yourdomain.com'); Set($CommentAddress , 'rt-comment@rt.yourdomain.com'); Set($OwnerEmail , 'root'); Set($MaxAttachmentSize , 10000000); # THE DATABASE: Set($DatabaseType, 'mysql'); # e.g. Pg or mysql # These are the settings that will be used when # 'make initialize-database' is run, you MUST set # these to what you want. Set($DatabaseUser , 'rt_user'); Set($DatabasePassword , '<db password>'); Set($DatabaseName , 'rt3'); # THE WEBSERVER: Set($WebPath , ""); #Set($WebPath , "/rt"); Set($WebBaseURL , "http://rt.yourdomain.com"); 1;

  1. now run make initialize-database make initialize-database

enter the password you created in step 6 you should get the following

Working with:

Type: mysql
Host: localhost
Name: rtdb
User: rtuser
DBA: root
Now creating a mysql database rtdb for RT.
Done.
Now populating database schema.
Done.
Now inserting database ACLs
Granting access to rtuser@'localhost' on rtdb.
Done.
Now inserting RT core system objects
Done.
Now inserting data
Done inserting data
Done.
  1. backup and modify your default apache config backup: mv /etc/apache2/sites-available/default /etc/apache2/sites-available/default.orig vim /etc/apache2/sites-available/default

now edit to reflect your sites specification

<VirtualHost *:80>

   ServerName rt.yourdomain.com
DocumentRoot /opt/rt3/share/html
PerlRequire "/opt/rt3/bin/webmux.pl"

&lt;Location /&gt;
    AddDefaultCharset UTF-8
    SetHandler perl-script
    PerlResponseHandler RT::Mason
&lt;/Location&gt;

</VirtualHost>

  1. enable apache modules you might be using, this will depend on how you've configured your site a2enmod perl a2enmod rewrite

Test RT

  1. stop start apache as needed /etc/init.d/apache2 stop /etc/init.d/apache2 start
  2. now open up your favorite browser and login http://your.ip.address.or.hostname

the default login is

user: root

password: password

Install RTFM

  1. Download and extract RTFM wget http://download.bestpractical.com/pub/rt/release/rtfm.tar.gz tar -xzvf rtfm.tar.gz
  2. Install and patch the database cd RTFM-2.4.0 perl Makefile.PL make install make initdb
  3. add follwing line to /opt/rt3/etc/RT_SiteConfig.pm Set(@Plugins,qw(RT::FM));
  4. clear mason cache rm -rf /opt/rt3/var/mason_data/*
  5. Stop and restart Apache /etc/init.d/apache2 stop /etc/init.d/apache2 start
  6. log in again and retest

Configure Postfix

  1. add follwing line to /etc/aliases rt: "|/opt/rt3/bin/rt-mailgate --queue 'General' --action correspond --url http://rt.yourdomain.com" rt-comment: "|/opt/rt3/bin/rt-mailgate --queue 'General' --action comment --url http://rt.yourdomain.com"
  2. run newaliases command newaliases
  3. Give everyone rights to CreateTicket, ReplyToTicket, CommentOnTicket (configuration, global, group rights)