Install OTRS on W2008R2.pdf

download Install OTRS on W2008R2.pdf

of 6

Transcript of Install OTRS on W2008R2.pdf

  • 8/9/2019 Install OTRS on W2008R2.pdf

    1/12

    Installing and Configuring OTRS 3.0.9 on WindowsServer 2008 R2

    OTRS is an exceptionally flexible ITIL compliantticketing/helpdesk solution, which runs beautifully onalmost any LAMP (Linux, Apache, MySQL, Perl (yes,I know it’s PHP really;-)) server, but what happenswhen you work in a Windows-only environment?OTRS does have a Windows installer, but it is somewhat clunky and requires almost as muchwork to configure as manually installing. Installing as components allows you to upgrade

    portions of the system and have more granular control over the setup.

    I’ve recently installed OTRS on a Windows Server 2008 R2 (64-bit) server, includingexperimenting with various combinations of IIS/Apache, MSSQL2008/MySQL, ActiveStatePerl 32-bit/64-bit, different configurations and setups - these are my findings:

    • IIS7, MSSQL (64), ActiveState Perl (64) – to make use of the native IIS7 webserverand 64-bit Perl. The server does run but performs abysmally, and you have to forceIIS to run a 32-bit application pool to get Perl to work.

    • Apache2.2 (32), MSSQL (64) and ActiveState Perl (32) – again OTRS will run but performance is grim

    • Apache2.2 (64 unofficial binaries), MySQL (64) and ActiveState Perl (64) – thisseemed the most promising approach but without a 64-bit version of mod_perl the

    performance was worse than the final combo• Apache2.2 (32), MySQL (64) and ActiveState Perl (32) – this performed the best, and

    although there are slow portions (SysConfig) the general user experience was good.

    None of these combinations came close to the performance of OTRS running on a native Linux server, my 64-bit Ubuntu server absolutely flew, with less processor and RAM than theWindows box. In short, if you have the skills, use the Linux option. Yes, yes I do feel a littledirty now, sorry Mr Gates.

    So, the final setup I have opted for is:

    • A Virtual Machine running Windows Server 2008, 2GB RAM and 2 vCPUs at3.2Ghz

    • MySQL Server 5.5, 64-bit• Apache 2.2, 32-bit•

    ActiveState Perl, 32-bit

    Installing Apache HTTP Server

    Make sure you don’t have IIS running (eye-roll), and then click through the wizard…

  • 8/9/2019 Install OTRS on W2008R2.pdf

    2/12

    Configure the network and server details

    Do a custom installation and ensure that you install it to D:\Apache\

  • 8/9/2019 Install OTRS on W2008R2.pdf

    3/12

  • 8/9/2019 Install OTRS on W2008R2.pdf

    4/12

    Changes to MySQL’s default configuration file

    Stop the MySQL service and edit c:\Program Files\MySQL\MySQL Server 5.5\my.ini inyour favourite text editor– you will need to run it as an Administrator.

  • 8/9/2019 Install OTRS on W2008R2.pdf

    5/12

    Change the default data directory (you wouldn’t leave a MSSQL DB on the System drivewould you?!) – create a folder on the data drive (I use D:\MySQL\Data).

    #Path to the database rootdatadir="D:\MySQL\Data"

    Go to c:\ProgramData\MySQL\MySQL 5.5\data\ and move all the files and folders there tothe folder you specified for datadir.

    For performance, it’s also recommended that you change the query_cache_size to “32M”

    You can now start the MySQL service again.

    Installing ActiveState Perl

    You can download the 32-bit version of ActiveState Perl here:http://www.activestate.com/activeperl/downloads

    Run through the installation, accepting the defaults apart from changing the location of theinstallation to D:\Perl\:

  • 8/9/2019 Install OTRS on W2008R2.pdf

    6/12

  • 8/9/2019 Install OTRS on W2008R2.pdf

    7/12

  • 8/9/2019 Install OTRS on W2008R2.pdf

    8/12

    startup.pl startup.pl

    I performed a search/replace for “/opt” with “D:”, and checked through after.

    D:\OTRS\scripts\apache2-perl-startup.pl

    Change this …to this use lib "/opt/otrs/"; use lib "D:/otrs/";use lib "/opt/otrs/Kernel/cpan-lib"; use lib "D:/otrs/Kernel/cpan-lib";

    use lib "/opt/otrs/Custom"; use lib "D:/otrs/Custom";

    D:\OTRS\kernel\Config.pm

    Rename D:\OTRS\kernel\Config.pm.dist to Config.pm, and open Config.pm in your texteditor.

    Change this …to this$Self->{Home} = '/opt/otrs'; $Self->{Home} = 'D:/otrs';

    Add the following lines to configure logging:

    $Self->{'LogModule'} = 'Kernel::System::Log::File';$Self->{'LogModule::LogFile'} = "$Self->{Home}/var/log/otrs.log";

    Running the web installer

    Run http://localhost/otrs/installer.pl in your browser of choice and click through the initialdetails and accepth the licensing agreement:

    Enter the MySQL root user and password you created earlier, and test the settings

  • 8/9/2019 Install OTRS on W2008R2.pdf

    9/12

    Next configure a user, password, database name and create the database. you don’t have tochange the default names, but if you don’t change the password from the default “hot” tosomething complex, you deserve to get hacked!

    Configure the general system, FQDN, admin email address and logging

    Configure incoming and outbound email

    And finish!

  • 8/9/2019 Install OTRS on W2008R2.pdf

    10/12

    You can now log in to your OTRS installation – but we’re not finished yet!

    Configuring Scheduled Jobs

    The MSI installer uses Cron4Win, but in my experience it was barely working, clunky and

    not at all suitable for a production service. Since the jobs are just .pl scripts, it’s better to runthem from the Scheduled Tasks.

    Open up the Task Scheduler and run the Create Task action (not Create Basic Task). Namethe task and configure the user you want to run under. Ensure that you select to run whetherthe user is logged in or not, and run with elevated privileges. I have used a specific accountwith locked down privileges.

    Move on to the “Triggers” panel and create a schedule for the task (see the table below formy config)

  • 8/9/2019 Install OTRS on W2008R2.pdf

    11/12

    Move to the “Actions” panel and create an action to start a program and pass the script as anargument (again, see the table below for my config).

    You can accept the default settings for the rest of the panes.

    TaskName

    Triggers Program/Arguments

    OTRS 1MinuteActions

    At 00:00 Every day – Aftertriggered, repeat every 00:01:00indefinitely.

    d:\Perl\bin\perl.exe d:\OTRS\bin\otrs.PostMaster.pl

    OTRS10MinuteActions

    At 00:00 Every day – Aftertriggered, repeat every 10minutes indefinitely.

    d:\Perl\bin\perl.exe d:\OTRS\bin\otrs.GenericAgent.pl -c db

    OTRS

    15MinuteActions

    At 00:00 Every day – After

    triggered, repeat every 15minutes indefinitely.

    d:\Perl\bin\perl.exe d:\OTRS\bin\otrs.GenericAgent.pl

    OTRS 2HourActions

    At 00:00 Every day – Aftertriggered, repeat every 02:00:00indefinitely.

    d:\Perl\bin\perl.exe d:\OTRS\bin\otrs.PendingJobs.pld:\Perl\bin\perl.exe d:\OTRS\bin\otrs.DeleteSessionIDs.pl --expired

    OTRSDailyActions

    At 00:05 every day d:\Perl\bin\perl.exe d:\OTRS\bin\otrs.CleanUp.pld:\Perl\bin\perl.exe d:\OTRS\bin\otrs.RebuildTicketIndex.pl

    OTRS At 00:15 on 13/07/2011 – d:\Perl\bin\perl.exe d:\OTRS\bin\otrs.UnlockTickets.pl --timeout

  • 8/9/2019 Install OTRS on W2008R2.pdf

    12/12

    HourlyActions

    After triggered, repeatevery 1 hour indefinitely.

    OTRSWeeklyActions

    At 11:00 every Sunday ofevery week

    d:\Perl\bin\perl.exe d:/OTRS/bin/otrs.DeleteCache.pld:\Perl\bin\perl.exe d:/OTRS/bin/otrs.LoaderCache.pl -o delete

    Run each of the jobs manually to ensure that they process OK, without any errors. I haveexported my jobs as XML files, which are available here to download and import (assumingyou’ve put all the files in the same place as me!)

    That’s it, OTRS is ready for you to configure, which is way beyond the scope of this post!