Reply to comment

OTRS 2.4 - Manual Installation of OTRS on Windows with Active Perl

OTRS-Version: 
OTRS Version 2.4.x

 

Installation of the Apache Webserver

  • First step is to download the current Version of the apache webserver from: http://httpd.apache.org/download.cgi . Choose the Windows-Installer Version including OpenSSL for download.
  • Start the setup and type in the common serverinformation (Network Domain, Server Name etc.).
  • Then click on the "Next" button and choose as "Setup-Type" the entry called "Custom".
  • Click on "Change" to change the installation path to c:\otrs\apache .
  • Finish the installation using the wizard. 

Configuration of the Apache WebServer

  • Download the file "mod_perl.so" from http://cpan.uwinnipeg.ca/PPMPackages/10xx/x86/mod_perl.so and copy it to the following folder c:\otrs\apache\modules\ .
  • Open the apache configuration file with an text-editor:  C:\otrs\apache\conf\httpd.conf
  • Add the following code at the end of this file:
# ---
# OTRS configuration
# ---

# load mod_perl
LoadFile 'c:/otrs/perl/bin/perl510.dll'
LoadModule perl_module modules/mod_perl.so

# include the OTRS configuration
Include 'c:/otrs/otrs/scripts/apache2-httpd-new.include.conf'



Installation of the Mysql Databaseserver

 

  • First download the current version of the Mysql-Community-Server from: http://dev.mysql.com/downloads/ . Choose the windows installer version for download.
  • Start the setup and as "Setup-Type" choose "Custom".
  • Click on the button "Change" and change the install path to c:\otrs\mysql
  • Click on "Next" and then on "Install".
  • After the installation choose  "Configure the MySQL Server now" in the upcomming wizard and then click on "Finish".
  • Under Configuration choose "Server Machine" and then click on "Next".
  • Under "Database usage" choose "Non-Transactional Database Only" and then click on "Next".
  • On the following screen there is the possibility to select the number of the concurrent database connections. This value depends on the number of the users which will use otrs.
  • Click on "Next". Keep the default values for the "network options" and click again on "Next".
  • Under "Default character set" choose "Best Support for Multilingualism" and then click on "Next".
  • Under "Windows Options" select the checkboxes for  "Install As Windows Service" and "Include Bin Directory in Windows Path". Then click on "Next" again.
  • On the next screen type in a root-password. The root-password should be long and complex (containing letters, digits, special characters)
  • Click again on "Next", then on "Exceute" and on "Finish".
  • After completion of the installation two code lines must be added to the mysql-server configuration file. Open the following file with an text-editor C:\otrs\mysql\my.ini. At the end of the file add the following lines:

    max_allowed_packet = 10M
    query_cache_size = 20M  

  • Save the file and restart the mysql-service (Start / Control Panel / Administrative Tools / Services / Mysql)

 


OTRS Installation

  • Download the otrs-installation "OTRS 2.4.x zip (win32 platform)" from:  http://www.otrs.org/download
  • Extract the zip-file so that the otrs files are extracted in the following path c:\otrs\otrs
     

  

Perl-Installation

  • In our sample we use the perl distribution "Activestate ActivePerl 5.10". Download Active Perl 5.10 from: http://www.activestate.com/activeperl/
  • Don't use a newer Version of Perl. Just Download the 5.10 Version
  • Start the setup and choose c:\otrs\perl as installation path.

 

Install the Perl-Modules

For the installation of the perl-modules we use the Perl Paket Manager (PPM)

  • Start the Perl Package Manager: Windows-Startbutton / then click on "run" / type the word ppm in the field "Open" and click on "OK"
  • In the package manager click on "Edit" / "Prefereces" (Screenshot)

 

  • In the Perl Package Manager click on the tab called "Repositories" and add the following repositories:
  • After clicking on "Add" it will take a while for the ppm to load the repository. After that click on "OK"

 

  • Then change the view in the Package Manager. Click on "View" and choose "All Packages" (see Screenshot)


     

  • To install a module type the name of the module in the textfield (see screenshot). The search results are shown in a list. To install a module click on the module with the right mouse button and choose "Install". After that the module is marked for installation. Start the installation via the menue "File" and "Run marked actions".


     

  • The following modules must be installed:
    • TimeDate
    • Date-Pcalc
    • Encode-HanExtra
    • MIME-Tools
    • Compress-Zlib
    • DBD-mysql
    • Net-DNS
    • SOAP-Lite
    • PDF-API2
    • Net-SSLeay
    • Net-IMAP-Simple-SSL
    • perl-ldap
    • NET-SMTP-SSL
    • mod_perl (type mod_perl and scroll down the result list to find this module)
    • Authen-SASL
    • Apache-DBI
  • After the installation of all modules you can execute a script to check if all necessary modules are installed. Therefore copy the file c:\otrs\otrs\bin\otrs.checkmodules to c:\otrs\otrs\bin\otrs.checkmoduless.pl. So that the script file gets the .pl extension.
  • Open the command line and tpe in: c:\otrs\otrs\bin\otrs.checkmodules.pl
  • Start the script and check the result to see if all needed modules are installed.
  • After finnishing the installation of the perl-modules 2 files must be added manually.
  • Download the module "Apache-Reload" from: http://search.cpan.org/~phred/Apache-Reload-0.10/
  • Extract the downloaded file and copy the File  lib\Apache\Reload.pm to C:\otrs\perl\site\lib\Apache and the file lib\Apache2\Reload.pm to C:\otrs\perl\site\lib\Apache2

 

Configuration of OTRS

 

Configure Config.pm

  • Rename the file: C:\otrs\otrs\Kernel\config.pm.dist to config.pm
  • Open the file config.pm with an text editor.
  • Search for the following line $Self->{Home} = '/opt/otrs'; and replace that line with the following line:
$Self->{Home} = 'c:/otrs/otrs';
  • Below this line insert the following two lines and save the file.
$Self->{LogModule} = 'Kernel::System::Log::File'; 
$Self->{'LogModule::LogFile'} = 'C:/OTRS/OTRS/var/log/otrs.log';

 

Configure Apache2-httpd-new.include

  • Open the following file with an text editor:: C:\otrs\otrs\scripts\apache2-httpd-new.include
  • Search for the follwing lines and type an # as first character of each line:

    before:
    PerlModule Apache2::Reload
    PerlInitHandler Apache2::Reload

    after editing:
    #PerlModule Apache2::Reload
    #PerlInitHandler Apache2::Reload
     

  • Search for each of the following lines and replace them as mentioned below:

    search for: ScriptAlias /otrs/ "/opt/otrs/bin/cgi-bin/"
    replace with: ScriptAlias /otrs/ "c:/otrs/otrs/bin/cgi-bin/"

    search for: Alias /otrs-web/ "/opt/otrs/var/httpd/htdocs/"
    replace with: Alias /otrs-web/ "c:/otrs/otrs/var/httpd/htdocs/"

    search for: Perlrequire /opt/otrs/scripts/apache2-perl-startup.pl
    replace with: Perlrequire c:/otrs/otrs/scripts/apache2-perl-startup.pl

    search for: <Directory "/opt/otrs/bin/cgi-bin/">
    replace with: <Directory "c:/otrs/otrs/bin/cgi-bin/">

    search for: <Directory "/opt/otrs/var/httpd/htdocs/">
    replace with: <Directory "c:/otrs/otrs/var/httpd/htdocs/">
     

configure apache2-perl-startup.pl 

  • Open the following file with an text editor: C:\otrs\otrs\scripts\apache2-per-startup.pl
  • Search for the following lines and replace them as mentioned belows:

    search for:
    use lib "/opt/otrs/";
    use lib "/opt/otrs/Kernel/cpan-lib";

    replace with:
    use lib "c:/otrs/otrs/";
    use lib "c:/otrs/otrs/Kernel/cpan-lib";
     

  • Then search for the following lines:

    #use Apache::DBI ();
    #Apache::DBI->connect_on_init('DBI:mysql:otrs', 'otrs', 'some-pass');

    Uncomment the lines (delete the # character at the beginning of each line). Replace "some-pass" with the password of the database user called "otrs". The database user "otrs" will be created later in this installation process. Choose a complex password and afterwards use the same password in the web-installer (the position where to use this password is marked bold) below.
     


 

First Start of OTRS

 

  • Stop the apache webserver service (Start / Control Panel / Administrative Tools / Services / Apache) and start the service again.
  • On the otrs-server call the OTRS-Installer: http://localhost/otrs/installer.pl
  • Follow the steps in the wizard till you reach the following screen (see screenshot below). In the section "database" type in the field "admin-password" the administrator password of the mysql-database (use the same password you used during the installation of the mysql-server). Afterwards type in a complex password for the new Databaseuser "otrs".

  • On the next screen "Create Database (2/4)" click on "Next".
  • On the next screen type in the "System FQDN", the "admin e-mail" and the name of your organization (see screenshot).

  • Click on "Next" to finnish the installation.
  • Open the following file with an text editor: C:\otrs\otrs\scripts\apache2-httpd-new.include
  • Search for the two lines mention below and delete the # character at the beginning of each row:

    PerlModule Apache2::Reload
    PerlInitHandler Apache2::Reload
     

  • Save the file and then stop the apache webserver service and start it again.
  • The installation is finnished. Start your OTRS via the following URL::

    http://localhost/otrs/index.pl
    Username: root@localhost
    Password: root

 


Configuring the jobs for the task planer

  • For the full operation of otrs some cron jobs are needed. For example a cron job for the e-mail import is needed. In the following steps is described how to add the needed cron jobs to the windows system. You also find an overview of all the jobs and their command lines.
  • Start the task planer via: start / control panel / scheduled tasks
  • Add a new task
  • As application choose "Command Prompt" and click on "Next" (see screenshot)


     

  • Type in a name for the job. For example "DeleteExpiredSessions"


     

  • Select a start-time and click on "Next".
  • Choose a user which has administrative rights on the server (see screenshot) and click on "Next".


     

  • Click on the check box to select advanced properties (see screenshot)


     

  • In the field "execute" type in the command line (an overview of the command lines are mentioned below this article)


     

  • On the tab "schedule" click on "advanced" to define an advanced schedule and the frequency of the job (see screenshot)

 

Overview over the jobs for the taskplaner


Job description: Delete expired browser-sessions (DeletEexpiredSessions)

Commandline: c:\OTRS\perl\bin\perl.exe c:/OTRS/OTRS/bin/DeleteSessionIDs.pl --expired

Frequency: as needed


Job description: Start jobs of the generic agent. The jobs are defined in a separate configurationfile

Commandline: c:\OTRS\perl\bin\perl.exe c:/OTRS/OTRS/bin/GenericAgent.pl

Frequency: as needed


Job description: Start jobs of the gerenic agent. The jobs are defined in the administration section for the generic agent in the web interface.

Commandline: c:\OTRS\perl\bin\perl.exe c:/OTRS/OTRS/bin/GenericAgent.pl -c db

Frequency: as needed


Job description: E-Mail import

Commandline: c:\OTRS\perl\bin\perl.exe c:/OTRS/OTRS/bin/PostMasterMailbox.pl

Frequency: for example every 10 minutes


Job description: Reminder pending jobs

Commandline: c:\OTRS\perl\bin\perl.exe c:/OTRS/OTRS/bin/PendingJobs.pl

Frequency: as needed


Job description: Rebuild the ticket index for a faster queue view

Commandline: c:\OTRS\perl\bin\perl.exe c:/OTRS/OTRS/bin/RebuildTicketIndex.pl

Frequency: as needed


Job description: Unlock locked tickets

Commandline: c:\OTRS\perl\bin\perl.exe c:/OTRS/OTRS/bin/UnlockTickets.pl --timeout

Frequency: as needed


 

Your rating: None Average: 1 (20 votes)

Reply

The content of this field is kept private and will not be shown publicly.
Type the characters you see in this picture. (verify using audio)
Type the characters you see in the picture above; if you can't read them, submit the form and a new image will be generated. Not case sensitive.

Risk disclaimer

Please be aware that any information published on otrs-treff could be inaccurate or misleading. Using the published information is at your own risk. OTRS-Treff or any author of this site is not responsible for any consequential damages.