Current revision updated by nfarley8 on
Originally created by nfarley8 on

This documentation is cribbed together from the RT documentation and their wiki. This will get a basic RT instance running locally; this should not be used for installing RT on a production or development environment. It is meant simply to familiarize yourself with the process.

Prerequisistes
  • An Ubuntu linux VM that you have SSH and sudo access on.
    • Preferably, a local domain set up for said VM. I like orbstack.
Part One - Base System
  1. SSH into the VM and install the dependencies:
    sudo apt update && \
    sudo apt install -y \
        autoconf \
        build-essential \
        cpanminus \
        curl \
        libexpat-dev \
        libgd-dev \
        libssl-dev \
        libz-dev \
        gnupg \
        graphviz \
        multiwatch \
        openssl \
        perl \
        w3m \
        mariadb-server \
        nano
  2. Create the non-root user and group for RT
    sudo groupadd --system rt && sudo useradd --system --home-dir=/opt/rt5/var --gid=rt rt
  3. Create the RT user home directory
    sudo mkdir -p /opt/rt5/var
  4. Set ownership for the home directory
    sudo chown -R rt:rt /opt/rt5
Part Two - Set Up The Database Server
  1. Access the mysql server and database
    sudo mysql mysql
  2. Set a password for the root user
    SET PASSWORD FOR 'root'@'localhost' = PASSWORD('123');
  3. Flush the privileges to apply your changes
    flush privileges;
  4. Exit mysql
    exit;
Part Three - Install RT
  1. Switch to the RT user
    sudo su rt -s /bin/bash
  2. Switch to the RT user home directory
    cd ~
  3. Get RT

    curl -O https://download.bestpractical.com/pub/rt/release/rt-5.0.7.tar.gz
    (update the version number in the url with the most recent version, 5.0.7 as of this writing)

  4. Decompress
    tar -xf rt-*
  5. Switch to the RT directory
    cd rt-5.0.7/
  6. Run initial configuration
    PERL="/usr/bin/env -S perl -I/opt/rt5/local/lib/perl5" \
    ./configure \
        --prefix=/opt/rt5 \
        --with-db-type=MariaDB \
        --with-web-user=rt \
        --with-web-group=rt \
        --with-attachment-store=disk \
        --with-bin-owner=rt \
        --with-libs-owner=rt \
        --with-libs-group=rt \
        --with-db-dba=root
  7. Make directories
    make dirs
  8. Install and test dependencies
    make fixdeps RT_FIX_DEPS_CMD="cpanm --local-lib-contained=/opt/rt5/local"
  9. Run the installer
    make install
  10. Update the configuration file:
    nano /opt/rt5/etc/RT_SiteConfig.pm
    Replace the contents of this file with:
    Set($rtname, 'ubuntu.orb.local'); # Update with your VMs domain name or IP address
    Set($Organization, 'ubuntu.orb.local'); # Update with your VMs domain name or IP address
    Set($WebDomain, 'ubuntu.orb.local'); # Update with your VMs domain name or IP address
    Set($WebPort, '80');
    #Set($WebPath, '/rt');

    Set($DatabaseUser, 'rt_user');
    Set($DatabasePassword, 'YourPassphraseHere');
    Set($DatabaseHost, 'localhost');
    Set($DatabasePort, undef);

    Set($DatabaseName, 'rt5');
    Set($DatabaseAdmin, 'root');

    Set($LogToSyslog, 'warning');

    Set($LogToSTDERR, 'warning');

    Set(%GnuPG, 'Enable' => '0');
    Set(%SMIME, 'Enable' => '0');

    1;

  11. Initalize the database
    make initialize-database
    Provide the password for the mysql root user you set earlier, probably '123'
  12. Test the RT installation
    /opt/rt5/sbin/rt-server --port 9000
    (We use port 9000 because ports under 1024 require root access, which this user does not have)
Identifier Categories
Specific categories