This setup will describe how to run multiple instances of OTRS on one host.
We will install OTRS and Apache from sources.
Download OTRS from following link: http://ftp.otrs.org/pub/otrs/
Download APACHE from following link: http://httpd.apache.org/download.cgi
Check for the following perl modules on your system. These perl modules are needed by the otrs and must be installed on your system.
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: Compileroot@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:
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.orig40c4 < 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 is the way to write the boot scripts on 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
We will install OTRS and Apache from sources.
Download OTRS from following link: http://ftp.otrs.org/pub/otrs/
Download APACHE from following link: http://httpd.apache.org/download.cgi
Check for the following perl modules on your system. These perl modules are needed by the otrs and must be installed on your system.
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: Compileroot@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:
- Listen to the desired port number
- Run as user otrstwo of group otrstwo
- 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.orig40c4 < 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 is the way to write the boot scripts on 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
No comments:
Post a Comment