How to install OTRS 3.1 on CentOS 6.2 – Part 1

OTRS is the leading open-source Help Desk and IT Service Management (ITSM) solution used by thousands of organizations worldwide. This guide explains the steps involved in installing the latest OTRS release on a minimal CentOS 6.2 installation.

CentOS (Community ENTerprise Operating System) is an Enterprise-class Linux Distribution derived from sources freely provided to the public by a prominent North American Enterprise Linux vendor.

Due to the length of this guide, it had to be split in two parts. The first part will focus on getting CentOS 6.2 ready for the OTRS 3.1 installation, while the second part will be about installing and extending OTRS 3.1.

Part 1 – A minimal CentOS 6.2 install

Head over to and pick a nearby mirror. Download the CentOS-6.2-i386-minimal.iso installation media.
Verify the download against the provided md5 or sha1 checksum, the files are  located in the same directory as the iso files (md5sum.txt and sha1sum.txt).

md5sum CentOS-6.2-i386-minimal.iso | grep "cc4fbd16bd305f5bf6731b4b10f8fd18"
cc4fbd16bd305f5bf6731b4b10f8fd18  CentOS-6.2-i386-minimal.iso

sha1sum CentOS-6.2-i386-minimal.iso | grep "353d7e070a4cfc34148f9610b05cf1c55ad4fa57"
353d7e070a4cfc34148f9610b05cf1c55ad4fa57  CentOS-6.2-i386-minimal.iso

The download is valid if the checksums on line 2 and 5 are shown, if you get no result then the image is corrupt.

  1. Boot the installation media and choose Install or upgrade an existing system.

    CentOS 6.2 Install
    CentOS 6.2 Install
  2. Test the media, or skip and head directly to the installation.

    CentOS 6.2 media check
    CentOS 6.2 media check
  3. Installation commences.

    CentOS 6.2 - Start installation
    CentOS 6.2 – Start installation
  4. Select your language of choice.

    CentOS 6.2 - Select language
    CentOS 6.2 – Select language
  5. Select your keyboard layout.

    CentOS 6.2 - Keyboard layout
    CentOS 6.2 – Keyboard layout
  6. Choose installation device. Select the basic storage option (unless you know you have an enterprise storage solution that is).

    CentOS 6.2 - Installation device
    CentOS 6.2 – Installation device
  7. Storage device warning. This message will trigger by blank, unpartitioned or virtual devices. If that’s you then it’s safe to discard any data.

    CentOS 6.2 - Storage device warning
    CentOS 6.2 – Storage device warning
  8. Choose a hostname for your system and click the “Configure Network” button.

    CentOS 6.2 - Set hostname
    CentOS 6.2 – Set hostname
  9. Network configuration. The network connection will obviously depend on your network but in this (common) scenario we’re configuring the wired interface eth0. Click on the edit button for eth0 and tick the connect automatically option. Configure the IPv4 settings by selecting “Method”: Manual, then click “Add” to fill out the “Address”, “Netmask” and “Gateway” details. Finally add your DNS servers, and if applicable, domains.

    CentOS 6.2 - Network configuration
    CentOS 6.2 – Network configuration
  10. Select your timezone from the map.

    CentOS 6.2 - Select timezone
    CentOS 6.2 – Select timezone
  11. Set the root password.

    CentOS 6.2 - Set root password
    CentOS 6.2 – Set root password
  12. Select type of installation. Select the “Use all space” alternative if you’re not dual booting other systems on the same device.

    CentOS 6.2 - Installation type
    CentOS 6.2 – Installation type
  13. Write changes to disk. If you made any mistakes, this is the last point of return.

    CentOS 6.2 - Write configuration to disk
    CentOS 6.2 – Write configuration to disk
  14. CentOS 6.2 is installing, refill empty cups of coffee now.

    CentOS 6.2 - installation progress
    CentOS 6.2 – installation progress
  15. We’re done, reboot to fire up your new system.

    CentOS 6.2 - Installation completed
    CentOS 6.2 – Installation completed

Part 1.1 – CentOS 6.2 firewall / SELinux and additional packages

When the installation is finished, lets update the system by running the command:

yum update

Import the CentOS-6 GPG key when asked.
Disabling Security-Enhanced Linux (SELinux) is a requirement to get OTRS running, and I won’t be debating the topic further.
Edit the SELinux configuration with the command:

vi /etc/selinux/config

Change the directive SELINUX=enforcing to SELINUX=disabled. Then reboot the system to replace the current policy. Type the command:


which should now return the message: SELinux status: disabled

Install some programs and utilities that will be needed to further configure CentOS and OTRS with the command:

yum install system-config-firewall-tui mlocate wget vixie-cron logwatch make gcc gd gd-devel

# system-config-firewall-tui-1.2.27-5.el6.noarch : A text interface for basic firewall setup
# mlocate-0.22.2-3.el6.i686 : An utility for finding files by name
# wget-1.12-1.4.el6.i686 : A utility for retrieving files using the HTTP or FTP protocols
# crontabs-1.10-33.el6.noarch : Root crontab files used to schedule the execution of programs
# cronie-1.4.4-7.el6.i686 : Cron daemon for executing programs at set times
# logwatch-7.3.6-49.el6.noarch : A log file analysis program
# sendmail-8.14.4-8.el6.i686 : A widely used Mail Transport Agent (MTA)
# procmail-3.22-25.1.el6.i686 : Mail processing program
# make-3.81-19.el6.i686 : A GNU tool which simplifies the build process for users
# gcc-4.4.6-3.el6.i686 : Various compilers (C, C++, Objective-C, Java, …)
# gd-2.0.35-10.el6.i686 : A graphics library for quick creation of PNG or JPEG images
# gd-devel-2.0.35-10.el6.i686 : The development libraries and header files for gd

Configuring the firewall

The only inbound services we want to allow are ssh and apache, everything else will be closed down.
Let’s use the recently installed text interface for basic firewall configuration. Run the command:

  1. Make sure the firewall is enabled and select “Customize”.

    CentOS 6.2 - Customize firewall
    CentOS 6.2 – Customize firewall
  2. Trusted services, select SSH and WWW (HTTP). Navigate by using <Tab> / <Alt tab> and select with <Space>

    CentOS 6.2 - Trusted services
    CentOS 6.2 – Trusted services
  3. Other ports, we have no need for additional ports so continue forward.

    CentOS 6.2 - Select ports
    CentOS 6.2 – Select ports
  4. Trusted interfaces, do not select any trusted interfaces as that will allow full access to the system for that interface.

    CentOS 6.2 - Trusted interfaces
    CentOS 6.2 – Trusted interfaces
  5. Masquerading, not needed with this configuration.

    CentOS 6.2 - Masquerading
    CentOS 6.2 – Masquerading
  6. Port forwarding, not needed with this configuration.

    CentOS 6.2 - Port forwarding
    CentOS 6.2 – Port forwarding
  7. ICMP filter, no need to change anything.

    CentOS 6.2 - ICMP
    CentOS 6.2 – ICMP
  8. Custom rules, not needed with this configuration.

    CentOS 6.2 - Custom rules
    CentOS 6.2 – Custom rules
  9. Finish the firewall configuration by clicking “OK” when returned to the main screen, and select “Yes” to install the new rules.

    CentOS 6.2 - Install firewall rules
    CentOS 6.2 – Install firewall rules

Part 1.2 – Configuring services for CentOS 6.2

Lets start the cron daemon with the command:

service crond start

Update the file name database by running the command:


Configure logwatch, system log analyzer and reporter by running the command:

vi /usr/share/logwatch/default.conf/logwatch.conf

and set the directives:
MailTo =
Detail = 10 (the most detailed report)

Install the MySQL server

We’ll be using the chkconfig utility to configure which services are to be started in selected runlevels.

Code Information
0    Halt
1    Single-User mode
2    Multi-user mode console logins only (without networking)
3    Multi-User mode, console logins only
4    Not used/User-definable
5    Multi-User mode, with display manager as well as console logins (X11)
6    Reboot

The next four commands will take care of the following steps:
1) Install the MySQL server.
2) Configure the runlevels.
3) Start the MySQL server.
4) Secure the MySQL installation.

yum install mysql-server
chkconfig --levels 235 mysqld on
service mysqld start

When securing the MySQL installation, just set a root password and answer yes to the rest of the questions.

Install the Apache web server

The next tree commands will take care of the following steps:
1) Install the Apache web server.
2) Configure the runlevels.
3) Start the web server.

yum install httpd
chkconfig --levels 235 httpd on
service httpd start

Add our fqdn (fully qualified domain name) to /etc/hosts

Use the command

 vi /etc/hosts

For the domain the entry should look like this: otrs

This is necessary for certain programs to operate correctly and should match the output of the command: hostname -f. Alternatively you might check the contents of the file /etc/sysconfig/network

Configuring Sendmail

*This is not really needed as OTRS will be happy using an external SMTP server, so if you don’t want to use sendmail then just skip this step.
Sendmail is already installed due to dependencies, but we’ll need to install the configuration files with the command:

yum install sendmail-cf

I want to use a smart relay since the outgoing messages in my case will pass through a spam filter.
Lets edit the sendmail macro config file with the command:

vi /etc/mail/

Edit the SMART_HOST directive with your outgoing (external) mail server.
The entry should be in this format:

define(`SMART_HOST', `')dnl

That’s all there is to it. Now run the following commands to update the sendmail configuration and to restart the sendmail server.

service sendmail restart

Check your new configuration by sending a test mail:

mail -s "Hello from your new server" <Enter>
Text for body goes here <Enter>
<Ctrl +D>

Click here to continue reading part 2

Thank you for reading!
Feel free to waste more time by subscribing to my RSS feed or check out the human-readable sitemap for more content.

Related posts