This section is a guide for installing OTRS on any Linux. Please use this way only in case you feel comfortable with it otherwise use the RPM. Before starting the installation have a look at http://otrs.org/ and check if a newer and better version of the tar.gz file is available. If so please download it and use the newer documentation and the newer rpm.
On all Perl-Platforms! You need:
min. Perl5
Database (e.g. MySQL, PostgreSQL)
Webserver (mod_perl isn't required but very nice to have)
some CPAN-Module (CGI, MIME::Words, Mail::Internet, MIME::Parser, DBI, DBD::mysql, Digest::MD5) and for stats (GD, GD::Text, GD::Graph, GD::Graph::lines, Date::Calc)
Install the RPMs if your distributions provides RPMs for the CPAN modules.
Install the modules via CPAN (http://www.cpan.org/)
perl -MCPAN -e shell; ... install MIME::Words install MIME::Parser install Digest::MD5 ... |
... install GD install GD::Text install GD::Graph install GD::Graph::lines install Date::Calc ... |
shell> useradd -d /opt/OpenTRS/ otrs shell> cd /opt/ shell> tar -xzvf otrs-xxxx-xx.tar.gz shell> chown -r /opt/OpenTRS/* otrs |
Create OTRS database:
shell> mysql -u root -p -e 'create database otrs' |
Create the OTRS tables:
shell> cd /opt/OpenTRS/install/database/ shell> mysql -u root -p otrs < OpenTRS-schema.mysql.sql |
Insert inital data:
shell> cd /opt/OpenTRS/install/database/ shell> mysql -u root -p otrs < initial_insert.sql |
Create an database user:
shell> mysql -u root -p -e 'GRANT ALL PRIVILEGES ON otrs.* TO \ otrs@localhost IDENTIFIED BY "some-pass" WITH GRANT OPTION;' |
Reload the grant tables of your mysql-daemon:
shell> mysqladmin -u root -p reload |
Change the DB-Settings (host, database, user and password) in $OTRS_HOME/Kernel/Config.pm
[...] # Database # (The database name.) $Self->{Database} = 'otrs'; # DatabaseUser # (The database user.) $Self->{DatabaseUser} = 'otrs'; # DatabasePw # (The password of database user.) $Self->{DatabasePw} = 'some-pass'; [...] |
$HOME_OTRS/install/database/OpenTRS-schema.postgresql.sql
$HOME_OTRS/install/database/OpenTRS-schema.xml
The XML description files for torque which generate the SQL for your target database (e.g. MySQL, PostgreSQL, DB2, Oracle, ...)
More Infos: http://jakarta.apache.org/turbine/turbine-2/howto/torque-howto.html
$HOME_OTRS/install/database/initial_insert.sql contains all needed standard values. At first use the OpenTRS-schema.*.sql and the insert this file.
We prefer the Apache webserver. The following changes have to be made in the httpd.conf.
Change the webserver user (normaly wwwrun) to the OTRS user (otrs).
[...] User otrs [...] |
If you can't change the user and group of your webserver (system-wide), because you have other applications running on this server, you can also work with group permissions (more tricky). Use
$HOME/bin/SetPermissions.sh <OTRS_HOME> <OTRS_USER> \ <WEBSERVER_USER> [OTRS_GROUP] [WEB_GROUP] |
shell> SetPermissions.sh /opt/OpenTRS otrs otrs |
shell> SetPermissions.sh /opt/OpenTRS otrs wwwrun |
shell> SetPermissions.sh /opt/OpenTRS otrs apache |
Add this to the cgi-bin stuff section in httpd.conf
[...] ScriptAlias /otrs/ "/opt/OpenTRS/bin/cgi-bin/" [...] |
Add this to the mod_perl stuff section in httpd.conf
Alias /otrs/ "/opt/OpenTRS/bin/cgi-bin/" <Location /otrs> SetHandler perl-script PerlHandler Apache::Registry Options ExecCGI PerlSendHeader On </Location> |
[...] use Apache (); use Apache::DBI (); Apache::DBI->connect_on_init('DBI:mysql:otrs', 'otrs', 'some-pass'); # Apache::DBI->connect_on_init($data_source, $username, $auth, \%attr) [...] |
After you've done all this changes you have to restart Apache. The login page can be found at http://your-host/otrs/index.pl but please first use the http://your-host/otrs/installer.pl page to install the database.
Set some Kernel::Config Options (FQDN, SystemID, TicketHook, ...)
http://yourhost/otrs/index.pl
Admin-User: root@localhost
password: root
--> goto AdminArea and set some config settings (UserAdd, Queues, ...).
Finished. :-)
use the procmailrc of the OpenTRS-User --> /opt/OpenTRS/.procmailrc
--> send emails to the otrs user (e.g. otrs@localhost)
or pipe an email directly into $OTRS_HOME/bin/Postmaster.pl (e. g. 'cat /opt/OpenTRS/doc/test-email-1.box | /opt/OpenTRS/bin/PostMaster.pl').
Remark: For installation questions ask otrs@otrs.org (http://lists.otrs.org/).