Categories
Uncategorized

Install RT 4 on Ubuntu 16.04

These steps are for setting up a new Request Tracker instance on Ubuntu 16.04, the data is being migrated from another server. Don’t drop the database if you are not migrating data.

First install LAMP, then follow these steps.

  • sudo apt-get install mysql-server libdbd-mysql-perl libapache-dbi-perl
  • sudo apt-get install rt4-apache2 rt4-db-mysql
  • sudo apt-get install request-tracker4 rt4-clients
  • sudo cp /etc/request-tracker4/RT_SiteConfig.pm /etc/request-tracker4/RT_SiteConfig.pm.original
  • sudo nano /etc/request-tracker3.8/RT_SiteConfig.pm
  • if you check /etc/mysql/my.cnf it points to two other files
    • !includedir /etc/mysql/conf.d/
    • !includedir /etc/mysql/mysql.conf.d/  <–Edit the content of this this file
    • sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf
      • change max_allowed_packet = 16M to max_allowed_packet=256M
  • Drop existing db, mysql -u root -p
    • DROP DATABASE rtdb;
    • CREATE DATABASE rtdb
  • import rdtbbackup.sql into empty rtdb database
    • #mysql -u root -p rdtb < rtdbbackup.sql

Setup permissions for user rtuser

  • mysql -u root -p
    • find out the hashed password, SELECT PASSWORD(‘mypass’) copy  the hashed password and paste
    • GRANT USAGE ON *.* TO ‘rtuser’@’localhost’ IDENTIFIED BY PASSWORD ‘*longhashpassword’;
    • GRANT ALL PRIVILEGES ON `rtdb`.* TO ‘rtuser’@’localhost’;

Configure Apache:

  • sudo a2enmod rewrite
  • sudo ln -s /etc/request-tracker4/apache2-modperl2.conf /etc/apache2/sites-available/requesttracker.conf
  • a2ensite requesttracker.conf
  • service apache2 restart

Troubleshooting:

1.- Config file /etc/request-tracker/RT_SiteConfig.pm is locked

  • if you haven’t done so, restart mysql.  systemctl restart mysql
  • Also check apache logs, tail /var/log/apache2/error.log
  • Also check the RT_SiteConfig.pm file

2.- Not able to access db with rtuser

  • reset the rtuser password
    • UPDATE mysql.user
      SET authentication_string = PASSWORD(‘mynewpassword’), password_expired = ‘N’
      WHERE User = ‘rtuser’ AND Host = ‘localhost’;
      FLUSH PRIVILEGES;

3.- Able to create new tickets but unable to see any tickets

  • run:sudo /usr/sbin/rt-setup-database –dba root –prompt-for-dba-password –action upgrade
  • restart Apache, then restart mysql

2 replies on “Install RT 4 on Ubuntu 16.04”

mysql -u root -p rdtb < rtdbbackup.sql

rtdbbackup.sql: No such file or directory

This seems to to incomplete. Can you update ? Where is the .sql file to upload database.

I was migrating data from an older server. From the old server I exported the database and named it rtdbbackup.sql
If this is a clean install of RT don’t drop the existing database and there is nothing to import it either.