Manuelle Installation (Linux, Unix)

Schritt 1: Installation des .tar.gz

If you want to install OTRS from source, first download the source archive as .tar.gz, .tar.bz2, or .zip file from http://www.otrs.com/try/

Entpacken Sie das Archiv (zum Beispiel mit tar) in das Verzeichnis /opt und benennen Sie das entpackte Verzeichnis von 'otrs-x.x.x' in 'otrs' um (siehe unteres Beispiel)

shell> tar xzf /tmp/otrs-x.x.x.tar.gz
shell> mv otrs-x.x.x /opt/otrs
        

Schritt 2: Installation zusätzlicher Perl-Module

Use the following script to get an overview of all installed and required cpan modules.

shell> perl /opt/otrs/bin/otrs.CheckModules.pl
o CGI..............................ok (v3.60)
o Crypt::PasswdMD5.................ok (v1.3)
o Crypt::SSLeay....................Not installed! (Optional - Required for Generic Interface SOAP SSL connections.)
o CSS::Minifier....................ok (v0.01)
o Date::Format.....................ok (v2.22)
o Date::Pcalc......................ok (v1.2)
...
            

To install missing Perl modules, you can:

a) Installieren Sie die Pakete über den Paketmanager Ihrer Linuxdistribution

  • Für Red Hat, CentOS, Fedora oder kompatible Systeme:

    shell> yum install "perl(Digest::MD5)"
                            

  • For SUSE Linux Enterprise Server, openSUSE or compatible systems: first determine the name of the package the module is shipped in. Usually the package for My::Module would be called "perl-My-Module".

    shell> zypper search Digest::MD5
                            

    Then install:

    shell> zypper install perl-Digest-MD5
                            

  • For Debian, Ubuntu or compatible systems first determine the name of the package the module is shipped in. Usually the package for My::Module would be called "libmy-module-perl".

    shell> apt-cache search Digest::MD5
                            

    Then install:

    shell> apt-get install libdigest-md5-perl
                            

    Please note that it might be that you can't find all modules or their required versions in your distribution repository, in that case you might choose to install those modules via CPAN (see below).

b) Installieren Sie die benötigten Module über die Shell mit CPAN

Note that when you're on Linux you should run CPAN as your superuser account because the modules should be accessible both by the OTRS account and the account under which the web server is running.

shell> perl -MCPAN -e shell;
...
install Digest::MD5
install Crypt::PasswdMD5
...
                

Any optional modules listed by the script should be installed depending on the special requirements of the target system.

Schritt 3: OTRS-Nutzer erstellen

Create user:

shell> useradd -d /opt/otrs -c 'OTRS user' otrs
            

Add user to webserver group (if the webserver is not running as the OTRS user):

shell> usermod -G www otrs
(SUSE=www, Red Hat/CentOS/Fedora=apache, Debian/Ubuntu=www-data)
            

Schritt 4: Aktivieren der Standard-Konfigurationsdateien

There are two OTRS config files bundled in $OTRS_HOME/Kernel/*.dist and $OTRS_HOME/Kernel/Config/*.dist. You must activate them by copying them without the ".dist" filename extension.

shell> cd /opt/otrs/
shell> cp Kernel/Config.pm.dist Kernel/Config.pm
shell> cp Kernel/Config/GenericAgent.pm.dist Kernel/Config/GenericAgent.pm
    

Schritt 5: Überprüfen Sie ob alle benötigten Module installiert sind

shell> perl -cw /opt/otrs/bin/cgi-bin/index.pl
/opt/otrs/bin/cgi-bin/index.pl syntax OK

shell> perl -cw /opt/otrs/bin/cgi-bin/customer.pl
/opt/otrs/bin/cgi-bin/customer.pl syntax OK

shell> perl -cw /opt/otrs/bin/otrs.PostMaster.pl
/opt/otrs/bin/otrs.PostMaster.pl syntax OK
            

"syntax OK" meldet, dss alle benötigten Perl-Module installiert sind.

Schritt 6: Konfiguration des Apache-Webservers

First of all, you should install the Apache2 web server and mod_perl; you'd typically do this from your systems package manager. Below you'll find the commands needed to set up Apache on the most popular Linux distributions.

# rhel / centos:
shell> yum install httpd mod_perl

# suse:
shell> zypper install apache2-mod_perl

# debian/ubuntu:
shell> apt-get install apache2 libapache2-mod-perl2
        

Um die Oberfläche von OTRS bequem erreichen zu können, wird ein Alias- und ein ScriptAlias-Eintrag angelegt. Für die meisten Installationen des Apache Webservers gilt, dass ein Verzeichnis mit dem Namen conf.d vorhanden ist, unter Linux ist es meist unterhalb des Verzeichnisses/etc/apache bzw. /etc/apache2 zu finden. Wechseln Sie als root in dieses Verzeichnis und verlinken Sie die passende Konfigurationsvorlage in /opt/otrs/scripts/apache2-httpd.include.conf in die Datei zzz_otrs.conf (um sicherzustellen, dass die Datei nach den anderen Konfigurationen geladen wird).

Starten Sie Ihren Webserver neu, um die neue Konfiguration zu laden. Auf den meisten Systemen lässt sich der Webserver über den Befehl /etc/init.d/apache2 restart neu starten.

Das war bereits die grundlegende Konfiguration des Webservers für OTRS.

Schritt 7: Dateiberechtigungen

File permissions need to be adjusted to allow OTRS to read and write files:

otrs.SetPermissions.pl [ --otrs-user= OTRS user, defaults to 'otrs' ] { --web-group= group of the web server user }

For example:

  • Webserver der als OTRS user läuft:

    shell> bin/otrs.SetPermissions.pl --web-user=otrs
                    

  • Webserver der als wwwrun User läuft (z.B.: SUSE):

    shell> bin/otrs.SetPermissions.pl --web-group=wwwrun
                    

  • Webserver der als apache User läuft: (z.B.: Red Hat, CentOS):

    shell> bin/otrs.SetPermissions.pl --web-group=apache
                    

  • Webserver der als www-data User läuft (z.B.: Debian, Ubuntu):

    shell> bin/otrs.SetPermissions.pl --web-group=www-data
                    

Schritt 8: Datenbankeinrichtung und grundlegende Systemkonfiguration

Please use the web installer at http://yourhost/otrs/installer.pl (replace "yourhost" with your OTRS hostname) to setup your database and basic system settings such as email accounts.

Schritt 9: Erste Anmeldung

Now you are ready to login to your system at http://yourhost/otrs/index.pl with the credentials you configured in the web installer (User: root@localhost).

Nach diesem Schritt ist das Basis-Systemsetup beendet.

Schritt 10: Erste E-Mail

To check email reception, you can pipe an email directly into /opt/otrs/bin/otrs.Postmaster.pl:

shell> cat /opt/otrs/doc/sample_mails/test-email-1.box | /opt/otrs/bin/otrs.PostMaster.pl
    

Schritt 11: Cronjobs für die OTRS-Nutzer

There are several OTRS default cronjobs in /opt/otrs/var/cron/*.dist. They can be activated by copying them without the ".dist" filename extension.

shell> cd var/cron
shell> for foo in *.dist; do cp $foo `basename $foo .dist`; done
    

To schedule these cronjobs on your system, you can use the script Cron.sh. Make sure to execute it as the OTRS system user!

Scheduling the cronjobs for the first time:

shell> /opt/otrs/bin/Cron.sh start
    

Updating the cronjob schedules if you made changes:

shell> /opt/otrs/bin/Cron.sh restart
    

Stopping the cronjobs (useful for maintenance):

shell> /opt/otrs/bin/Cron.sh stop
    

Note: From OTRS 3.3.7 on OTRS Scheduler uses a cronjob to start-up and keep alive. Please make sure that scheduler_watchdog cronjob is activated.

Schritt 12: Weitere Informationen

We advise you to read the OTRS performance tuning chapter.

If you encounter problems with the installation, you can send a message to our mailing list otrs@otrs.org (http://lists.otrs.org/).

You can also ask the OTRS Group to either help you in planning or deploying OTRS, or review your installed OTRS system. Our professional services are designed to help you deploy OTRS faster and to get the most benefit out of OTRS.