Skip to main content

Installation OTRS 3.1 on CentOS 6.2 Running PostGreSQL 9.1


I was working on getting and Ops tools for our IT Department,

I had heard a lot about OTRS, so though to try it out. I have installed OTRS in CentOS 6.2 Running PostGreSQL 9.1

Below are the steps to get it up and running.

Lets Start then.

System Information:
[ahmed@localhost ~]$ uname -a
Linux localhost.localdomain 2.6.32-220.7.1.el6.x86_64 #1 SMP Wed Mar 7 00:52:02 GMT 2012 x86_64 x86_64 x86_64 GNU/Linux
[ahmed@localhost ~]$ cat /etc/redhat-release
CentOS release 6.2 (Final)

Lets start by updating system (Optional)
[ahmed@localhost Downloads]$ sudo yum update
[ahmed@localhost Downloads]$ sudo yum update yum

Installing httpd
[ahmed@localhost Downloads]$ sudo yum install httpd

(Below command Optional - if already exsists)
[ahmed@localhost Downloads]$ sudo yum update httpd


Now lets Install PostgreSQL - Downloaded this from the below link.
http://www.enterprisedb.com/products-services-training/pgdownload

[ahmed@localhost Downloads]$ ls
OpenNMS-1.2.0.opm         postgresql-9.1.3-1-linux-x64.run
otrs-3.1.3-03.noarch.rpm  xampp-linux-1.7.7.tar.gz
[ahmed@localhost Downloads]$ sudo ./postgresql-9.1.3-1-linux-x64.run

Lets Download and check dependencies for OTRS.
Download link below:
http://ftp.otrs.org/pub/otrs/RPMS/fedora/4/otrs-3.1.3-03.noarch.rpm

[ahmed@localhost Downloads]$ wget http://ftp.otrs.org/pub/otrs/RPMS/fedora/4/otrs-3.1.3-03.noarch.rpm
[ahmed@localhost Downloads]$ rpm -qpR otrs-3.1.3-03.noarch.rpm
perl 
perl(DBI) 
perl(URI) 
mod_perl 
httpd 
procmail 
perl(Date::Format) 
perl(LWP::UserAgent) 
perl(Net::DNS) 
perl(IO::Socket::SSL) 
perl(XML::Parser) 
/bin/sh 
/bin/sh 
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(PayloadIsBzip2) <= 3.0.5-1

Now lets install all Dependencies.


[ahmed@localhost Downloads]$ sudo yum install perl "perl(DBI)" "perl(URI)" mod_perl procmail "perl(Date::Format)" "perl(LWP::UserAgent)" "perl(Net::DNS)" "perl(IO::Socket::SSL)" "perl(XML::Parser)"


Running Transaction
  Installing : 1:perl-ExtUtils-ParseXS-2.2003.0-119.el6_1.1.x86_64          1/8
  Installing : 4:perl-devel-5.10.1-119.el6_1.1.x86_64                       2/8
  Installing : perl-Test-Harness-3.17-119.el6_1.1.x86_64                    3/8
  Installing : perl-ExtUtils-MakeMaker-6.55-119.el6_1.1.x86_64              4/8
  Installing : perl-BSD-Resource-1.29.03-3.el6.x86_64                       5/8
  Installing : mod_perl-2.0.4-10.el6.x86_64                                 6/8
  Installing : perl-URI-1.40-2.el6.noarch                                   7/8
  Installing : perl-DBI-1.609-4.el6.x86_64                                  8/8

Installed:
  mod_perl.x86_64 0:2.0.4-10.el6          perl-DBI.x86_64 0:1.609-4.el6        
  perl-URI.noarch 0:1.40-2.el6          

Dependency Installed:
  perl-BSD-Resource.x86_64 0:1.29.03-3.el6                                     
  perl-ExtUtils-MakeMaker.x86_64 0:6.55-119.el6_1.1                            
  perl-ExtUtils-ParseXS.x86_64 1:2.2003.0-119.el6_1.1                          
  perl-Test-Harness.x86_64 0:3.17-119.el6_1.1                                  
  perl-devel.x86_64 4:5.10.1-119.el6_1.1                                       

Complete!

Now Install OTRS without Dependencies as we need to install it on PostgreSQL.

[ahmed@localhost Downloads]$ sudo rpm --nodeps -Uvh otrs-3.1.3-03.noarch.rpm
Preparing...                ########################################### [100%]
Check OTRS user ... otrs added.
   1:otrs                   ########################################### [100%]
Next steps:
[httpd services]
 Restart httpd 'service httpd restart'
[install the OTRS database]
 Make sure your database server is running.
 Use a web browser and open this link:
 http://localhost/otrs/installer.pl
[OTRS services]
 Start OTRS 'service otrs start' (service otrs {start|stop|status|restart).
((enjoy))
 Your OTRS Team
Now Check Again Dependencies if any are missing, you can install it using the below command.

[ahmed@localhost Downloads]$ cd /opt/otrs/bin
[ahmed@localhost bin]$ ./otrs.CheckModules.pl
   o CGI..............................ok (v3.59)
   o Crypt::PasswdMD5.................ok (v1.3)
   o CSS::Minifier....................ok (v0.01)
   o Date::Format.....................ok (v2.22)
   o Date::Pcalc......................ok (v1.2)
   o DBI..............................ok (v1.609)
..............


[ahmed@localhost bin]$ sudo yum install "perl(DBD::Pg)" "perl(Digest::SHA)" "perl(GD)" "perl(Text::CSV_XS)" "perl(PDF::API2)" "perl(Net::LDAP)" "perl(Mail::IMAPClient)" "perl(JSON::XS)" "perl(GD::Text::Align)" "perl(GD::Graph::lines)" "perl(GD::Graph)" "perl(GD::Text)" "perl(Encode::HanExtra)"

(Optional - Just an FYI) Missing Modules can be searched using this command.
[ahmed@localhost bin]$ yum --noplugins --showduplicates --enablerepo \* --disablerepo c6-media,\*debug\*,\*-source list \*pdf\*
[ahmed@localhost bin]$ yum --noplugins --showduplicates --enablerepo \* --disablerepo c6-media,\*debug\*,\*-source list \*json\*

Now create a user 'otrs' and update information as below.

[ahmed@localhost bin]$ ./psql -U postgres
Password for user postgres:
psql.bin (9.1.3)
Type "help" for help.

postgres=# create role otrs password 'hot' nosuperuser;
CREATE ROLE
postgres=# create database otrs owner otrs;
CREATE DATABASE
postgres=# alter role otrs with login;
ALTER ROLE
postgres=#\q

[ahmed@localhost database]$ cd /opt/otrs/scripts/database
[ahmed@localhost database]$ ./opt/postgresql/bin/psql -U otrs otrs -f otrs-schema.postgresql.sql
[ahmed@localhost database]$ ./opt/postgresql/bin/psql -U otrs otrs -f otrs-initial_insert.postgresql.sql
[ahmed@localhost database]$ ./opt/postgresql/bin/psql -U otrs otrs -f otrs-schema-post.postgresql.sql

# Add user otrs
[ahmed@localhost database]$ useradd -d /opt/otrs/ -c 'OTRS user' otrs

# Add otrs user to apache-group
[ahmed@localhost database]$ usermod -G apache otrs

# Change to otrs directory ( /opt/otrs/ )
[ahmed@localhost database]$ cd /opt/otrs/


Run the permission script.

[ahmed@localhost database]$ sudo /opt/otrs/bin/otrs.SetPermissions.pl /opt/otrs --otrs-user=otrs --web-user=apache --otrs-group=apache --web-group=apache
bin/otrs.SetPermissions.pl <1.4> - set OTRS file permissions
Copyright (C) 2001-2010 OTRS AG, http://otrs.org/
Setting permissions on /opt/otrs
Setting permissions on /opt/otrs/var
Setting permissions on /opt/otrs/bin/*
Setting permissions on /opt/otrs/scripts/*.pl
Setting permissions on /opt/otrs/scripts/tools/*.pl
Setting permissions on Kernel/Config.pm
Setting owner rw and group ro permissions on /opt/otrs/
Setting owner rw and group ro permissions on /opt/otrs/.procmailrc
Setting owner rw and group ro permissions on /opt/otrs/.fetchmailrc

MAKE SURE SELINUX is disabled.

[ahmed@localhost ~]$ vim /etc/sysconfig/selinux
[ahmed@localhost ~]$
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
#     targeted - Targeted processes are protected,
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted

Modify the default parameters, since mysql is the default database
open the file /opt/otrs/Kernel/Config.pm and
comment the line

    $Self->{DatabaseDSN}= "DBI:mysql:database=$Self->{Database};host=$Self->{DatabaseHost};";
to disable mysql, and uncomment the line
    $Self->{DatabaseDSN} = "DBI:Pg:dbname=$Self->{Database};";
and don't forget to set the dbuser and password to one you created some steps ago
 

 Now Lets start httpd
[ahmed@localhost Downloads]$ sudo /etc/init.d/httpd start
Starting httpd:                                                        [  OK  ]

PostgreSQL and OTRS.
[ahmed@localhost Downloads]$ sudo /etc/init.d/postgresql-9.1 start
[ahmed@localhost Downloads]$ sudo /etc/init.d/otrs start








Comments

Popular posts from this blog

Installing Zabbix Version 2.4 Offline (Zabbix Server without Internet).

There might be situations where you have a remote/zabbix server which does not have internet connectivity, due to security or other reasons. So we create a custom repo on the remote/zabbix server so that we can install zabbix using rpms Here is how we are planning to do this. Download all the dependency rpms on a machine which has internet connection, using yum-downloadonly or repotrack . Transfer all the rpms to the remote server. Create a repo on the remote server. Update yum configuration. Install. NOTE: This method can be used to install any application, but here we have used zabbix as we had this requirement for a zabbix server. Download dependent rpms . On a machine which has internet connection install the package below. And download all the rpms . Make sure the system are similar (not required to be identical - At-least the OS should be of same version) mkdir /zabbix_rpms yum install yum-downloadonly Downloading all the rpms to location /zabbix_rpms/ ,...

Access Filter in SSSD `ldap_access_filter` [SSSD Access denied / Permission denied ]

Access Filter Setup with SSSD ldap_access_filter (string) If using access_provider = ldap , this option is mandatory. It specifies an LDAP search filter criteria that must be met for the user to be granted access on this host. If access_provider = ldap and this option is not set, it will result in all users being denied access. Use access_provider = allow to change this default behaviour. Example: access_provider = ldap ldap_access_filter = memberOf=cn=allowed_user_groups,ou=Groups,dc=example,dc=com Prerequisites yum install sssd Single LDAP Group Under domain/default in /etc/sssd/sssd.conf add: access_provider = ldap ldap_access_filter = memberOf=cn=Group Name,ou=Groups,dc=example,dc=com Multiple LDAP Groups Under domain/default in /etc/sssd/sssd.conf add: access_provider = ldap ldap_access_filter = (|(memberOf=cn=System Adminstrators,ou=Groups,dc=example,dc=com)(memberOf=cn=Database Users,ou=Groups,dc=example,dc=com)) ldap_access_filter accepts standa...

Setting up ssl https On Nagios XI Server

HTTPS is a protocol for secure communication over a computer network which is widely used on the Internet. HTTPS consists of communication over Hypertext Transfer Protocol (HTTP) within a connection encrypted by Transport Layer Security or its predecessor, Secure Sockets Layer. The main motivation for HTTPS is authentication of the visited website and protection of the privacy and integrity of the exchanged data. Intro Courtesy Wikipedia Full SSL support requires Nagios XI version 2011R1.6 or later. Before we start. Check if the below packages are install, they should be if you are using latest Nagios XI, but check them anyways. yum install mod_ssl openssl Creating Key and Certificate Lets generate the key for the server. openssl genrsa -out ca.key 2048 Output for the command. [ahmed@nagiosserver ~]$ openssl genrsa -out ca.key 2048 Generating RSA private key, 2048 bit long modulus ...........................................................................................