Installing OTRS 2.14 (Open source Ticket Request System) on CentOS 4.4

OTRS is a trouble ticket system with many features to manage customer telephone calls and e-mails. The system is built to allow your support, sales, pre-sales, billing, internal IT, helpdesk, etc. department to react quickly to inbound inquiries. This How-To is specifically intended to help install and run OTRS (http://www.otrs.org). It is not intended to go over using, configuring, or administering OTRS. For those types of questions, please refer to the OTRS website.

The basic steps of this installation are:

1. Preparing the Operating System
2. Installing Perl dependencies
3. Preparing MySQL
4. Updating Apache
5. Installing OTRS

Preparing the Operating System

1. Install CentOS 4.4 Server Minimal (disable the firewall and SELinux)

2. Import the CentOS GPG key

rpm --import http://mirror.centos.org/centos/RPM-GPG-KEY-centos4

3. Install required packages

yum -y install gcc cpp glibc-devel glibc-headers glibc-kernheaders mysql mysql-server perl-DBD-MySQL perl-DBI mysql-devel e2fsprogs-devel krb5-devel openssl-devel zlib-devel openssl gd gd-devel freetype-devel libjpeg-devel libpng-devel xorg-x11-devel fontconfig-devel pkgconfig xorg-x11-libs expat-devel gdbm-devel perl-DBD-MySQL httpd-devel apr apr-devel apr-util apr-util-devel cyrus-sasl-devel db4-devel httpd httpd-suexec openldap-devel pcre-devel

4. Update all existing packages installed on the system

yum –y update

5. Clean out the yum cache to re-capture disk spaced used during the update process

yum clean all

Installing Perl dependencies

1. Start the MySQL database server

service mysqld start

2. Run cpan and perform a manual configuration(accept all dependencies that cpan pauses for)

cpan

3. Upgrade cpan by installing the CPAN Bundle

install Bundle::CPAN

4. Quit cpan to re-initialize it

quit

5. Run cpan to install perl dependencies

cpan (hit enter until you get to the cpan[1] prompt)

6. Commit cpan configuration changes

o conf commit

7. Install packages. The order is important, so install in this exact order.

install CGI Date::Pcalc Date::Format DBI DBD::mysql Digest::MD5 LWP::UserAgent MIME::Base64 MIME::Tools GSSAPI Net::DNS Authen::SASL IO::Socket::SSL Convert::ASN1 XML::SAX::Base

8. Install Net::LDAP package

install Net::LDAP

9. Install graphics related packages

install GD GD::Text GD::Graph XML::Parser PDF::API2 (select n for animated gif support)

10. Install Apache 2 bundle

install Bundle::Apache2

11. Install mod_perl2 package

install mod_perl2 (full path to apxs is /usr/sbin/apxs, skip both test suites)

12. Quit cpan

quit

Preparing MySQL

1. Login to MySQL

mysql -u root

2. Remove empty users from the user table

DELETE FROM mysql.user WHERE User = '';

3. Configure a password for the root user on localhost (replace passwd with an actual password)

SET PASSWORD FOR 'root'@'localhost' = PASSWORD('passwd');

4. Configure a password for the root user on the fully qualified domain name (replace passwd with an actual password and replace fqdn with the actual fully qualified domain name)

SET PASSWORD FOR 'root'@'fqdn' = PASSWORD('passwd');

5. Reload the changes that were just made

FLUSH PRIVILEGES;

6. Quit MySQL

quit

Updating Apache

1. Configure Apache to use mod_perl

vi /etc/httpd/conf/httpd.conf

2. Add the following:

LoadModule perl_module modules/mod_perl.so

3. Save and close the file.

4. Create an OTRS configuration file for Apache

vi /etc/httpd/conf.d/otrs.conf

5. Insert the following:

#
# Basic apache configuration file for OTRS
#
# agent, admin and customer frontend
#
ScriptAlias /otrs/ "/opt/otrs/bin/cgi-bin/"
Alias /otrs-web/ "/opt/otrs/var/httpd/htdocs/"
#
# Directory settings
#
<Directory "/opt/otrs/bin/cgi-bin/">
    AllowOverride None
    Options +ExecCGI -Includes
    Order allow,deny
    Allow from all
</Directory>
<Directory "/opt/otrs/var/httpd/htdocs/">
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

6. Save and close the file.

7. Start Apache

service httpd start

Installing OTRS

1. Change to a temporary directory, I used /usr/local/src as an example

cd /usr/local/src

2. Download OTRS with wget

wget ftp://ftp.otrs.org/pub/otrs/otrs-2.1.4.tar.gz

3. Add an OTRS user

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

4. Add the OTRS user to the apache group

usermod -G apache otrs

5. Change the permissions of the /opt/otrs directory

chmod g+x /opt/otrs

6. Extract the OTRS files downloaded earlier

tar zxvf otrs-2.1.4.tar.gz

7. Change directories into the extracted OTRS directory

cd otrs-2.1.4

8. Copy all the files to /opt/otrs

cp -R * /opt/otrs

9. Change directories to /opt/otrs/Kernel

cd /opt/otrs/Kernel

10. Copy the main config file, Config.pm.dist to Config.pm

cp Config.pm.dist Config.pm

11. Change directories to Config

cd Config

12. Create new files from the included samples

for foo in *.dist; do cp $foo `basename $foo .dist`; done

13. Change directories to /opt/otrs/bin

cd /opt/otrs/bin

14. Update permissions

./SetPermissions.sh /opt/otrs otrs apache apache apache

15. Confirm that all the perl modules are installed (should return with OK)

./otrs.checkModules

16. Confirm that the installer file exists (should return with OK)

perl -cw cgi-bin/installer.pl

17. Confirm that the postmaster file exists (should return with OK)

perl -cw PostMaster.pl

18. Change directories to /opt/otrs/var/cron

cd /opt/otrs/var/cron

19. Create new files from the included samples

for foo in `ls -1 *.dist` ; do cp $foo `basename $foo .dist`; done

20. Change directories to /opt/otrs/bin/

cd /opt/otrs/bin/

21. Switch to the OTRS user

su otrs

22. Create the cron entries for OTRS

./Cron.sh start

23. Switch back from the OTRS user

exit

24. Open the OTRS installer in a browser (Use the actual domain name/ip address, not the example one listed below)

http://www.domain.com/otrs/installer.pl

25. Accept the license by clicking accept license

26. Enter the following information:

Admin-user: root
Admin-Password: password entered in Prepare MySQL step 4
Host: localhost
Type: MySQL

User: otrs
Password: password entered in Prepare MySQL step 4
DB connect host: localhost
Name: otrs
Action: Create

27. Click Next

28. Click Next

29. Enter the following information:

SystemID: Choose any value
System FQDN: Enter FQDN
AdminEmail: Enter valid email address
Organization: Enter Organization name
LogModule: SysLog
LogFile: /tmp/otrs.log
Default CharSet: utf-8
Default Language: English
CheckMXRecord: Yes

30. Restart Apache

service httpd restart

31. Open OTRS in a browser (Use the actual domain name/ip address, not the example one listed below)

http://www.domain.com/otrs/index.pl

32. Login with the following credentials

Username: root@localhost
Password: root

Share this page:

9 Comment(s)