Difference between revisions of "OTRS"

From SME Server
Jump to navigation Jump to search
 
(46 intermediate revisions by 7 users not shown)
Line 1: Line 1:
{{Note box|This is work in progress}}
 
 
== Maintainer ==
 
 
[mailto:russell@fixitcomputers.com.au?subject=OTRS Russell Taihn]
 
 
 
== OTRS - Open Ticket Request System ==
 
== OTRS - Open Ticket Request System ==
 
{{Incomplete}}
 
  
 
http://otrs.org/
 
http://otrs.org/
Line 13: Line 5:
 
OTRS is an Open source Ticket Request System (also well known as 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. Do you receive many e-mails and want to answer them with a team of agents? You're going to love the OTRS!  
 
OTRS is an Open source Ticket Request System (also well known as 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. Do you receive many e-mails and want to answer them with a team of agents? You're going to love the OTRS!  
  
 
 
  cd /usr/local/src
 
  cd /usr/local/src
  
  wget http://ftp.otrs.org/pub/otrs/otrs-2.2.2.tar.gz
+
  wget http://ftp.otrs.org/pub/otrs/otrs-2.3.4.tar.gz
  
  tar xvzf otrs-2.2.2.tar.gz
+
  tar xvzf otrs-2.3.4.tar.gz
  
  mv /usr/local/src/otrs-2.2.2/ /opt/otrs/
+
  mv /usr/local/src/otrs-2.3.4/* /opt/otrs/
  
 
  chown -R www.www /opt/otrs
 
  chown -R www.www /opt/otrs
 +
 +
== Database Configuration ==
  
 
  cp /opt/otrs/Kernel/Config.pm.dist /opt/otrs/Kernel/Config.pm
 
  cp /opt/otrs/Kernel/Config.pm.dist /opt/otrs/Kernel/Config.pm
Line 35: Line 28:
  
 
line 48: $Self->{'DatabasePw'} = 'some-pass';
 
line 48: $Self->{'DatabasePw'} = 'some-pass';
 
  
 
  pico Config.pm
 
  pico Config.pm
 
+
==============================================================================
+
# DatabaseHost
 
 
# DatabaseHost
 
 
     # (The database host.)
 
     # (The database host.)
 
     $Self->{DatabaseHost} = 'localhost';
 
     $Self->{DatabaseHost} = 'localhost';
Line 55: Line 45:
 
     '''$Self->{DatabasePw} = 'some-pass';'''
 
     '''$Self->{DatabasePw} = 'some-pass';'''
  
===============================================================================
+
Save by pressing Ctrl x, press y to save changes and press enter
 +
 
 +
== Setup Dag Repositories ==
 +
You need to activate the [[Dag]] reposity before installing this contrib.<br />
 +
 
 +
see [[dag|dag repository]] <br />
 +
 
 +
== Installation of needed perl modules ==
 +
 
 +
yum install mod_perl gd ImageMagick ImageMagick-perl gcc netpbm \
 +
--enablerepo=base \
 +
--enablerepo=updates \
 +
--enablerepo=addons \
 +
--enablerepo=dag
 +
 
 +
Activate mod perl
 +
 
 +
config setprop modPerl status enabled
 +
 
 +
signal-event post-upgrade
 +
signal-event reboot
 +
 
 +
yum install perl-GD perl-GD-Graph perl-GD-Graph3d \
 +
perl-GD-Text-Util perl-Date-Pcalc perl-Email-Valid perl-PDF-API2 \
 +
--enablerepo=base \
 +
--enablerepo=updates \
 +
--enablerepo=addons \
 +
--enablerepo=dag
 +
 
 +
After you have installed all modules you can use the script otrss.checkModules to check if OTRS has all needed perl modules.
 +
 
 +
cd /opt/otrs/bin/
 +
 
 +
./otrs.checkModules
 +
 +
 +
                CGI ... ok
 +
        Date::Pcalc ... ok
 +
        Date::Format ... ok
 +
                DBI ... ok
 +
          DBD::mysql ... ok
 +
        Digest::MD5 ... ok
 +
    Crypt::PasswdMD5 ... ok
 +
      LWP::UserAgent ... ok
 +
          IO::Scalar ... ok
 +
            IO::Wrap ... ok
 +
        MIME::Base64 ... ok
 +
        MIME::Tools ... ok
 +
      Mail::Internet ... ok
 +
            Net::DNS ... ok
 +
          Net::POP3 ... ok
 +
          Net::LDAP ... ok
 +
          Net::SMTP ... ok
 +
        Authen::SASL ... ok
 +
                  GD ... ok
 +
            GD::Text ... ok
 +
          GD::Graph ... ok
 +
    GD::Graph::lines ... ok
 +
    GD::Text::Align ... ok
 +
        XML::Parser ... ok
 +
          PDF::API2 ... ok
 +
      Compress::Zlib ... ok
 +
 
 +
 
 +
Remove gcc for security reasons
 +
 
 +
yum remove gcc cpp
 +
 
 +
Execute also the three commands perl -cw bin/cgi-bin/index.pl and perl -cw bin/PostMaster.pl after changing into the directory
 +
/opt/otrs. If the output of both commands is "syntax OK", you have a proper perl installation to use with OTRS.
 +
 
 +
cd /opt/otrs
 +
 
 +
perl -cw bin/cgi-bin/installer.pl
 +
bin/cgi-bin/installer.pl syntax OK
 +
 
 +
perl -cw bin/cgi-bin/index.pl
 +
bin/cgi-bin/index.pl syntax OK
 +
 
 +
perl -cw bin/PostMaster.pl
 +
bin/PostMaster.pl syntax OK
 +
 
 +
== Configuring the apache web server ==
 +
 
 +
mkdir -p /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/
 +
 
 +
cd /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/
 +
 
 +
pico 98otrs
 +
 
 +
copy and paste between dotted lines
 +
 
 +
#==========================================================================
 +
 +
#OTRS
 +
 +
Alias /otrs/ "/opt/otrs/bin/cgi-bin/"
 +
Alias /otrs-web/ "/opt/otrs/var/httpd/htdocs/"
 +
 +
PerlRequire /opt/otrs/scripts/apache2-perl-startup.pl
 +
 +
PerlModule Apache::Reload
 +
PerlInitHandler Apache::Reload
 +
 +
MaxRequestsPerChild 400
 +
 +
<Location /otrs>
 +
    ErrorDocument 403 /otrs/customer.pl
 +
    ErrorDocument 403 /otrs/index.pl
 +
    AllowOverride All
 +
    SetHandler perl-script
 +
    PerlResponseHandler ModPerl::Registry
 +
    PerlOptions +ParseHeaders
 +
    Options +ExecCGI +FollowSymlinks
 +
</Location>
 +
<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>
 +
 +
#=========================================================================
 +
 
 +
Save by pressing '''Ctrl x''', '''press y''' to save changes and '''press enter'''
 +
 
 +
expand-template /etc/httpd/conf/httpd.conf
 +
 
 +
/etc/rc.d/init.d/httpd-e-smith restart
 +
 
 +
cd /opt/otrs/bin
 +
 
 +
sh SetPermissions.sh /opt/otrs www www
 +
 
 +
The errors generated from this script are because it assumes the presence of the 'nogroup' group so we have to substitute the 'nobody' group for the chown commands
 +
 
 +
chown -R www:nobody /opt/otrs
 +
chown www:nobody /opt/otrs
 +
chown -R www:nobody /opt/otrs/var/
 +
chown -R www:nobody /opt/otrs/var/sessions/
 +
touch && chown www:nobody /opt/otrs/var/log/TicketCounter.log
 +
 
 +
== Configuring the database using the web installer ==
 +
 
 +
Go to URL http://localhost_or_ip/otrs/installer.pl to access the start page of the web installer. Just follow the few steps through the installation process you will need to configure the OTRS database via a web front-end If you are using MySQL for database back-end.
 +
 
 +
 
 +
[[Image:OTRS_Installer1.jpg|center]]
 +
 
 +
 
 +
cd /root
 +
 
 +
open or edit .my.cnf and copy and paste your mysql password into the Admin Password field as shown below
 +
 
 +
example
 +
[client]
 +
password='''eox24kly-example-of-wat-the-mysql-psw-looks-like-aB8Zva6NezKT58bcLM7QsdOAJcmPj'''
 +
 
 +
you will also need to add the database name, database user name & password created as well as the from the '''database configuration''' that was done in the steps above [http://wiki.contribs.org/OTRS#Database_Configuration Database Configuration]
 +
 +
 
 +
[[Image:OTRS_Installer2.jpg|center]]
 +
 
 +
if all went well, press next
 +
 
 +
[[Image:OTRS_Installer3.jpg|center]]
 +
 
 +
Add your details & press next
 +
 
 +
[[Image:OTRS_Installer4.jpg|center]]
 +
 
 +
Remember the user name and password and click on the start page link
 +
 
 +
[[Image:OTRS_Installer5.jpg|center]]
 +
 
 +
Login details
 +
 
 +
user: root@localhost 
 +
 
 +
password: root
 +
 
 +
[[Image:Welcome_to_otrs.jpg|center]]
 +
 
 +
== Setting up the cron jobs for OTRS ==
 +
 
 +
{{Incomplete}}
 +
 
 +
[http://doc.otrs.org/2.2/en/html/x354.html Setting up the cron jobs for OTRS]
 +
 
 +
OTRS needs some cron jobs to work properly. The cron jobs should be run with the same user rights that were specified for the OTRS modules. That means that the cron jobs must be inserted into the crontab file of the OTRS user.
 +
 
 +
All scripts with the cron jobs are located in var/cron in the home directory of the OTRS user.
 +
 
 +
== Additional information ==
 +
=== IMAP auth plugin ===
 +
There is an OTRS plugin for authentication against an IMAP server available [http://mirror.contribs.org/smeserver/contribs/michaelw/sme7/OTRS/ here].
 +
This plugin is useful when you set up ORTS for your internal users. Users authenticate against their SME IMAP accounts. You don't need to create OTRS accounts for each of your users manually.
 +
 
 +
Installation:
 +
/usr/bin/yum --enablerepo=dag install perl-Net-IMAP-Simple
 +
tar -C / -xf imap_auth.tar
 +
 
 +
add this to /opt/otrs/Kernel/Config.pm
 +
$Self->{'AuthModule'} = 'Kernel::System::Auth::IMAP';
 +
$Self->{'AuthModule::IMAP::Server'} = 'aaa.bbb.ccc.ddd';
 +
$Self->{'Customer::AuthModule'} = 'Kernel::System::CustomerAuth::IMAP';
 +
$Self->{'Customer::AuthModule::IMAP::Server'} = 'aaa.bbb.ccc.ddd';
 +
 
 +
where aaa.bbb.ccc.ddd is the IP address of the IMAP Server.
 +
 
 +
Note: The plugin is tested on OTRS 2.1.2
 +
 
  
 
[[Category:Howto]]
 
[[Category:Howto]]

Latest revision as of 20:04, 2 November 2013

OTRS - Open Ticket Request System

http://otrs.org/

OTRS is an Open source Ticket Request System (also well known as 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. Do you receive many e-mails and want to answer them with a team of agents? You're going to love the OTRS!

cd /usr/local/src
wget http://ftp.otrs.org/pub/otrs/otrs-2.3.4.tar.gz
tar xvzf otrs-2.3.4.tar.gz
mv /usr/local/src/otrs-2.3.4/* /opt/otrs/
chown -R www.www /opt/otrs

Database Configuration

cp /opt/otrs/Kernel/Config.pm.dist /opt/otrs/Kernel/Config.pm
cd /opt/otrs/Kernel

edit Config.pm using vi or pico or favorite text editor & edit lines as shown below, take note of the database information as this would be required in later steps

line 41: $Self->{Database} = 'otrs';

line 44: $Self->{'DatabaseUser'} = 'otrs';

line 48: $Self->{'DatabasePw'} = 'some-pass';

pico Config.pm

# DatabaseHost
   # (The database host.)
   $Self->{DatabaseHost} = 'localhost';
   # Database
   # (The database name.)
   $Self->{Database} = 'otrs';
   # DatabaseUser
   # (The database user.)
   $Self->{DatabaseUser} = 'otrs';
   # DatabasePw
   # (The password of database user. You also can use bin/CryptPassword.pl
   # for crypted passwords.)
   $Self->{DatabasePw} = 'some-pass';

Save by pressing Ctrl x, press y to save changes and press enter

Setup Dag Repositories

You need to activate the Dag reposity before installing this contrib.

see dag repository

Installation of needed perl modules

yum install mod_perl gd ImageMagick ImageMagick-perl gcc netpbm \
--enablerepo=base \
--enablerepo=updates \
--enablerepo=addons \
--enablerepo=dag 

Activate mod perl

config setprop modPerl status enabled
signal-event post-upgrade
signal-event reboot
yum install perl-GD perl-GD-Graph perl-GD-Graph3d \
perl-GD-Text-Util perl-Date-Pcalc perl-Email-Valid perl-PDF-API2 \
--enablerepo=base \
--enablerepo=updates \
--enablerepo=addons \
--enablerepo=dag 

After you have installed all modules you can use the script otrss.checkModules to check if OTRS has all needed perl modules.

cd /opt/otrs/bin/
./otrs.checkModules


                CGI ... ok
        Date::Pcalc ... ok
       Date::Format ... ok
                DBI ... ok
         DBD::mysql ... ok
        Digest::MD5 ... ok
   Crypt::PasswdMD5 ... ok
     LWP::UserAgent ... ok
         IO::Scalar ... ok
           IO::Wrap ... ok
       MIME::Base64 ... ok
        MIME::Tools ... ok
     Mail::Internet ... ok
           Net::DNS ... ok
          Net::POP3 ... ok
          Net::LDAP ... ok
          Net::SMTP ... ok
       Authen::SASL ... ok
                 GD ... ok
           GD::Text ... ok
          GD::Graph ... ok
   GD::Graph::lines ... ok
    GD::Text::Align ... ok
        XML::Parser ... ok
          PDF::API2 ... ok
     Compress::Zlib ... ok


Remove gcc for security reasons

yum remove gcc cpp

Execute also the three commands perl -cw bin/cgi-bin/index.pl and perl -cw bin/PostMaster.pl after changing into the directory /opt/otrs. If the output of both commands is "syntax OK", you have a proper perl installation to use with OTRS.

cd /opt/otrs
perl -cw bin/cgi-bin/installer.pl

bin/cgi-bin/installer.pl syntax OK

perl -cw bin/cgi-bin/index.pl

bin/cgi-bin/index.pl syntax OK

perl -cw bin/PostMaster.pl

bin/PostMaster.pl syntax OK

Configuring the apache web server

mkdir -p /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/
cd /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/
pico 98otrs

copy and paste between dotted lines

#==========================================================================

#OTRS

Alias /otrs/ "/opt/otrs/bin/cgi-bin/"
Alias /otrs-web/ "/opt/otrs/var/httpd/htdocs/"

PerlRequire /opt/otrs/scripts/apache2-perl-startup.pl

PerlModule Apache::Reload
PerlInitHandler Apache::Reload

MaxRequestsPerChild 400

<Location /otrs>
   ErrorDocument 403 /otrs/customer.pl
   ErrorDocument 403 /otrs/index.pl
   AllowOverride All
   SetHandler perl-script
   PerlResponseHandler ModPerl::Registry
   PerlOptions +ParseHeaders
   Options +ExecCGI +FollowSymlinks
</Location>
<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>

#=========================================================================

Save by pressing Ctrl x, press y to save changes and press enter

expand-template /etc/httpd/conf/httpd.conf
/etc/rc.d/init.d/httpd-e-smith restart
cd /opt/otrs/bin
sh SetPermissions.sh /opt/otrs www www

The errors generated from this script are because it assumes the presence of the 'nogroup' group so we have to substitute the 'nobody' group for the chown commands

chown -R www:nobody /opt/otrs
chown www:nobody /opt/otrs
chown -R www:nobody /opt/otrs/var/
chown -R www:nobody /opt/otrs/var/sessions/
touch && chown www:nobody /opt/otrs/var/log/TicketCounter.log

Configuring the database using the web installer

Go to URL http://localhost_or_ip/otrs/installer.pl to access the start page of the web installer. Just follow the few steps through the installation process you will need to configure the OTRS database via a web front-end If you are using MySQL for database back-end.



cd /root 

open or edit .my.cnf and copy and paste your mysql password into the Admin Password field as shown below

example
[client]
password=eox24kly-example-of-wat-the-mysql-psw-looks-like-aB8Zva6NezKT58bcLM7QsdOAJcmPj

you will also need to add the database name, database user name & password created as well as the from the database configuration that was done in the steps above Database Configuration


if all went well, press next

Add your details & press next

Remember the user name and password and click on the start page link

Login details

user: root@localhost

password: root

Setting up the cron jobs for OTRS

  Incomplete:
This article or section needs to be expanded. Please help to fill the gaps or discuss the issue on the talk page


Setting up the cron jobs for OTRS

OTRS needs some cron jobs to work properly. The cron jobs should be run with the same user rights that were specified for the OTRS modules. That means that the cron jobs must be inserted into the crontab file of the OTRS user.

All scripts with the cron jobs are located in var/cron in the home directory of the OTRS user.

Additional information

IMAP auth plugin

There is an OTRS plugin for authentication against an IMAP server available here. This plugin is useful when you set up ORTS for your internal users. Users authenticate against their SME IMAP accounts. You don't need to create OTRS accounts for each of your users manually.

Installation:

/usr/bin/yum --enablerepo=dag install perl-Net-IMAP-Simple
tar -C / -xf imap_auth.tar 

add this to /opt/otrs/Kernel/Config.pm

$Self->{'AuthModule'} = 'Kernel::System::Auth::IMAP';
$Self->{'AuthModule::IMAP::Server'} = 'aaa.bbb.ccc.ddd';
$Self->{'Customer::AuthModule'} = 'Kernel::System::CustomerAuth::IMAP';
$Self->{'Customer::AuthModule::IMAP::Server'} = 'aaa.bbb.ccc.ddd';

where aaa.bbb.ccc.ddd is the IP address of the IMAP Server.

Note: The plugin is tested on OTRS 2.1.2