Skip to content

Instantly share code, notes, and snippets.

@bheisig
Last active October 4, 2021 12:49
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save bheisig/a4a34ffa85ebf1c3c5dc8dd8b46a0040 to your computer and use it in GitHub Desktop.
Save bheisig/a4a34ffa85ebf1c3c5dc8dd8b46a0040 to your computer and use it in GitHub Desktop.
Install Request Tracker (RT) 4.4.1 on Debian GNU/Linux 8.6 (Or: How I survived Perl's CPAN dependency hell…)

Aim

Our aim is to install Request Tracker (RT) 4.4.2 on Debian GNU/Linux 8.6 with less pain

Note: This won't work with Debian GNU/Linux 9.x.

Problems

At the time of writing…

  • There is no nice and clean setup guide
  • There is no Debian package for RT's 4.4 branch
  • RT's README and its Makefile "help" are controversial
  • A typical installation often leads to Perl's CPAN dependency hell

Preparation

Install Debian GNU/Linux 8.6 or higher.

Install needed distribution packages:

sudo apt update
sudo apt install build-essential apache2 libapache2-mod-fcgid mariadb-server-10.0 mariadb-client-10.0 libssl-dev libexpat1-dev

Get it done

wget https://download.bestpractical.com/pub/rt/release/rt-4.4.2.tar.gz
tar xzvf rt-4.4.2.tar.gz
cd rt-4.4.2
./configure --with-web-user=www-data --with-web-group=www-data
sudo /usr/bin/perl -MCPAN -e shell # Quit with CTRL+D
sudo make testdeps
sudo make fixdeps # Press ENTER when needed
sudo make install

Test your installation with the built-in Web server: sudo /opt/rt4/sbin/rt-server --port 8080. Hit CTRL-C to stop the process.

Configure Apache Web server

We choose Apache2 Web Server and FastCGId. RT will be available under the URL /rt.

Edit RT's local configuration file /opt/rt4/etc/RT_SiteConfig.d/myissues.pm:

# sudo nano /opt/rt4/etc/RT_SiteConfig.d/myissues.pm
Set($WebPath, "/rt");

Create a new VirtualHost:

# sudo nano /etc/apache2/sites-available/myissues.conf
<VirtualHost *:80>
        ServerName myissues.example.com
        ServerAdmin webmaster@localhost

        DocumentRoot /var/www/html

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

        AddDefaultCharset UTF-8

        ScriptAlias /rt /opt/rt4/sbin/rt-server.fcgi/

        <Location /rt>
                Require all granted
                Options +ExecCGI
                AddHandler fcgid-script fcgi
        </Location>
</VirtualHost>

Replace default VirtualHost with your new one and restart Apache Web server:

sudo a2dissite 000-default
sudo a2ensite myissues
sudo systemctl restart apache2.service

Open http://myissues.example.com/rt/ (or something similar) in a Web browser to test everything runs smoothly.

Re-work

From RT's README:

  • Set up users, groups, queues, scrips and access control
  • Set up automated recurring tasks (cronjobs)
  • Configure the RT email gateway
  • Set up full text search
  • Set up automatic backups

…and keep your operating system clean and updated.

What's next?

Update/upgrade RT! Oh my gosh…

Sources that helped me

@Piuliss
Copy link

Piuliss commented Oct 4, 2021

Some extra steps for Debian 10, RT 4.4.*

sudo apt install build-essential libapache2-mod-fcgid libssl-dev libexpat1-dev libdbd-mysql-perl liblwp-protocol-https-perl libhtml-formattext-withlinks-andtables-perl libhtml-formattext-withlinks-perl html2text graphviz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment