Welcome to our guide on how to install Request Tracker (RT) with MariaDB on CentOS 8. Request Tracker (RT) is an enterprise-grade issue tracking/ticketing system that allows organizations to keep track of various tasks to be done, tasks completed, and when tasks were (or weren’t) completed.
It supports seamless email integration, custom workflows, SLA automation and tracking etc. Read more about RT features.
Install Request Tracker (RT) with MariaDB on CentOS 8
Run System update
To begin with ensure that your system packages are up-to-date.
dnf update
Disable SELinux
Well, I personally do not recommend this step, BUT, If you do not want to have deal with SELinux permissions denied, simply disable it by executing the command below;
sed -i 's/=enforcing/=disabled/' /etc/selinux/config
Next, reboot the system to effect the SELinux disablement.
systemctl reboot -i
Install Required Packages for RT
Request Tracker (RT) requires quite a number of packages in order to run. These include Perl and some perl modules, a web server (Nginx or Apache), a backend database (MySQL/MariaDB, PostgreSQL, SQLite, Oracle).
In this demo, we use MariaDB as a database backend and Apache as the Web server.
Enable EPEL and PowerTools Repos as they contain some of the required dependencies.
Next execute the configure script to adapt RT to the system to ensure that all required dependencies to the build and install RT are available.
Note that you can always set the your preferred options for configure script. Simply utilize the help page for the options to use.
./configure --help
Ton run configure script with the default options, execute the command below. RT defaults to installing in /opt/rt4 with MySQL as its database.
./configure
Once the configure script completes, run the command below to check for any Perl missing dependencies.
make testdeps
This script will check if all required dependencies are available and report any that is missing.
Fix missing RT dependencies either by installing the missing dependencies manually or simply executing the make fixdeps command as a privileged user.
However, before you can run the fixdeps command, you need to configure the CPAN shell.
/usr/bin/perl -MCPAN -e shell
...
Would you like to configure as much as possible automatically? [yes] yes
At the CPAN shell prompt, type quit to exit the shell.
...
cpan shell -- CPAN exploration and modules installation (v2.18)
Enter 'h' for help.
cpan[1]> quit
Also, CPAN has a tool called cpanm that can help the make fixdeps command install dependencies. Thus install this tool and set RT to use it to fix deps.
...
MAILGATE dependencies:
LWP::Protocol::https ...found
Pod::Usage ...found
LWP::UserAgent >= 6.02 ...found
Mozilla::CA ...found
Getopt::Long ...found
MYSQL dependencies:
DBD::mysql >= 2.1018 ...found
SMIME dependencies:
Crypt::X509 ...found
File::Which ...found
String::ShellQuote ...found
All dependencies have been found.
If you get the last line, All dependencies have been found, you are good to go.
Once the dependencies issue is sorted, install RT. Note that this command will install RT on the /opt/rt4 directory.
make install
...
Congratulations. RT is now installed.
You must now configure RT by editing /opt/rt4/etc/RT_SiteConfig.pm.
(You will definitely need to set RT's database password in
/opt/rt4/etc/RT_SiteConfig.pm before continuing. Not doing so could be
very dangerous. Note that you do not have to manually add a
database user or set up a database for RT. These actions will be
taken care of in the next step.)
After that, you need to initialize RT's database by running
'make initialize-database'
Configuring RT from Web Interface
After the installation completes, you can now proceed to configure RT via web interface by running it on a standalone mode.
To enable external access to RT, open web server port on firewall. In this demo, we are using port 80/tcp. Hence, execute the command below to open port 80 on firewall.
firewall-cmd --add-port=80/tcp --permanent
firewall-cmd --reload
To be able to access RT from browser, stop your web server is running and run the script below.
systemctl stop httpd
/opt/rt4/sbin/rt-server
If using a custom port, be sure to open the port on firewall and specify the port using rt-server script above.
/opt/rt4/sbin/rt-server --port 8080
...
HTTP::Server::PSGI: Accepting connections at http://0:80/
Access RT from browser to proceed with configuration. Note it accepting connections on http://0:80/ in our case. Hence can access it using IP address or resolvable hostname of your server, http://server_IP_OR_hostname.
Configure Database Connection Settings
From the RT interface, click Let's go! to select the database type. MySQL/MariaDB is used in this guide.
Click Next to create RT database and database user. Ensure you provide credentials for administrative user.
To verify database connection, click Check Database Connectivity.
Customize RT
Click Next to customize your RT with the most basic configurations needed to get it up and running.
Set the path to your MTA and RT admin email.
Set the comments and correspondences addresses.
Click Initialize the database to create RT's database and insert initial metadata.
Once the database is initialized, click Finish installation to complete the setup.
You are then taken to RT login page.
Note that RT is still running on standalone mode. Press Ctrl+c from the terminal to stop the /opt/rt4/sbin/rt-server script and proceed to configure web server for RT.
Configure RT Web Server on CentOS 8
Edit the /etc/httpd/conf.d/fcgid.conf configuration file and add the line,FcgidMaxRequestLen 1073741824, to define maximum HTTP request length.
vim /etc/httpd/conf.d/fcgid.conf
...
# Use FastCGI to process .fcg .fcgi & .fpl scripts
AddHandler fcgid-script fcg fcgi fpl
# Sane place to put sockets and shared memory file
FcgidIPCDir /run/mod_fcgid
FcgidProcessTableFile /run/mod_fcgid/fcgid_shm
FcgidMaxRequestLen 1073741824
Create RT web configuration file with the content below;
Logging in RT is controlled from SiteConfig configuration file. There are multiple logging options for RT as described on LogsConfig Wiki. However, we are going to configure RT logging to a file in this guide.
Open the RT_SiteConfig.pm configuration file for editing.
vim /opt/rt4/etc/RT_SiteConfig.pm
At the end of configuration files, insert the following lines making appropriate changes as per your environment setup.
Create the Logging directory as specified by the $LogDir parameter.
mkdir /var/log/rt4
Ensure that the owner of the logging directory is Apache;
chown -R apache:apache /var/log/rt4
Be sure to always check this configuration file for any RT errors.
Start Apache
systemctl start httpd
Accessing RT
You can now access your RT from browser using the address http://rt-server-IP_OR_hostname.
Use root as the username and password configured while setting up RT.
When you successfully log in, you land on RT at a glance web interface.
RT is now installed and running. However, for it to be useable, there is quite a lot that needs to be done. We will cover how to configure RT in our next guides.
That marks the end of our guide on how to install Request Tracker (RT) with MariaDB on CentOS 8.
We're passionate about sharing our knowledge and experiences with you through our blog. If you appreciate our efforts, consider buying us a virtual coffee. Your support keeps us motivated and enables us to continually improve, ensuring that we can provide you with the best content possible. Thank you for being a coffee-fueled champion of our work!
gen_too
Co-founder of Kifarunix.com, Linux Tips and Tutorials.
Linux/Unix admin and author at Kifarunix.com.