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
- 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
- Create the non-root user and group for RT
sudo groupadd --system rt && sudo useradd --system --home-dir=/opt/rt5/var --gid=rt rt
- Create the RT user home directory
sudo mkdir -p /opt/rt5/var
- Set ownership for the home directory
sudo chown -R rt:rt /opt/rt5
Part Two - Set Up The Database Server
- Access the mysql server and database
sudo mysql mysql
- Set a password for the root user
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('123');
- Flush the privileges to apply your changes
flush privileges;
- Exit mysql
exit;
Part Three - Install RT
- Switch to the RT user
sudo su rt -s /bin/bash
- Switch to the RT user home directory
cd ~
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)- Decompress
tar -xf rt-*
- Switch to the RT directory
cd rt-5.0.7/
- 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
- Make directories
make dirs
- Install and test dependencies
make fixdeps RT_FIX_DEPS_CMD="cpanm --local-lib-contained=/opt/rt5/local"
- Run the installer
make install
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;
- Initalize the database
make initialize-database
Provide the password for the mysqlroot
user you set earlier, probably '123' - 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)