Multiple OTRS-Installations on 1 server

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

This document is from KartheeK and describes the installation steps for an multihomed otrs installation on on single PC with more than one Apache server.

Diese Dokument wurde von KartheeK geschrieben, und beinhaltet die Installation eines Multihome OTRS Installation it mehreren Apache Instanzen.




Multiple OTRS on Multiple Apache HowTo


Author: KartheeK PN Last Updated: 5/28/2006 Version: 1.0 Email Author: kartheek.pn@entl.net


CONTENTS

Introduction

This How-to describes the procedure to install multiple copies of OTRS on a single machine. I am describing the procedure to install two instances; the same procedure can be used to install multiple instances. I have tested this guide on Mandriva 2006 and FC4.

In this How-to, I am installing “otrsone” and “otrstwo” under “apache-one” and “apache-two” respectively.

Dedications

Dedications

Mala            My Mother
NandaKumar      My Father
LalithaRaj      My “Angel” Aunty
KanthRaj        My Uncle                     

And to the whole of the OTRS community

Audience

Anybody who wants to install multiple copies of OTRS on to a single machine.



About the Author

The author is a Linux Enthusiast working as an Analyst for Trouble Ticketing Systems at Envision Network Technologies Pvt Ltd, Bangalore, India www.entl.net and provides consulting services for Trouble Ticketing Systems.


Name and Version

OS Mandriva 2006 / FC4 OTRS otrs-2.0.4-01 Web Server httpd-2.2.2

Assumptions:

It is assumed that you are familiar with basic Linux commands.

Pre-Requisites

The following stuff needs to be downloaded:

  • OTRS: www.otrs.org
ftp://ftp.otrs.org/pub/otrs/otrs-2.0.4-01.tar.gz


The Following Perl Modules need to be installed:

CGI
Date::Pcalc
DBI
DBD::mysql
Digest::MD5
LWP::UserAgent
IO::Scalar
IO::Wrap
MIME::Base64
MIME::Tools
Mail::Internet
Net::DNS
Net::POP3
Net::LDAP          (for directory authentication - not required)
Net::SMTP
Authen::SASL
GD                 (for stats - not required)
GD::Text           (for stats - not required)
GD::Graph          (for stats - not required)
GD::Graph::lines   (for stats - not required)
GD::Text::Align    (for stats - not required)
XML::Parser


Installation Procedure

First Instance of OTRS

Step-1: Login to the system as root user Step-2: Move the downloaded source on to /usr/local/src

root@otrs#mv otrs-2.0.4-01.tar.gz /usr/local/src/


Step-3: Unpack the tar.gz

root@otrs#cd /usr/local/src/
root@otrs#tar xzvf otrs-2.0.4-01.tar.gz

Step-4:

root@otrs#mv otrs /opt/otrsone
root@otrs#cd /opt/otrsone/Kernel
root@otrs#cp Config.pm.dist Config.pm
root@otrs#cd Config
root@otrs#cp GenericAgent.pm.dist GenericAgent.pm

Step-5: Add a user “otrsone” in the group “otrsone”

root@otrs#useradd -d /opt/otrsone/ -c 'First OTRS Instance user' otrsone
root@otrs#groupadd otrsone
root@otrs#usermod -G otrsone otrsone

Step-6: Configure the Home Directory of OTRS in Config.pm

root@otrs#cd /opt/otrsone/Kernel
root@otrs#vi Config.pm


Change the otrs Home to be “/opt/otrsone”, I believe it is in line number 61

# ---------------------------------------------------- #
# fs root directory
# ---------------------------------------------------- #
$Self->{Home} = '/opt/otrsone';

Step-7: Assign appropriate permissions on to the otrs install directory

root@otrs#cd /opt/otrsone/bin/
root@otrs#./SetPermissions.sh /opt/otrsone/ otrsone otrsone otrsone otrsone

First Instance of httpd

Step-1: Move the downloaded tar.gz of httpd on to /usr/local/src

root@otrs#mv httpd-2.2.2.tar.gz /usr/local/src

Step-2: Unpack the tar.gz

root@otrs#cd /usr/local/src
root@otrs#tar xzvf httpd-2.2.2.tar.gz

Step-3: Create a target directory for first apache’s installation

root@otrs#mkdir /opt/apache-one

Step-4: Configure

root@otrs#cd /usr/local/src/httpd-2.2.2
root@otrs#./configure --prefix=/opt/apache-one

Step-5: Compile

root@otrs#make

Step-6: Install

root@otrs#make install

Step-7: Create a “conf.d” Directory

root@otrs#cd /opt/apache-one
root@otrs#mkdir conf.d

Step-8: Insert the “OTRS” Configuration File in the “conf.d” directory

root@otrs#cd /opt/apache-one/conf.d/
root@otrs#vi otrs.conf
===========================================
#basic apache configurations file for OTRS
ScriptAlias /otrs/ "/opt/otrsone/bin/cgi-bin/"
Alias /otrs-web/ "/opt/otrsone/var/httpd/htdocs/"
# Directory settings
#
<Directory "/opt/otrsone/bin/cgi-bin/">
 AllowOverride None
 Options +ExecCGI -Includes
 Order allow,deny
 Allow from all
</Directory>
<Directory "/opt/otrsone/var/httpd/htdocs/">
 AllowOverride None
 Order allow,deny
 Allow from all
</Directory>
===========================================


Step-9: Modify the httpd.conf file to do the following:

  • Listen to the desired port number
  • Run as user otrsone of group otrsone
  • Load the configurations from “Conf.d” during server startup
root@otrs#cd /opt/apache-one/conf/
root@otrs#cp httpd.conf httpd.conf.orig       [Backup the Original Configuration]
diff of my httpd.conf and httpd.conf.orig
===========================================
40c40
< Listen 9000
---
> Listen 80
65,66c65,66
< User otrsone
< Group otrsone
---
> User daemon
> Group daemon
414,417d413
< 
< 
< # include legacy conf.d during a transition period
< Include conf.d/*.conf
===========================================


Its simple, I have made the “Listen Port” to be 9000, the apache user to be “otrsone” and group to be “otrsone”, further I have added a line to include scripts in “Conf.d” directory during server startup

Step-10: Change the ownership of the apache install directory

root@otrs#chown otrsone:otrsone -R /opt/apache-one

Step-11: Start the Web Server

root@otrs#su otrsone
otrsone@otrs$/opt/apache-one/bin/apachectl start


Step-12: Remove the Apache Install Directory

root@otrs#rm –rf /usr/local/src/httpd-2.2.2

Second Instance of OTRS

Step-1: Unpack the tar.gz

root@otrs#cd /usr/local/src/
root@otrs#tar xzvf otrs-2.0.4-01.tar.gz

Step-2: root@otrs#mv otrs /opt/otrstwo

root@otrs#cd /opt/otrstwo/Kernel
root@otrs#cp Config.pm.dist Config.pm
root@otrs#cd Config
root@otrs#cp GenericAgent.pm.dist GenericAgent.pm

Step-3: Add a user “otrstwo” in the group otrstwo

root@otrs#useradd -d /opt/otrstwo/ -c 'Second OTRS Instance user' otrstwo
root@otrs#groupadd otrstwo
root@otrs#usermod -G otrstwo otrstwo

Step-4: Configure the Home Directory of OTRS in Config.pm

root@otrs#cd /opt/otrstwo/Kernel
root@otrs#vi Config.pm

Change the otrs Home to be “/opt/otrstwo”

# ---------------------------------------------------- #
# fs root directory
# ---------------------------------------------------- #
$Self->{Home} = '/opt/otrstwo';


Step-5: Assign appropriate permissions on to the otrs install directory

root@otrs#cd /opt/otrstwo/bin/
root@otrs#./SetPermissions.sh /opt/otrstwo/ otrstwo otrstwo otrstwo otrstwo


Second Instance of httpd

Step-1: Unpack the tar.gz

root@otrs#cd /usr/local/src
root@otrs#tar xzvf httpd-2.2.2.tar.gz

Step-2: Create a target directory for first apache’s installation

root@otrs#mkdir /opt/apache-two


Step-3: Configure

root@otrs#cd /usr/local/src/httpd-2.2.2
root@otrs#./configure --prefix=/opt/apache-two


Step-4: Compile

root@otrs#make


Step-5: Install

root@otrs#make install


Step-6: Create a “conf.d” Directory

root@otrs#cd /opt/apache-two
root@otrs#mkdir conf.d


Step-7: Insert the “OTRS” Configuration File in the “conf.d” directory

root@otrs#cd /opt/apache-two/conf.d/
root@otrs#vi otrs.conf
===========================================
#basic apache configurations file for OTRS
ScriptAlias /otrs/ "/opt/otrstwo/bin/cgi-bin/"
Alias /otrs-web/ "/opt/otrstwo/var/httpd/htdocs/"
# Directory settings
#
<Directory "/opt/otrstwo/bin/cgi-bin/">
 AllowOverride None
 Options +ExecCGI -Includes
 Order allow,deny
 Allow from all
</Directory>
<Directory "/opt/otrstwo/var/httpd/htdocs/">
 AllowOverride None
 Order allow,deny
 Allow from all
</Directory>
===========================================

Step-8: Modify the httpd.conf file to do the following: o Listen to the desired port number o Run as user otrstwo of group otrstwo o Load the configurations from “Conf.d” during server startup

root@otrs#cd /opt/apache-two/conf/
root@otrs#cp httpd.conf httpd.conf.orig       [Backup the Original Configuration]
diff of my httpd.conf and httpd.conf.orig
===========================================
40c4   
< Listen 9010
---
> Listen 80
65,66c65,66
< User otrstwo
< Group otrstwo
---   
> User daemon
> Group daemon
414,417d413
< 
< 
< # includes legacy conf.d during a transition period
< Include conf.d/*.conf
===========================================


Step-9: Change the ownership of the apache install directory

root@otrs#chown otrstwo:otrstwo -R /opt/apache-two


Step-10: Start the Web Server

root@otrs#su otrstwo
otrstwo@otrs$/opt/apache-two/bin/apachectl start


Step-11: Remove the Apache Install Directory

root@otrs#rm –rf /usr/local/src/httpd-2.2.2


Boot Up Scripts

Here I am describing how to write bootup scripts for the newly installed apache servers. I don’t know if this is the right way. But it works!

First Instance

Step-1: Insert the following script in /etc/init.d

root@otrs#vi otrsone
=============================================================
#!/bin/sh
#
# otrsone:       Starts the First copy of otrs
#
# chkconfig: 2345 96 20
# description: Starts and stops the First Copy of OTRS at boot time and shutdown.
#
/opt/apache-one/bin/apachectl start
==============================================================


Step-2:

root@otrs#chkconfig –add otrsone
root@otrs#chkconfig --level 2345 otrsone on


Second Instance

Step-1: Insert the following script in /etc/init.d

root@otrs#vi otrstwo
==============================================================
#!/bin/sh
#
# otrstwo:       Starts the Second copy of otrs
#
# chkconfig: 2345 97 21
# description: Starts and stops the Second Copy of OTRS at boot time and shutdown.
#
/opt/apache-two/bin/apachectl start
=========================================================

Step-2: root@otrs#chkconfig –add otrstwo

root@otrs#chkconfig --level 2345 otrstwo on

Test the Installation:

http://<ip_address>:9000/otrs/installer.pl
http://<ip_address>:9010/otrs/installer.pl
Refer OTRS Manual to proceed with the rest of the installation


Tips & Suggestions

Here, I will List down all the OTRS tricks/suggestions that will create magic…

Yet to work on this part…. o OTRS on FC3, FC4: Disable selinux using the command: “setenforce 0” Feed Back

Believe I have not missed out anything. Please mail your Feedbacks/Corrections/Typos to kartheek.pn@entl.net All Things Wise and Wonderful There is a geometric progression in ability; you need to be only 10% better at what you do than most people, in order to go 100% further.

                                                                                                                                                          &n bsp;                                                                                    -Sydney Harris in “On Getting Ahead"


When we watch a child trying to walk, we see its countless failures, its successes are few. If we had to limit our observation within a narrow space of time, the sight would be cruel.  ;

                                                                                                                                                          &n bsp;                                                                                    -Rabindranath Tagore

The Universe is full of magical things patiently waiting for our wits to grow sharper.

                                                                                                                       -Eden Phillpots

I do not choose to be a common man. It is my right to be uncommon – if I can. I seek opportunity not security. I do not wish to be a kept citizen, humbled and dulled by having the state look after me. I want to take the calculated risk; to dream and to build, to fail and to succeed. I refuse to barter incentive for a dole. I prefer the challenges of life to the guaranteed existence; the thrill of fulfillment to the stale calm of Utopia. I will not trade freedom for beneficence nor my dignity for a handout. It is my heritage to think and act for myself, enjoy the benefit of my creations, and to face the world boldly and say, this I have done.

                                                                                                                                                                                                                                                -Dean Alfange


Kategorie:Installation