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

Cloudera Manager - Duplicate entry 'zookeeper' for key 'NAME'.

We had recently built a cluster using cloudera API’s and had all the services running on it with Kerberos enabled. Next we had a requirement to add another kafka cluster to our already exsisting cluster in cloudera manager. Since it is a quick task to get the zookeeper and kafka up and running. We decided to get this done using the cloudera manager instead of the API’s. But we faced the Duplicate entry 'zookeeper' for key 'NAME' issue as described in the bug below. https://issues.cloudera.org/browse/DISTRO-790 I have set up two clusters that share a Cloudera Manger. The first I set up with the API and created the services with capital letter names, e.g., ZOOKEEPER, HDFS, HIVE. Now, I add the second cluster using the Wizard. Add Cluster->Select Hosts->Distribute Parcels->Select base HDFS Cluster install On the next page i get SQL errros telling that the services i want to add already exist. I suspect that the check for existing service names does n

Zabbix History Table Clean Up

Zabbix history table gets really big, and if you are in a situation where you want to clean it up. Then we can do so, using the below steps. Stop zabbix server. Take table backup - just in case. Create a temporary table. Update the temporary table with data required, upto a specific date using epoch . Move old table to a different table name. Move updated (new temporary) table to original table which needs to be cleaned-up. Drop the old table. (Optional) Restart Zabbix Since this is not offical procedure, but it has worked for me so use it at your own risk. Here is another post which will help is reducing the size of history tables - http://zabbixzone.com/zabbix/history-and-trends/ Zabbix Version : Zabbix v2.4 Make sure MySql 5.1 is set with InnoDB as innodb_file_per_table=ON Step 1 Stop the Zabbix server sudo service zabbix-server stop Script. echo "------------------------------------------" echo " 1. Stopping Zabbix Server &quo

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