User:Bob.deleete/RT installation on Centos6 sandbox

From Request Tracker Wiki
Jump to navigation Jump to search

I have repeatedly built RT4 from source on fresh CentOS/Scientific Linux installs. In the months/years between each time I find myself doing this work, I forget exactly what I did. So, this page is a reminder for me, and another HOWTO for anyone working on the same thing. In the course of this work I've referred to the two manual installation guides already on this site, ManualInstallation and ManualRequirements.

In this case, I've got two fresh CentOS 6.4 installations (in the past I've done this on Scientific Linux, and presumably it works on RHEL although I've never done that). My goal is to install RT4 with many of the ./configure options enabled, and use PostgreSQL as the database. The two systems are called:

  • c6pg - the system with PostgreSQL
  • c6rt - the system with RT and Apache

Database Server (c6pg)

I'll start with c6pg. As I only did a base install, there are several things I like to add:

yum install mc nano lynx screen man man-pages
yum groupinstall 'Development tools'

note that in this one, some of things I pull in with the first command may be in the Development Tools group, but in my current test environment I didn't do the groupinstall first.

Also in my test environment, I'm using DHCP, and I want to be able to use hostnames rather than IP addresses. I modify the file


to make sure that the following lines are in there:


I use the PostgreSQL yum repository available from the PostgreSQL Global Development Group. The info is here: For this system, I installed the rpm that adds the repository:

yum install

Then I installed several packages made available through that:

yum update
yum install postgresql92 postgresql92-devel postgresql92-docs postgresql92-server postgresql92-contrib

Initialize the db, start the service, and set it to start with the operating system:

service postgresql-9.2 initdb
service postgresql-9.2 start
chkconfig postgresql-9.2 on

If you want to use the pre-packaged PostgreSQL, that will be fine. I suggest finding the equivalent packages using yum

yum search postgres

and then replace 'postgresql-9.2' in the 3 commands above with whatever RHEL/CentOS/Scientific call it.

PostgreSQL adds a user to the operating system, so you'll want to set its password. As root:

passwd postgres

You'll have to provide a password later when the RT installation process wants to create the database. This is another password yet, the database admin password. To set this, use the su command to switch from root to postgres, then use the psql command to get into the database. For me, this process looks like:

su -l postgres

now you're the postgres user on the OS


now you're in the database, and you can issue SQL commands.


the postgres user (in the db, not the operating system) now has a password


quit the postgresql cli


and you're back at a OS root prompt.

PostgreSQL has the difficult to understand (for me anyway!) pg_hba.conf file. First, I recommend backing up the original. I do (the path to the files will be a little different if you use CentOS's PostgreSQL):

cd /var/lib/pgsql/9.2/data/
cp pg_hba.conf pg_hba.conf.original

Then, I modified it as such:

nano pg_hba.conf

For my purposes here, I add this line at the end of the file:

host    all     all md5

In the same directory, I also modified the postgresql.conf file. Again, I first back up the original:

cp postgresql.conf postgresql.conf.original

and then make sure the following lines are uncommented and set properly:

listen_addresses = '*'
port = 5432

Do a restart of the PostgreSQL service, and this system should be done.

service postgresql-9.2 restart

RT/Web Server (c6rt)

This system started with a base CentOS install also. Building RT will require quite a few things. First I'll add Fedora's Extra Packages for Enterprise Linux (EPEL) repository. Information is here Find the section called "How can I use these extra packages?" and click the link for EL6. You'll go on to a page with a URL for an rpm called epel-release-6-8.noarch (currently -8, could be a higher number in the future). Fedora's wiki has a very impressive feature that links to a different mirror each time, so I've omitted the URL. Install this with a command like:

yum install

and install a bunch of rpms:

yum update

yum groupinstall 'Development tools'
yum install ncftp ftp gd gd-devel graphviz graphviz-devel httpd-devel mod_fcgid perl-devel perl-CPAN postgresql-devel \
 sqlite sqlite-devel openssl-devel

some of those things are needed because of the RT or Perl options I chose. You may be able to omit some of the them.

Now to get started with the RT installation. Get the latest RT tarball from the Best Practical site. Go to and look in the upper right corner. Currently it's rt-4.0.17.

I download this and move it to /usr/src. Extract the tarball with

tar zxpvf rt-4.0.17.tar.gz

then cd into the extracted source code

cd rt-4.0.17

You'll have to choose some configuration options. They can be seen by running

./configure --help

(to be completed)

for Talk page:


  • best practice on setting OS-level postgres password, and database admin password
  • best practice on MCPAN setup
  • authoritative info on best hba.conf
  • authoritative info on Apache config
  • https config?
  • info on lighttpd or alternative web servers