
OTRS is a famous Open Source software for implementing Help Desk and Service Desk systems. Service Desk is an important section of ITIL. ITIL is a best practices approach introduced by UK govenrment. OTRS is written in Perl by Martin Edenhofer and originally is designed to run in Linux, Apache and MySQL. In following, OTRS installation on Microsoft Windows Vista, IIS 7.0 and Microsoft SQL Server 2008 is described in 3 sections. Installing OTRS in Windows 2003 and Windows XP is not very different.
1. Installing ActiverPerl and IIS configuration
1.1. Active all IIS sections in Vista
1.2. Install ActivePerl from ActiveState
1.3. Run IIS
1.4. In Handler Mappings using "Add Script Map" add following script:
| *.pl | Request path |
| c:\Perl\bin\perl.exe "%s" %s | Executable |
| Perl Script Map | Name |
double click on the "Handler", click "Request Restriction" button, select Execute from "Access" tab and click "OK".
Click handler again, select "Edit feature Permissions..." and grant all rights.
1.5. Restart IIS.
1.6. Test IIS using following script. You should create a plain text file having .pl extension and putting it in wwwroot folder. After that you should create a new Virtual Directory in IIS. Test it by browsing in a browser. If you see the proper page you can go on otherwise don't progress until solve the problem:
#!/usr/bin/perl
print "Content-type: text/html\n\n";
print <<HTML;
<html>
<head>
<title>A Simple Perl CGI</title>
</head>
<body>
<h1>A Simple Perl CGI</h1>
<p>Hello World</p>
</body>
HTML
exit;
1.7. I have a sample web.config that may help in case of some problems with IIS:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<handlers accessPolicy="Read, Execute, Script">
<remove name="CGI Script Map" />
<remove name="Perl Script Map" />
<add name="Perl Script Map" path="*.pl" verb="*" modules="CgiModule" scriptProcessor="c:\Perl\bin\perl.exe "%s" %s" resourceType="Unspecified" requireAccess="Execute" />
<add name="CGI Script Map" path="*.cgi" verb="*" modules="CgiModule" scriptProcessor="c:\Perl\bin\perl.exe "%s" %s" resourceType="Unspecified" requireAccess="Execute" />
</handlers>
<staticContent>
<mimeMap fileExtension=".pl" mimeType="text/html" />
<mimeMap fileExtension=".cgi" mimeType="text/html" />
</staticContent>
</system.webServer>
</configuration>
1.8. Using following links may help you:
http://perl.about.com/od/perltutorials/a/hellocgi.htm
http://community.activestate.com/forum-topic/configuring-perl-on-iis-7
2. Database creation and ODBC configuration
2.1. Create a new database in MS SQL Server 2008 named otrs. Then run following scripts on it in the exact order. This scripts can be found in \scripts\database folder:
otrs-schema.mssql
otrs-initial_insert.mssql
otrs-schema-post.mssql
2.2. Create a new DSN in ODBC named otrs. This DSN must be created in System DSN section not User DSN.
2.3. If you have used "Windows Authentication" instead of "SQL Server Authentication" in your DSN, you must follow some extra steps to grant necessary access rights:
2.3.1. Create a new user in MS SQL Server Security named "NT AUTHORITY\IUSR":

2.3.2. Add this newly created user to OTRS database:

2.3.3. Grant "db_owner" role to user IUSR in OTRS database.
3. Installing OTRS source code and necessary configurations
3.1. Put OTRS source code (downloadable from otrs.org) in some folder on your hard disk preferably in wwwroot.
3.2. Create a new Virtual Directory in IIS 7.0 called otrs. It must be pointing to folder "bin\cgi-bin\".
3.3. Create another Virtual Directory named otrs-web pointing to folder "var\httpd\htdocs\".
3.4. For "var\log\" folder grant full access to IUSR user group. Log files are maintained in this folder. If this access is not granted sometimes HTML source code is displayed in user browser instead of rendered HTML.
3.5. For "bin\cgi-bin\" folder grant full access to IUSR user group again. If not, file attachment will not be impossible.
3.6. Create a copy of config.pm.dist and rename it to config.pm. This file could be found in "\Kernel" folder. If this file does not exists, users encounter "Misbehaved CGI" error.
3.7. Comment all "database settings" section using # sign and insert followings instead:
$Self->{DatabaseDSN} = "DBI:ODBC:DSN=otrs";
$Self->{"Database::Type"} = 'mssql';
$Self->{DatabaseUserTable} = 'users';
3.8. Edit "fs root directory" entry based on your source folder. Consider using slash character not back slash.
3.9. Insert following lines in the "data inserted by installer" section. Line 3 and 4 are necessary for Persian (Farsi) and some other languages. Don't forget to edit LogFile address based on your own installation.
$Self->{LogModule} = 'Kernel::System::Log::File';
$Self->{LogModule::LogFile} = 'd:/otrs/var/log/otrs_vista.log';
$Self->{'LogModule::SysLog::Charset'} = 'utf-8';
$Self->{DefaultCharset} = 'utf-8';
3.10. Run otrs by typing http://localhost/otrs/index.pl in your browser. Default user name is root@localhost and default password is root. After logging in change default password immediately.
NOTE: This instruction is an English translation of original document written in Persian(Farsi).