Installing OTRS helpdesk

There are some cool help desk solutions on the market but once again open source comes to the forefront.

We have been running the OTRS software for six months now. When I first installed it I forgot to write down how I did it. We wanted to upgrade the software to the newest level so I took the opportunity to write down how you install it ūüôā

The install guide is good and much of what you read is based on this, there are as usual gaps in the documentation as always there is an assumption of prior knowledge. The assumption that I am making for this guide is that you have a reasonable level of Linux knowledge enough to navigate and create file, folders and a knowledge of one of the editors, I use vi but you can use what you like.

This is being build in Amazon and the backend database is Amazon Mysql RDS. At the time of writing the releases were 3.1.7 for the helpdesk and 3.1.4 for the ITSM module.

mkdir -p /opt/software
cd /opt/software


We need apache and a mysql client and server, you just need client if your mysql instance and the devel package for some of the dependacies

yum install -y httpd mysql mysql-develgd gd-devel make libtool

Needed if you plan on installing perl modules

yum install -y perl-CPAN
rpm -i otrs-3.1.7-01.noarch.rpm

This may get you an error

error: Failed dependencies:
perl-core is needed by otrs-3.2.11-01.noarch
perl(DBI) is needed by otrs-3.2.11-01.noarch
perl(Crypt::SSLeay) is needed by otrs-3.2.11-01.noarch
perl(Net::LDAP) is needed by otrs-3.2.11-01.noarch
mod_perl is needed by otrs-3.2.11-01.noarch
perl(Net::DNS) is needed by otrs-3.2.11-01.noarch
perl(XML::Parser) is needed by otrs-3.2.11-01.noarch

yum install perl-core mod_perl

There is a need for open ssl for some of the modules

yum install -y openssl openssl-devel

These are need ed for the XML::parser Рyou also need it if you ever get this error trying to install the modules by hand Expat.xs:12:19: fatal error: expat.h

yum install -y expat expat-devel

These add some of the other dependencies listed above

yum install -y perl-XML-parse* perl-crypt* perl-LDAP perl-net-DNS

You can check for the modules required

Test your system to see if everything is OK

perl /opt/otrs/bin/

I have include all of the ones that were needed at the time of writing, please not that I am connecting to a mysql database.

There is a good chance that you will be missing some modules

perl -MCPAN -e 'shell'

You will be taken through some install steps, answer yes to all of it

At the cpan command prompt use the following command to install the modules the module names will be in the format as per the example. This was what was missing from my server.


You may get the following message when installing the modules

Shall I follow them and prepend them to the queue
of modules we are processing right now? [yes] yes

These are the ones that are required.

NOTE INSTALL ONE AT TIME AND NOTE FOR ERRORS. If you have followed the installation above you should have all of the dependencies install.  

install YAML
install Crypt::SSLeay
install Net::LDAP
install Net::DNS
force install XML::Parser
install GD::Text
install GD::Graph
install GD::Text::Align
install JSON::XS
install Text::CSV_XS
install SOAP::Lite
install PDF::API2 

install DBD::mysql
install Mail::IMAPClient
install YAML::XS

Some times there are some errors, this is through the make test and are not really errors, if you get this then

force install MODULE_NAME

useradd -d /opt/otrs/ -c 'OTRS user' otrs

You need to change apache to which ever usergoup is associated with the user that will run apache
To find this information, you need to find the httpd.conf file. If you used yum the chances are that it can be found here

more /etc/httpd/conf/httpd.conf

Look for the line
# If you wish httpd to run as a different user or group, you must run
# httpd as root initially and it will switch.

Make a note of the user and group entries


Add the otrs user to the apache group

usermod -G apache otrs

cd /opt/otrs/
cp Kernel/ Kernel/
cp Kernel/Config/ Kernel/Config/
perl -cw /opt/otrs/bin/cgi-bin/ /opt/otrs/bin/cgi-bin/
perl -cw /opt/otrs/bin/ /opt/otrs/bin/

You should get syntax OK

Replace the bold part with the user and groups that you have for your system

bin/ --otrs-user=otrs --web-user=apache --otrs-group=apache --web-group=apache /opt/otrs
vi /etc/httpd/conf/httpd.conf

find mod_perl and add the following lines

# agent, admin and customer frontend
 ScriptAlias /otrs/ "/opt/otrs/bin/cgi-bin/"
 Alias /otrs-web/ "/opt/otrs/var/httpd/htdocs/"
# load all otrs modules
 Perlrequire /opt/otrs/scripts/
# Apache::Reload - Reload Perl Modules when Changed on Disk
 PerlModule Apache2::Reload
 PerlInitHandler Apache2::Reload
 PerlModule Apache2::RequestRec
# set mod_perl2 options
 <Location /otrs>
 # ErrorDocument 403 /otrs/
 ErrorDocument 403 /otrs/
 SetHandler perl-script
 PerlResponseHandler ModPerl::Registry
 Options +ExecCGI
 PerlOptions +ParseHeaders
 PerlOptions +SetupEnv
 Order allow,deny
 Allow from all

There was an issue when using the web installer to install the database, this therefore needs to be done by hand. New installs my not have the same issue. You can try by going to


Before navigating to the set-up screen the last thing that you need to do is create a database and user for otrs. The database is otrs and the user also is otrs

mysql -u mysql system root name -p -h Mysql Server hostname (Localhost if on same server)
create database otrs;
create user "otrs"@`localhost` identified by "password";
create user "otrs"@`%`identified by "password";
grant all on otrs.* to 'otrs'@'localhost' with grant option;
grant all on otrs.* to 'otrs'@'%' with grant option;

Exit from mysql command can then

cd /opt/otrs/scripts/database
mysql -u otrs username -p -h Mysql Server hostname (Localhost if on same server)
use otrs
source otrs-schema.mysql.sql
source otrs-initial_insert.mysql.sql
source otrs-schema-post.mysql.sql


The last part that has to be done is modifying the connection document

vi /opt/otrs/Kernel/

Find the following lines and amend

# The database host
$Self->{DatabaseHost} = ‘localhost’;

# The database name
$Self->{Database} = ‘otrs’;

# The database user
$Self->{DatabaseUser} = ‘otrs’;

# The password of database user. You also can use bin/
# for crypted passwords
$Self->{DatabasePw} = ‘some-pass’;

For now just use a plain text password, we will encrypt the password later.


OK now start the services

service httpd start
service otrs start


Now you can navigate to



You use the following credentials

Username – root@localhost

Password – root




These notes were done not directly into WordPress and usual, so there maybe one or two errors with the steps at the end concerning the creation of the database etc.. but these will be very minor errors.

Installing ITSM is done via the web interface. I would strongly recommend downloading and installing this module also.

UPGRADING to 3.1 (this could be upgrading to an version though, always read the UPGRADE notes)

service otrs stop
service httpd stop 
mkdir /software/otrsbackup
cp /opt/otrs/Kernel/ /software/otrsbackup/
 cp /opt/otrs/Kernel/Config/ /software/otrsbackup/
 cp /opt/otrs/Kernel/Config/Files/ /software/otrsbackup/
 cp -R /opt/otrs/var /software/otrsbackup/

Download the new RPM

rpm -i New RPM that was downloaded
cd /opt/otrs/scripts
mysql otrs -u otrs -p -h Hostname-MySQL-Server < DBUpdate-to-3.1.mysql.sql 
mysql otrs -u otrs -p -h Hostname-MySQL-Server < DBUpdate-to-3.1-post.mysql.sql 
cd ..

2 Comments on “Installing OTRS helpdesk”

  1. edwin says:

    you can help how i am deply app otrs using oracle datase

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s