[rt-users] RT 4 - install on Debian Squeeze

Bart bart at pleh.info
Mon Jun 6 07:19:40 EDT 2011


Hi,

This topic might have been closed but I just want to reply with my Debian
Squeeze installation steps.

The steps are basically describing the installation from scratch while
installing RT4 manually. The advantage here is that you can follow the RT
releases instead of waiting for the Debian specific packages. (personally I
think that's ok)

*------------------------ BEGIN INSTALLATION STEPS ------------------------*

Clean installation of Debian Squeeze, this means:

   - Only install the base system (nothing else)
   - Make sure that things like networking work (DNS, IP, etc.)

After installation install the following basics:

    aptitude update
    aptitude full-upgrade
    aptitude install ntp ntpdate sudo screen openssh-server acpi-support
acpid

I don't know why but I like doing these separate:

    aptitude install build-essential
    aptitude install linux-headers-`uname -r`

Edit the sources.lst

    nano -w /etc/apt/sources.lst

Add "contrib non-free", not really requirered but sometimes you need items
from those two sections. (I'm lazy and just add them to make sure that I
don't bite my nails when I really need them).
Then update the apt library:

    aptitude update

Create the .ssh directory and extra files for when you use things like SSH
(I do):

    cd /root/
    mkdir .ssh
    chmod 700 .ssh
    touch .ssh/authorized_keys
    chmod 600 .ssh/authorized_keys

Up to this point you've only installed the base Debian system. The next
parts are specific for RT.

Requirered packages for RT4:

    aptitude install apache2 mysql-server gcc make gawk libexpat1-dev
libapache2-mod-perl2

Check if Apache is running:

    wget --spider localhost

Download RT and unpack it:

    cd /tmp
    wget http://download.bestpractical.com/pub//rt/release/rt-4.0.0.tar.gz
    tar xvzf rt-4.0.0.tar.gz
    cd /tmp/rt-4.0.0
    ./configure

Now first run cpan in order to configure it:

    cpan

Do the automatic thingy, after that you'll have to edit the cpan config in
order to make the next part a hell of allot easyer:

    nano -w /etc/perl/CPAN/Config.pm

Inside the config there are two "ask" parameters, remove the ask part and
make sure it only contains "yes".
I'm doing this because the following steps are going to install allot of
perl modules and hitting return every minute or so is just too annoying.

Then, check what dependencies your missing, this is CPAN based:

    make testdeps

Now install all the depencencies by using the fixdeps parameter, this runs
via CPAN:

    make fixdeps

The fixdeps part will take a while and you might have to run it several
times. You might even have to manually install a few of those dependencies
(not too difficult).
After a while you'll be done, the next thing you could do is upgrade all
perl modules from within CPAN (optional since RT met it's requirements).

Now we can install RT:

    cd /tmp/rt-4.0.0
    make install

Edit the SiteConfig, this is what I've made:

    nano -w /opt/rt4/etc/RT_SiteConfig.pm

        Set( $rtname, 'Request Tracker Name');
        Set($Organization, 'Organization');
        Set($CorrespondAddress , 'rt at some.url.com');
        Set($CommentAddress , 'rt-comment at some.url.com');
        Set($Timezone , 'Europe/Amsterdam'); # obviously choose what suits
you
        Set($DatabaseType, 'mysql'); # e.g. Pg or mysql
        Set($DatabaseUser , 'root'); # Obviously make a separate DB for RT
and give it a special user with privileges for that DB. In my test setup I'm
just doing this with the root user (like I said, I'm a little lazy ^_~)
        Set($DatabasePassword , 'root');  # My test setup has root:root as
user/password.
        Set($DatabaseName , 'rt4');
        Set($WebPath , "");
        Set($WebBaseURL , "http://rt4.some.url.com");

Next up is initializing the database:

        cd /tmp/rt-4.0.0
        make initialize-database

Now we configure apache to include the vhost:

    nano -w /etc/apache2/sites-available/rt4.some.url.com

        <VirtualHost rt4.some.url.com>
            ErrorLog /opt/rt4/var/log/apache2.error
            TransferLog /opt/rt4/var/log/apache2.access
            # LogLevel debug

            AddDefaultCharset UTF-8

            DocumentRoot "/opt/rt4/share/html"
            <Location />
                Order allow,deny
                Allow from all

                SetHandler perl-script
                PerlResponseHandler Plack::Handler::Apache2
                PerlSetVar psgi_app /opt/rt4/sbin/rt-server
            </Location>
            <Perl>
                use Plack::Handler::Apache2;
                Plack::Handler::Apache2->preload("/opt/rt4/sbin/rt-server");
            </Perl>
        </VirtualHost>

    /etc/init.d/apache2 restart

Check if the new vhost is working and if RT is working. (as in, open it in a
browser)
During the first run it might take a while to show the webpage.

Configure the outgoing e-mail, default Debian comes with exim. In my case I
want the server to go to a smarthost, so run this command to configure exim
with a smarthost (pretty easy setup, you can rerun it if it's not working):

    dpkg-reconfigure exim4-config

On your mailserver side you can add this stuff in order to forward mail to
your new RT instance:

    nano -w /etc/aliases

    rt at some.url.com:         "|/opt/rt4/bin/rt-mailgate --queue general
--action correspond --url http://rt4.test.intern.bkwi.nl"
    rt-comment at some.url.com: "|/opt/rt4/bin/rt-mailgate --queue general
--action comment --url http://rt4.test.intern.bkwi.nl"

Then update the aliases:

  newaliases

The script that this line is refering to is rt-mailgate, you can find the
perl script on your RT installation. I copied the script over to the
mailserver into the path given above. Since it's perl it will work if the
mailserver has perl installed. (in my case it worked out of the box)

Before RT does anything with e-mail you need to set the following:

   - Create a user
   - Create a group
   - Set proper rights on the general queue

After that you can test if the RT system is recieving mail.

Websites and information that helped me the most:

   - http://requesttracker.wikia.com/wiki/ManualInstallation
   - /tmp/rt-4.0.0/README
   - /tmp/rt-4.0.0/docs/web_deployment.pod


*------------------------ END INSTALLATION STEPS ------------------------*

Hope this helps out some of you :)


Best regards,

Bart



2011/5/26 Gilbert Rebeiro <gilbert at dido.ca>

> That's so nice, but too late.
> I struggled one by one.
> Oh well, this should be in the wiki or somewhere easier to find.
>
> Thanks, debian is great.
>
> G.
>
>
> On 25/05/2011 5:41 PM, Vegard Vesterheim wrote:
>
>> On Wed, 18 May 2011 23:08:59 +0200 Alexander Finger<
>> af at genevainformation.ch>  wrote:
>>
>>  If you want to keep your install clean, try to install the necessary
>>> modules using apt-get instead of using fixdeps.
>>>
>> Good advice.
>>
>> Here are some oneliners from my personal notes on installing RT. These
>> commands tries naively to identify Debian packages for the missing Perl
>> modules reported by 'make testdeps'. It is far from perfect, but it
>> alleviates some of the work of satisfying dependencies.
>>
>> make testdeps | grep '\.MISSING' | perl -pe 's/\s(\S+)\s.*MISSING/lc
>> "lib$1-perl"/e' | sed \
>> 's/::/-/g' | while read p; do sudo apt-get --yes install $p; done
>>
>> make testdeps | perl -wnl -e '/^SOME DEPENDENCIES WERE MISSING/ ... /EOF/
>> and print' | grep\
>>  '\.MISSING' | perl -pe 's/\s*([^. ]*).*/lc "lib$1-perl"/e' | sed
>> 's/::/-/g'
>>
>>  - Vegard V -
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20110606/edfc20dd/attachment.htm>


More information about the rt-users mailing list