Installation of OTRS 3.0 on CentOS 5.5

From OtterHub - OTRS Community Wiki
Jump to: navigation, search

How To install OTRS 3.06 on CentOS 5.5

Minimum prerequisites

A basic install of CentOS 5.5 with these settings:

  • CentOS SELinux is set to permissive.
  • CentOS firewall must have HTTP as trusted.

OTRS requires a properly configured & running Apache webserver & backend database. The basic install of CentOS 5.5 included an Apache install with no database. Steps are provided below to do a basic configuration of Apache & MySQL (my current database of choice).

System will need a working Internet connection.

Apache

Verify that Apache (httpd) is installed by using the below command. Confirm that httpd<something> is under installed packages.

# yum list httpd
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * addons: mirror.trouble-free.net
 * base: mirror.steadfast.net
 * extras: mirror.trouble-free.net
 * updates: styx.biochem.wfubmc.edu
Installed Packages
httpd.x86_64                    2.2.3-43.el5.centos                    installed

Verify default run level of httpd:

# chkconfig --list httpd
httpd           0:off   1:off   2:off   3:off   4:off   5:off   6:off

Enable httpd on run levels:

# chkconfig httpd on

Verify run levels enabled for httpd:

# chkconfig --list httpd
httpd           0:off   1:off   2:on    3:on    4:on    5:on    6:off

Start httpd:

# service httpd start

MySQL

I installed MySQL (mysqld) using yum versus RPM or source. You can use a group command to install MySQL group or select individual packages. I opted for individual packages.

I provided steps for individual and group install below.

Install MySQL Database group

Use yum to query which packages are available in MySQL group to determine whether you want group install:

# yum groupinfo 'MySQL Database'
Loaded plugins: fastestmirror
Setting up Group Process
Loading mirror speeds from cached hostfile
 * addons: mirror.steadfast.net
 * base: mirror.nexcess.net
 * extras: mirror.steadfast.net
 * updates: mirrors.gigenet.com

Group: MySQL Database
 Description: This package group contains packages useful for use with MySQL.
 Mandatory Packages:
   mysql
 Default Packages:
   MySQL-python
   libdbi-dbd-mysql
   mysql-connector-odbc
   mysql-server
   perl-DBD-MySQL
   unixODBC
 Optional Packages:
   mod_auth_mysql
   mysql-bench
   mysql-devel
   php-mysql
   qt-MySQL

To install MySQL group use this command (skip this step to install individual packages):

# yum groupinstall 'MySQL Database'

Install MySQL individual packages

Here are commands I used to install specific packages:

# yum install mysql-server mysql php-mysql
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * addons: mirror.trouble-free.net
 * base: mirror.steadfast.net
 * extras: mirror.trouble-free.net
 * updates: styx.biochem.wfubmc.edu
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package mysql.i386 0:5.0.77-4.el5_5.3 set to be updated
--> Processing Dependency: perl(DBI) for package: mysql
---> Package mysql.x86_64 0:5.0.77-4.el5_5.3 set to be updated
---> Package mysql-server.x86_64 0:5.0.77-4.el5_5.3 set to be updated
--> Processing Dependency: perl-DBD-MySQL for package: mysql-server
---> Package php-mysql.x86_64 0:5.1.6-27.el5 set to be updated
--> Processing Dependency: php-common = 5.1.6-27.el5 for package: php-mysql
--> Processing Dependency: php-pdo for package: php-mysql
--> Running transaction check
---> Package perl-DBD-MySQL.x86_64 0:3.0007-2.el5 set to be updated
---> Package perl-DBI.x86_64 0:1.52-2.el5 set to be updated
---> Package php-common.x86_64 0:5.1.6-27.el5 set to be updated
---> Package php-pdo.x86_64 0:5.1.6-27.el5 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package              Arch         Version                  Repository     Size
================================================================================
Installing:
 mysql                i386         5.0.77-4.el5_5.3         updates       4.8 M
 mysql                x86_64       5.0.77-4.el5_5.3         updates       4.8 M
 mysql-server         x86_64       5.0.77-4.el5_5.3         updates       9.8 M
 php-mysql            x86_64       5.1.6-27.el5             base           89 k
Installing for dependencies:
 perl-DBD-MySQL       x86_64       3.0007-2.el5             base          148 k
 perl-DBI             x86_64       1.52-2.el5               base          600 k
 php-common           x86_64       5.1.6-27.el5             base          153 k
 php-pdo              x86_64       5.1.6-27.el5             base           66 k

Transaction Summary
================================================================================
Install       8 Package(s)
Upgrade       0 Package(s)

Total download size: 20 M
Is this ok [y/N]: y
Downloading Packages:
(1/8): php-pdo-5.1.6-27.el5.x86_64.rpm                   |  66 kB     00:00     
(2/8): php-mysql-5.1.6-27.el5.x86_64.rpm                 |  89 kB     00:00     
(3/8): perl-DBD-MySQL-3.0007-2.el5.x86_64.rpm            | 148 kB     00:00     
(4/8): php-common-5.1.6-27.el5.x86_64.rpm                | 153 kB     00:00     
(5/8): perl-DBI-1.52-2.el5.x86_64.rpm                    | 600 kB     00:00     
(6/8): mysql-5.0.77-4.el5_5.3.i386.rpm                   | 4.8 MB     00:17     
(7/8): mysql-5.0.77-4.el5_5.3.x86_64.rpm                 | 4.8 MB     00:15     
(8/8): mysql-server-5.0.77-4.el5_5.3.x86_64.rpm          | 9.8 MB     00:24     
--------------------------------------------------------------------------------
Total                                           355 kB/s |  20 MB     00:58     
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : perl-DBI                                                 1/8 
  Installing     : mysql                                                    2/8 
  Installing     : php-common                                               3/8 
  Installing     : php-pdo                                                  4/8 
  Installing     : perl-DBD-MySQL                                           5/8 
  Installing     : mysql                                                    6/8 
  Installing     : mysql-server                                             7/8 
  Installing     : php-mysql                                                8/8 

Installed:
  mysql.i386 0:5.0.77-4.el5_5.3              mysql.x86_64 0:5.0.77-4.el5_5.3    
  mysql-server.x86_64 0:5.0.77-4.el5_5.3     php-mysql.x86_64 0:5.1.6-27.el5    

Dependency Installed:
  perl-DBD-MySQL.x86_64 0:3.0007-2.el5       perl-DBI.x86_64 0:1.52-2.el5       
  php-common.x86_64 0:5.1.6-27.el5           php-pdo.x86_64 0:5.1.6-27.el5      

Complete!

mysqld has been installed but not configured for run level:

# chkconfig --list mysqld
mysqld          0:off   1:off   2:off   3:off   4:off   5:off   6:off

Set mysqld to run level 2, 3, & 5:

# chkconfig --levels 235 mysqld on

Confirm run levels for mysqld:

# chkconfig --list mysqld
mysqld          0:off   1:off   2:on    3:on    4:off   5:on    6:off

Starting MySQL 1st Time

Start mysqld. Note that when you run mysqld for first time you will receive some friendly reminders:

# service mysqld start

<<text removed for clarity>>

Starting MySQL:  [  OK  ]

We now follow the great directions provided & run the mysql secure installation script:

# /usr/bin/mysql_secure_installation

You will be presented with some questions regarding securing your mysqld installation:

<<some text removed for clarity>>

Set root password? [Y/n] Y

New password: 
Re-enter new password: 
Password updated successfully!
Reloading privilege tables..
 ... Success!

Remove anonymous users? [Y/n] Y
 ... Success!

Disallow root login remotely? [Y/n] Y
 ... Success!

Remove test database and access to it? [Y/n] Y
 - Dropping test database...
 ... Success!
 - Removing privileges on test database...
 ... Success!

Reload privilege tables now? [Y/n] Y
 ... Success!

Cleaning up...


All done!  If you've completed all of the above steps, your MySQL
installation should now be secure.

Thanks for using MySQL!

MySQL should be ready for OTRS.

OTRS

These steps were done using OTRS version 3.0.6. To ensure you get the latest version go to http://otrs.org/download and download the latest RPM for RHEL/OTRS then adjust the commands below in case this wiki is out-of-date with OTRS 3.0.x releases.

$ wget http://ftp.otrs.org/pub/otrs/RPMS/fedora/4/otrs-3.0.6-01.noarch.rpm

Verify file integrity by matching MD5 hash with entry on http://otrs.org/download/

 md5sum otrs-3.0.6-01.noarch.rpm 
a8595b8dba97f7454338fbc7f9efb0dd  otrs-3.0.6-01.noarch.rpm

Resolve dependencies

Determine the dependencies of otrs rpm file:

# rpm -qpR otrs-3.0.6-01.noarch.rpm
perl  
perl-DBI  
perl-DBD-MySQL  
perl-URI  
mod_perl  
httpd  
mysql  
mysql-server  
procmail  
perl-libwww-perl  
perl-Net-DNS  
perl-IO-Socket-SSL  
perl-XML-Parser  
/bin/sh

You can query your system or try to install & read errors to determine which packages are missing. I opted to install & read errors:

# rpm -ivh otrs-3.0.6-01.noarch.rpm 
error: Failed dependencies:
        perl-URI is needed by otrs-3.0.6-01.noarch
        mod_perl is needed by otrs-3.0.6-01.noarch
        perl-libwww-perl is needed by otrs-3.0.6-01.noarch
        perl-Net-DNS is needed by otrs-3.0.6-01.noarch
        perl-IO-Socket-SSL is needed by otrs-3.0.6-01.noarch
        perl-XML-Parser is needed by otrs-3.0.6-01.noarch

Now I know which dependencies to install.

Note:

  • Optionally you can install RPM using yum to automatically resolve all dependencies. However, since you are reading this I suspect you need practice.
  • You can install all dependencies at once using one yum command simply put space between each package (like I did with mysql single packages above)

Resolve perl-URI dependency:

# yum install perl-URI
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * addons: mirror.trouble-free.net
 * base: mirror.steadfast.net
 * extras: mirror.trouble-free.net
 * updates: styx.biochem.wfubmc.edu
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package perl-URI.noarch 0:1.35-3 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package             Arch              Version            Repository       Size
================================================================================
Installing:
 perl-URI            noarch            1.35-3             base            116 k

Transaction Summary
================================================================================
Install       1 Package(s)
Upgrade       0 Package(s)

Total download size: 116 k
Is this ok [y/N]: y
Downloading Packages:
perl-URI-1.35-3.noarch.rpm                               | 116 kB     00:00     
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : perl-URI                                                 1/1 

Installed:
  perl-URI.noarch 0:1.35-3                                                      

Complete!

Resolve mod_perl dependency:

# yum install mod_perl
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * addons: mirror.trouble-free.net
 * base: mirror.steadfast.net
 * extras: mirror.trouble-free.net
 * updates: styx.biochem.wfubmc.edu
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package mod_perl.x86_64 0:2.0.4-6.el5 set to be updated
--> Processing Dependency: perl(BSD::Resource) for package: mod_perl
--> Running transaction check
---> Package perl-BSD-Resource.x86_64 0:1.28-1.fc6.1 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package                  Arch          Version               Repository   Size
================================================================================
Installing:
 mod_perl                 x86_64        2.0.4-6.el5           base        4.0 M
Installing for dependencies:
 perl-BSD-Resource        x86_64        1.28-1.fc6.1          base         29 k

Transaction Summary
================================================================================
Install       2 Package(s)
Upgrade       0 Package(s)

Total download size: 4.1 M
Is this ok [y/N]: y
Downloading Packages:
(1/2): perl-BSD-Resource-1.28-1.fc6.1.x86_64.rpm         |  29 kB     00:00     
(2/2): mod_perl-2.0.4-6.el5.x86_64.rpm                   | 4.0 MB     00:00     
--------------------------------------------------------------------------------
Total                                           3.9 MB/s | 4.1 MB     00:01     
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : perl-BSD-Resource                                        1/2 
  Installing     : mod_perl                                                 2/2 

Installed:
  mod_perl.x86_64 0:2.0.4-6.el5                                                 

Dependency Installed:
  perl-BSD-Resource.x86_64 0:1.28-1.fc6.1                                       

Complete!

Resolve perl-libwww-perl dependency:

# yum install perl-libwww-perl
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * addons: mirror.trouble-free.net
 * base: mirror.steadfast.net
 * extras: mirror.trouble-free.net
 * updates: styx.biochem.wfubmc.edu
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package perl-libwww-perl.noarch 0:5.805-1.1.1 set to be updated
--> Processing Dependency: perl-HTML-Parser >= 3.33 for package: perl-libwww-perl
--> Processing Dependency: perl(HTML::Entities) for package: perl-libwww-perl
--> Processing Dependency: perl(Compress::Zlib) for package: perl-libwww-perl
--> Running transaction check
---> Package perl-Compress-Zlib.x86_64 0:1.42-1.fc6 set to be updated
---> Package perl-HTML-Parser.x86_64 0:3.55-1.fc6 set to be updated
--> Processing Dependency: perl-HTML-Tagset >= 3.03 for package: perl-HTML-Parser
--> Processing Dependency: perl(HTML::Tagset) for package: perl-HTML-Parser
--> Running transaction check
---> Package perl-HTML-Tagset.noarch 0:3.10-2.1.1 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package                   Arch          Version              Repository   Size
================================================================================
Installing:
 perl-libwww-perl          noarch        5.805-1.1.1          base        376 k
Installing for dependencies:
 perl-Compress-Zlib        x86_64        1.42-1.fc6           base         52 k
 perl-HTML-Parser          x86_64        3.55-1.fc6           base         92 k
 perl-HTML-Tagset          noarch        3.10-2.1.1           base         15 k

Transaction Summary
================================================================================
Install       4 Package(s)
Upgrade       0 Package(s)

Total download size: 534 k
Is this ok [y/N]: y
Downloading Packages:
(1/4): perl-HTML-Tagset-3.10-2.1.1.noarch.rpm            |  15 kB     00:00     
(2/4): perl-Compress-Zlib-1.42-1.fc6.x86_64.rpm          |  52 kB     00:00     
(3/4): perl-HTML-Parser-3.55-1.fc6.x86_64.rpm            |  92 kB     00:00     
(4/4): perl-libwww-perl-5.805-1.1.1.noarch.rpm           | 376 kB     00:00     
--------------------------------------------------------------------------------
Total                                           858 kB/s | 534 kB     00:00     
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : perl-Compress-Zlib                                       1/4 
  Installing     : perl-HTML-Tagset                                         2/4 
  Installing     : perl-HTML-Parser                                         3/4 
  Installing     : perl-libwww-perl                                         4/4 

Installed:
  perl-libwww-perl.noarch 0:5.805-1.1.1                                         

Dependency Installed:
  perl-Compress-Zlib.x86_64 0:1.42-1.fc6  perl-HTML-Parser.x86_64 0:3.55-1.fc6 
  perl-HTML-Tagset.noarch 0:3.10-2.1.1   

Complete!

Resolve perl-Net-DNS dependency:

[root@null-0023ae875f47 opt]# yum install perl-Net-DNS
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * addons: mirror.trouble-free.net
 * base: mirror.steadfast.net
 * extras: mirror.trouble-free.net
 * updates: styx.biochem.wfubmc.edu
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package perl-Net-DNS.x86_64 0:0.59-3.el5 set to be updated
--> Processing Dependency: perl(Digest::HMAC_MD5) for package: perl-Net-DNS
--> Processing Dependency: perl(Net::IP) for package: perl-Net-DNS
--> Running transaction check
---> Package perl-Digest-HMAC.noarch 0:1.01-15 set to be updated
--> Processing Dependency: perl(Digest::SHA1) for package: perl-Digest-HMAC
---> Package perl-Net-IP.noarch 0:1.25-2.fc6 set to be updated
--> Running transaction check
---> Package perl-Digest-SHA1.x86_64 0:2.11-1.2.1 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package                  Arch           Version             Repository    Size
================================================================================
Installing:
 perl-Net-DNS             x86_64         0.59-3.el5          base         215 k
Installing for dependencies:
 perl-Digest-HMAC         noarch         1.01-15             base          12 k
 perl-Digest-SHA1         x86_64         2.11-1.2.1          base          49 k
 perl-Net-IP              noarch         1.25-2.fc6          base          31 k

Transaction Summary
================================================================================
Install       4 Package(s)
Upgrade       0 Package(s)

Total download size: 306 k
Is this ok [y/N]: y
Downloading Packages:
(1/4): perl-Digest-HMAC-1.01-15.noarch.rpm               |  12 kB     00:00     
(2/4): perl-Net-IP-1.25-2.fc6.noarch.rpm                 |  31 kB     00:00     
(3/4): perl-Digest-SHA1-2.11-1.2.1.x86_64.rpm            |  49 kB     00:00     
(4/4): perl-Net-DNS-0.59-3.el5.x86_64.rpm                | 215 kB     00:00     
--------------------------------------------------------------------------------
Total                                           565 kB/s | 306 kB     00:00     
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : perl-Digest-SHA1                                         1/4 
  Installing     : perl-Digest-HMAC                                         2/4 
  Installing     : perl-Net-IP                                              3/4 
  Installing     : perl-Net-DNS                                             4/4 

Installed:
  perl-Net-DNS.x86_64 0:0.59-3.el5                                              

Dependency Installed:
  perl-Digest-HMAC.noarch 0:1.01-15     perl-Digest-SHA1.x86_64 0:2.11-1.2.1    
  perl-Net-IP.noarch 0:1.25-2.fc6      

Complete!

Resolve perl-IO-Socket-SSL dependency:

# yum install perl-IO-Socket-SSL
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * addons: mirror.trouble-free.net
 * base: mirror.steadfast.net
 * extras: mirror.trouble-free.net
 * updates: styx.biochem.wfubmc.edu
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package perl-IO-Socket-SSL.noarch 0:1.01-1.fc6 set to be updated
--> Processing Dependency: perl(Net::SSLeay) >= 1.21 for package: perl-IO-Socket-SSL
--> Running transaction check
---> Package perl-Net-SSLeay.x86_64 0:1.30-4.fc6 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package                   Arch          Version              Repository   Size
================================================================================
Installing:
 perl-IO-Socket-SSL        noarch        1.01-1.fc6           base         49 k
Installing for dependencies:
 perl-Net-SSLeay           x86_64        1.30-4.fc6           base        192 k

Transaction Summary
================================================================================
Install       2 Package(s)
Upgrade       0 Package(s)

Total download size: 241 k
Is this ok [y/N]: y
Downloading Packages:
(1/2): perl-IO-Socket-SSL-1.01-1.fc6.noarch.rpm          |  49 kB     00:00     
(2/2): perl-Net-SSLeay-1.30-4.fc6.x86_64.rpm             | 192 kB     00:00     
--------------------------------------------------------------------------------
Total                                           785 kB/s | 241 kB     00:00     
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : perl-Net-SSLeay                                          1/2 
  Installing     : perl-IO-Socket-SSL                                       2/2 

Installed:
  perl-IO-Socket-SSL.noarch 0:1.01-1.fc6                                        

Dependency Installed:
  perl-Net-SSLeay.x86_64 0:1.30-4.fc6                                           

Complete!

Resolve perl-XML-Parser dependency:

# yum install perl-XML-Parser
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * addons: mirror.trouble-free.net
 * base: mirror.steadfast.net
 * extras: mirror.trouble-free.net
 * updates: styx.biochem.wfubmc.edu
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package perl-XML-Parser.x86_64 0:2.34-6.1.2.2.1 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package                Arch          Version                 Repository   Size
================================================================================
Installing:
 perl-XML-Parser        x86_64        2.34-6.1.2.2.1          base        210 k

Transaction Summary
================================================================================
Install       1 Package(s)
Upgrade       0 Package(s)

Total download size: 210 k
Is this ok [y/N]: y
Downloading Packages:
perl-XML-Parser-2.34-6.1.2.2.1.x86_64.rpm                | 210 kB     00:00     
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : perl-XML-Parser                                          1/1 

Installed:
  perl-XML-Parser.x86_64 0:2.34-6.1.2.2.1                                       

Complete!

Install via RPM command

Install OTRS RPM using yum:

# yum --nogpgcheck install otrs-3.0.6-01.noarch.rpm 

<text removed for clarity>

Next steps: 

[httpd services]
 Restart httpd 'service httpd restart'

[mysqld service]
 Start mysqld 'service mysqld start'

[install the OTRS database]
 Use a webbrowser and open this link:
 http://CentOShostname/otrs/installer.pl

[OTRS services]
 Start OTRS 'service otrs start' (service otrs {start|stop|status|restart).

((enjoy))

 Your OTRS Team

  Cleanup        : otrs                                                     3/3 

Dependency Installed:
  perl-TimeDate.noarch 1:1.16-5.el5                                             

Updated:
  otrs.noarch 0:3.0.6-01                                                        

Complete!

Basic Apache config

Make backup of httpd.conf file.

# cp /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf.back

Edit httpd.conf file:

# vi /etc/httpd/conf/httpd.conf

At minimum update these entries:

ServerAdmin ptay@yourdomain.com
ServerName [hostname or IP address]:80
Listen yourIP:80

Restart httpd:

# service httpd restart
Stopping httpd: [  OK  ]
Starting httpd: [  OK  ]

Setup MySQL database

Follow simple steps provided on OTRS docs page. Thank you OTRS devs for providing a simple web installer!

If on same machine as OTRS install you point your browser to http://localhost/otrs/installer.pl otherwise replace localhost with domain name or IP address.

Logging into OTRS

After configuring MySQL via web installer you should be able to log into OTRS via http://IPaddress/otrs/index.pl with user root@localhost and default password.

Enjoy OTRS!

Post Install Support Assessment Steps

Please visit Post install Support Assessment steps

author ptay wiki

A personal copy of this guide will be maintained on my personal wiki