{"id":5146,"date":"2020-03-05T09:09:01","date_gmt":"2020-03-05T06:09:01","guid":{"rendered":"https:\/\/kifarunix.com\/?p=5146"},"modified":"2022-10-01T20:20:31","modified_gmt":"2022-10-01T17:20:31","slug":"install-request-tracker-rt-with-mariadb-on-centos-8","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/install-request-tracker-rt-with-mariadb-on-centos-8\/","title":{"rendered":"Install Request Tracker (RT) with MariaDB on CentOS 8"},"content":{"rendered":"\n

Welcome to our guide on how to install Request Tracker (RT) with MariaDB on CentOS 8. Request Tracker (RT)<\/a> 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.<\/p>\n\n\n\n

It supports seamless email integration, custom workflows, SLA automation and tracking etc. Read more about RT features<\/a>.<\/p>\n\n\n\n

Install Request Tracker (RT) with MariaDB on CentOS 8<\/h2>\n\n\n\n

Run System update<\/h3>\n\n\n\n

To begin with ensure that your system packages are up-to-date.<\/p>\n\n\n\n

dnf update<\/code><\/pre>\n\n\n\n

Disable SELinux<\/h3>\n\n\n\n

Well, I personally do not recommend this step, BUT<\/strong>, If you do not want to have deal with SELinux permissions denied, simply disable it by executing the command below;<\/p>\n\n\n\n

sed -i 's\/=enforcing\/=disabled\/' \/etc\/selinux\/config<\/code><\/pre>\n\n\n\n

Next, reboot the system to effect the SELinux disablement.<\/p>\n\n\n\n

systemctl reboot -i<\/code><\/pre>\n\n\n\n

Install Required Packages for RT<\/h3>\n\n\n\n

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).<\/p>\n\n\n\n

In this demo, we use MariaDB as a database backend and Apache as the Web server.<\/p>\n\n\n\n

Enable EPEL and PowerTools Repos as they contain some of the required dependencies.<\/p>\n\n\n\n

dnf config-manager --set-enabled PowerTools<\/code><\/pre>\n\n\n\n
dnf install https:\/\/dl.fedoraproject.org\/pub\/epel\/epel-release-latest-8.noarch.rpm<\/code><\/pre>\n\n\n\n

To install required packages, simply execute the command below.<\/p>\n\n\n\n

dnf install expat gd graphviz openssl expat-devel gd-devel \\\nopenssl-devel perl perl-CPAN perl-YAML wget screen \\\nmod_fcgid perl-libwww-perl perl-Plack perl-GD \\\nperl-GnuPG-Interface perl-GraphViz perl-Crypt-SMIME  \\\nperl-String-ShellQuote perl-Crypt-X509 perl-LWP-Protocol-https graphviz-deve<\/code>l spawn-fcgi<\/code><\/pre>\n\n\n\n
dnf groupinstall \"Development Tools\"<\/code><\/pre>\n\n\n\n

Install Apache Web server on CentOS 8<\/p>\n\n\n\n

dnf install httpd<\/code><\/pre>\n\n\n\n

Start and enable Apache to run on system boot.<\/p>\n\n\n\n

systemctl enable --now httpd<\/code><\/pre>\n\n\n\n

Install MariaDB on CentOS 8<\/p>\n\n\n\n

dnf install mariadb-server<\/code><\/pre>\n\n\n\n

Start and enable MariaDB to run on system boot.<\/p>\n\n\n\n

systemctl enable --now mariadb<\/code><\/pre>\n\n\n\n

Run the initial security script and remove test databases, anonymous user accounts, disable remote root login…<\/p>\n\n\n\n

mysql_secure_installation<\/code><\/pre>\n\n\n\n

You can as well install and use MariaDB 10.4 instead by following the guide below;<\/p>\n\n\n\n

Install MariaDB 10.4 on CentOS 8<\/a><\/p>\n\n\n\n

Install Mail Transfer Agent to allow RT route and deliver mails. Postfix is used in this guide.<\/p>\n\n\n\n

dnf -y install postfix<\/code><\/pre>\n\n\n\n

Install Request Tracker (RT) on CentOS 8<\/h3>\n\n\n\n

Download RT Tarball<\/h4>\n\n\n\n

In this guide, RT is installed on CentOS 8 from the source. As such, navigate to RT downloads page<\/a> and grab the latest version of RT archive.<\/p>\n\n\n\n

RT 4.4.4 is the latest stable release<\/a> as of this writing.<\/p>\n\n\n\n

Simply get the link from the downloads page and pull it using wget command as shown below;<\/p>\n\n\n\n

wget https:\/\/download.bestpractical.com\/pub\/rt\/release\/rt-4.4.4.tar.gz<\/code><\/pre>\n\n\n\n

To verify the integrity of the archive, calculate its hash (sha256) and compare it with the value available on the release page<\/a>.<\/p>\n\n\n\n

sha256sum rt-4.4.4.tar.gz<\/code><\/pre>\n\n\n\n
34c316a4a78d7ee9b95d4391530f9bb3ff3edd99ebbebfac6354ed173e940884  rt-4.4.4.tar.gz<\/code><\/pre>\n\n\n\n

Unpack RT Archive<\/h4>\n\n\n\n

Extract the RT tarball to some directory.<\/p>\n\n\n\n

tar xzf rt-4.4.4.tar.gz<\/code><\/pre>\n\n\n\n

Compile and Install RT on CentOS 8<\/h4>\n\n\n\n

Navigate to RT archive directory extracted above.<\/p>\n\n\n\n

cd rt-4.4.4<\/code><\/pre>\n\n\n\n

Next execute the configure<\/code> script to adapt RT to the system to ensure that all required dependencies to the build and install RT are available.<\/p>\n\n\n\n

Note that you can always set the your preferred options for configure script. Simply utilize the help page for the options to use.<\/p>\n\n\n\n

.\/configure --help<\/code><\/pre>\n\n\n\n

Ton run configure script with the default options, execute the command below. RT defaults to installing in \/opt\/rt4 with MySQL as its database.<\/p>\n\n\n\n

.\/configure<\/code><\/pre>\n\n\n\n

Once the configure script completes, run the command below to check for any Perl missing dependencies.<\/p>\n\n\n\n

make testdeps<\/code><\/pre>\n\n\n\n

This script will check if all required dependencies are available and report any that is missing.<\/p>\n\n\n\n

Fix missing RT dependencies either by installing the missing dependencies manually or simply executing the make fixdeps<\/code> command as a privileged user.<\/p>\n\n\n\n

However, before you can run the fixdeps command, you need to configure the CPAN shell.<\/p>\n\n\n\n

\/usr\/bin\/perl -MCPAN -e shell<\/code><\/pre>\n\n\n\n
...\nWould you like to configure as much as possible automatically? [yes] yes<\/strong><\/code><\/pre>\n\n\n\n

At the CPAN shell prompt, type quit to exit the shell.<\/p>\n\n\n\n

...\ncpan shell -- CPAN exploration and modules installation (v2.18)\nEnter 'h' for help.\ncpan[1]> quit<\/strong><\/code><\/pre>\n\n\n\n

Also, CPAN has a tool called cpanm<\/code> that can help the make fixdeps<\/code> command install dependencies. Thus install this tool and set RT to use it to fix deps.<\/p>\n\n\n\n

To install cpanm<\/code>, execute the commands below;<\/p>\n\n\n\n

curl -L https:\/\/cpanmin.us | perl - --sudo App::cpanminus<\/code><\/pre>\n\n\n\n
cpanm --self-upgrade --sudo<\/code><\/pre>\n\n\n\n
which cpanm\n\/usr\/local\/bin\/cpanm<\/strong><\/code><\/pre>\n\n\n\n
export RT_FIX_DEPS_CMD=\/usr\/local\/bin\/cpanm<\/code><\/pre>\n\n\n\n

Next, run the fixdeps command;<\/p>\n\n\n\n

make fixdeps<\/code><\/pre>\n\n\n\n

The command may take sometime as it tries to fix the missing dependencies. Ensure that all the dependency issues is sorted before you can proceed.<\/p>\n\n\n\n

You can always install or reinstall or force the installation of dependencies using cpanm.<\/p>\n\n\n\n

For example, assume you have a few missing dependencies after running the make fixdeps<\/code> command;<\/p>\n\n\n\n

make testdeps | grep -i missing<\/code><\/pre>\n\n\n\n
\n\tHTML::FormatText::WithLinks >= 0.14 ...MISSING\n\tPlack::Handler::Starlet ...MISSING\n\tHTML::FormatText::WithLinks::AndTables >= 0.06 ...MISSING\nSOME DEPENDENCIES WERE MISSING.\nCORE missing dependencies:\n\tHTML::FormatText::WithLinks >= 0.14 ...MISSING\n\tPlack::Handler::Starlet ...MISSING\n\tHTML::FormatText::WithLinks::AndTables >= 0.06 ...MISSING\nmake: *** [Makefile:272: testdeps] Error 1\n<\/code><\/pre>\n\n\n\n

You can thus install these missing dependencies using cpanm<\/code>.<\/p>\n\n\n\n

cpanm --install Plack::Handler::Starlet<\/code><\/pre>\n\n\n\n
cpanm --install HTML::FormatText::WithLinks<\/code><\/pre>\n\n\n\n
cpanm --install HTML::FormatText::WithLinks::AndTables<\/code><\/pre>\n\n\n\n

Check missing dependencies again;<\/p>\n\n\n\n

make testdeps<\/code><\/pre>\n\n\n\n
\n...\nMAILGATE dependencies:\n\tLWP::Protocol::https ...found\n\tPod::Usage ...found\n\tLWP::UserAgent >= 6.02 ...found\n\tMozilla::CA ...found\n\tGetopt::Long ...found\nMYSQL dependencies:\n\tDBD::mysql >= 2.1018 ...found\nSMIME dependencies:\n\tCrypt::X509 ...found\n\tFile::Which ...found\n\tString::ShellQuote ...found\n\nAll dependencies have been found.\n<\/code><\/pre>\n\n\n\n

If you get the last line, All dependencies have been found<\/strong>, you are good to go.<\/p>\n\n\n\n

Once the dependencies issue is sorted, install RT. Note that this command will install RT on the \/opt\/rt4<\/strong><\/code> directory.<\/p>\n\n\n\n

make install<\/code><\/pre>\n\n\n\n
\n...\nCongratulations. RT is now installed.\n\n\nYou must now configure RT by editing \/opt\/rt4\/etc\/RT_SiteConfig.pm<\/strong>.\n\n(You will definitely need to set RT's database password in \n\/opt\/rt4\/etc\/RT_SiteConfig.pm before continuing. Not doing so could be \nvery dangerous.  Note that you do not have to manually add a \ndatabase user or set up a database for RT.  These actions will be \ntaken care of in the next step.)\n\nAfter that, you need to initialize RT's database by running\n 'make initialize-database'\n<\/code><\/pre>\n\n\n\n

Configuring RT from Web Interface<\/h3>\n\n\n\n

After the installation completes, you can now proceed to configure RT via web interface by running it on a standalone mode.<\/p>\n\n\n\n

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.<\/p>\n\n\n\n

firewall-cmd --add-port=80\/tcp --permanent<\/code><\/pre>\n\n\n\n
firewall-cmd --reload<\/code><\/pre>\n\n\n\n

To be able to access RT from browser, stop your web server is running and run the script below.<\/p>\n\n\n\n

systemctl stop httpd<\/code><\/pre>\n\n\n\n
\/opt\/rt4\/sbin\/rt-server<\/code><\/pre>\n\n\n\n

If using a custom port, be sure to open the port on firewall and specify the port using rt-server script above.<\/p>\n\n\n\n

\/opt\/rt4\/sbin\/rt-server --port 8080<\/code><\/pre>\n\n\n\n
...\nHTTP::Server::PSGI: Accepting connections at http:\/\/0:80\/<\/strong><\/code><\/pre>\n\n\n\n

Access RT from browser to proceed with configuration. Note it accepting connections on http:\/\/0:80\/<\/strong> in our case. Hence can access it using IP address or resolvable hostname of your server, http:\/\/server_IP_OR_hostname<\/strong><\/code>.<\/p>\n\n\n\n

Configure Database Connection Settings<\/h3>\n\n\n\n

From the RT interface, click Let's go!<\/strong> to select the database type. MySQL\/MariaDB is used in this guide.<\/p>\n\n\n\n

\"Choose<\/figure>\n\n\n\n

Click Next to create RT database and database user. Ensure you provide credentials for administrative user.<\/p>\n\n\n\n

\"Create<\/figure>\n\n\n\n

To verify database connection, click Check Database Connectivity<\/strong>.<\/p>\n\n\n\n

\"RT<\/figure>\n\n\n\n

Customize RT<\/h3>\n\n\n\n

Click Next to customize your RT with the most basic configurations needed to get it up and running.<\/p>\n\n\n\n

\"RT<\/figure>\n\n\n\n

Set the path to your MTA and RT admin email.<\/p>\n\n\n\n

\"RT<\/figure>\n\n\n\n

Set the comments and correspondences addresses.<\/p>\n\n\n\n

\"RT<\/figure>\n\n\n\n

Click Initialize the database to create RT's database and insert initial metadata.<\/p>\n\n\n\n

Once the database is initialized, click Finish installation<\/strong> to complete the setup.<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

You are then taken to RT login page.<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

Note that RT is still running on standalone mode. Press Ctrl+c from the terminal to stop the \/opt\/rt4\/sbin\/rt-server<\/code><\/strong> script and proceed to configure web server for RT.<\/p>\n\n\n\n

Configure RT Web Server on CentOS 8<\/h3>\n\n\n\n

Edit the \/etc\/httpd\/conf.d\/fcgid.conf<\/strong><\/code> configuration file and add the line,FcgidMaxRequestLen 1073741824<\/code>, to define maximum HTTP request length.<\/p>\n\n\n\n

vim \/etc\/httpd\/conf.d\/fcgid.conf<\/code><\/pre>\n\n\n\n
\n...\n# Use FastCGI to process .fcg .fcgi & .fpl scripts\nAddHandler fcgid-script fcg fcgi fpl\n\n# Sane place to put sockets and shared memory file\nFcgidIPCDir \/run\/mod_fcgid\nFcgidProcessTableFile \/run\/mod_fcgid\/fcgid_shm\nFcgidMaxRequestLen 1073741824<\/strong>\n<\/code><\/pre>\n\n\n\n

Create RT web configuration file with the content below;<\/p>\n\n\n\n

vim \/etc\/httpd\/conf.d\/rt.kifarunix-demo.com.conf<\/code><\/pre>\n\n\n\n
\n<VirtualHost rt.kifarunix-demo.com:80>\n    AddDefaultCharset UTF-8\n\n    ScriptAlias \/ \/opt\/rt4\/sbin\/rt-server.fcgi\/\n\n    DocumentRoot \"\/opt\/rt4\/share\/html\"\n    <Location \/>\n        Require all granted\n\n        Options +ExecCGI\n        AddHandler fcgid-script fcgi\n    <\/Location>\n<\/VirtualHost>\n<\/code><\/pre>\n\n\n\n

Save the configuration file and quit.<\/p>\n\n\n\n

Check for Apache syntax errors.<\/p>\n\n\n\n

httpd -t<\/code><\/pre>\n\n\n\n
Syntax OK<\/code><\/pre>\n\n\n\n

Configure RT Logging<\/h3>\n\n\n\n

Logging in RT is controlled from SiteConfig configuration file. There are multiple logging options for RT as described on LogsConfig Wiki<\/a>. However, we are going to configure RT logging to a file in this guide.<\/p>\n\n\n\n

Open the RT_SiteConfig.pm<\/strong><\/code> configuration file for editing.<\/p>\n\n\n\n

vim \/opt\/rt4\/etc\/RT_SiteConfig.pm<\/code><\/pre>\n\n\n\n

At the end of configuration files, insert the following lines making appropriate changes as per your environment setup.<\/p>\n\n\n\n

Set($LogToFile,      'debug');\nSet($LogToFileNamed, 'rt.kifarunix-demo.com.log');\nSet($LogDir,         '\/var\/log\/rt4');<\/code><\/pre>\n\n\n\n

Save and quit the configuration file.<\/p>\n\n\n\n

Check the configuration syntax;<\/p>\n\n\n\n

perl -c \/opt\/rt4\/etc\/RT_SiteConfig.pm<\/code><\/pre>\n\n\n\n

Create the Logging directory as specified by the $LogDir<\/strong> parameter.<\/p>\n\n\n\n

mkdir \/var\/log\/rt4<\/code><\/pre>\n\n\n\n

Ensure that the owner of the logging directory is Apache;<\/p>\n\n\n\n

chown -R apache:apache \/var\/log\/rt4<\/code><\/pre>\n\n\n\n

Be sure to always check this configuration file for any RT errors<\/strong>.<\/p>\n\n\n\n

Start Apache<\/p>\n\n\n\n

systemctl start httpd<\/code><\/pre>\n\n\n\n

Accessing RT<\/h3>\n\n\n\n

You can now access your RT from browser using the address http:\/\/rt-server-IP_OR_hostname<\/code>.<\/p>\n\n\n\n

Use root<\/code><\/strong> as the username and password configured while setting up RT.<\/p>\n\n\n\n

\"RT<\/figure>\n\n\n\n

When you successfully log in, you land on RT at a glance web interface.<\/p>\n\n\n\n

\"RT<\/figure>\n\n\n\n

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.<\/p>\n\n\n\n

That marks the end of our guide on how to install Request Tracker (RT) with MariaDB on CentOS 8.<\/p>\n\n\n\n

Reference<\/h3>\n\n\n\n

RT 4.4.4 Documentation README<\/a><\/p>\n\n\n\n

Other Tutorials<\/h3>\n\n\n\n

Install and Setup HAProxy on CentOS 8<\/a><\/p>\n\n\n\n

Install and Configure SNMP on CentOS 8<\/a><\/p>\n\n\n\n

Configure BIND DNS Server using Webmin on CentOS 8<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"

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<\/p>\n","protected":false},"author":3,"featured_media":14257,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[121,1323,1322],"tags":[1326,1325,1327,1839,1324,1328],"class_list":["post-5146","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-howtos","category-request-tracker-rt","category-ticketing-systems","tag-install-rt-on-centos-8","tag-request-tracker","tag-request-tracker-centos-8","tag-request-tracker-selinux-permissions","tag-rt","tag-ticketing-system","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-50","resize-featured-image"],"_links":{"self":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/5146"}],"collection":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/comments?post=5146"}],"version-history":[{"count":12,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/5146\/revisions"}],"predecessor-version":[{"id":14258,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/5146\/revisions\/14258"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media\/14257"}],"wp:attachment":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media?parent=5146"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/categories?post=5146"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/tags?post=5146"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}