Install OBM 2.5 on CentOS 6

System requirements

As of May 14, 2013 the latest available version is CentOS 6.4. Because of a PHP bug, it is recommanded to use OBM with an up-to-date CentOS (at least 6.3).

Hostname configuration

You need to configure the hostname (FQDN) you intend to use for the OBM virtual host in the following files:

/etc/hosts
/etc/sysconfig/network

Third-party Software

EPEL Repositories

root@host# rpm -Uvh  http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

JVM

OBM has an history of issues with OpenJDK. Furthermore, OBM as it is packaged currently, will not work with OpenJDK.

Thus, you should use the Oracle JVM RPM

Since license agreement becomes prior to download, you first have to download the .rpm.bin file on your workstation before sending it to your server.

Installation

The Oracle JVM rpm is quite broken and not compliant out-of-the-box with the alternatives system. First, you must install OpenJDK to have the java alternatives preconfigured properly for jre and java_sdk.

root@host# yum install java-1.6.0-openjdk-devel

If you want to use scp to send the Oracle rpm.bin to the server, you have to make sure the openssh-clients is installed on the server:

user@workstation$ yum install openssh-clients
root@host# mkdir java-rpm && cd java-rpm

Then, upload the downloaded archive from your workstation to the CentOS server, using scp for instance :

user@workstation$ scp jdk-6u35-linux-x64-rpm.bin root@[server ip or hostame]:/root/java-rpm

Back on the CentOS server :

root@host# sh /root/java-rpm/jdk-6u35-linux-x64-rpm.bin

Alternatives configuration

You will need to issues these commands. Be aware that it seems quite tricky to make alternatives work properly on some setups! You are advised to run these again and again until no more error messages appears.

alternatives --install /usr/bin/java java /usr/java/latest/jre/bin/java 20000
alternatives --install /usr/bin/javaws javaws /usr/java/latest/jre/bin/javaws 20000
alternatives --install /usr/bin/javac javac /usr/java/latest/bin/javac 20000
alternatives --install /usr/lib/jvm/java java_sdk /usr/java/latest/ 20000
alternatives --install /usr/lib/jvm/jre jre /usr/java/latest/jre/ 20000

You now should try and check the java version:

java -version

You should see java version "1.6.0.x"

Otherwise run:

alternatives --config java

Then choose the path /usr/java/latest/jre/bin/java.

Please ensure you have a fully-qualified domain name.

Exemple of something you musn't have :

$ hostname -f
hostname: Name or service not known

If you got this message, it seems that you have a different hostname setup in /etc/hostname and /etc/hosts.

Database Management System

Postgres 8.x

Nothing to do here : the official CentOS/RHEL 6 repositories provide Postgres 8.4, which is supported by OBM.

If you really want Postgres 9.1

For this to work, Postgres 9.1 must be the only PostgreSQL installation on this system

  • Repository configuration:
root@host# rpm -Uvh http://yum.postgresql.org/9.1/redhat/rhel-6-x86_64/pgdg-centos91-9.1-4.noarch.rpm
  • Installation:
root@host# yum install postgresql91-server
  • Additional configuration:

For seamless integration with obm-admin scripts, we create two symbolic links

root@host# ln -s /var/lib/pgsql/9.1/data /var/lib/pgsql/data
root@host# ln -s /etc/init.d/postgresql-9.1 /etc/init.d/postgresql
  • Now run the following command:
root@host# service postgresql-9.1 initdb

We also need to change standard_conforming_strings to off in postgres configuration

root@host# cat /var/lib/pgsql/9.1/data/postgresql.conf
...
standard_conforming_strings = off
...

MySQL

You need to have mysql, mysql-server and php-mysql installed before installing OBM.

So run the following commands:

root@host# yum install mysql mysql-server php-mysql

OBM

Repository Configuration

This command will fetch the rpm "release" package, which will create and maintain the yum repository file for you:

root@host# rpm -Uvh http://packages.obm.org/rpm/25/release/obm-release.noarch.rpm

This configuration enables the obm-stable repository by default.

For the moment, updates of the release RPM will replace your existing /etc/yum.repos.d/obm.repo and save the old one to obm.repo.orig or obm.repo.rpmsave.

OBM Installation

With Postgres

root@host# yum install obm-PostgreSQL
root@host# yum install obm-full

With MySQL

root@host# yum install obm-MySQL
root@host# yum install obm-full

First Configuration Example

Launch the obm-admin script:

root@host# obm-admin

The script will ask you a serie of questions. Here are some basic answers.

Typical answers of obm-admin

  • External URL of OBM: your host FQDN as in /etc/sysconfig/network
  • LDAP Server Name: IP address of the LDAP server or 127.0.0.1
  • Hosts types configuration:
  • "Enable module LDAP" y
  • "Enable module MAIL" y
  • "Enable module SAMBA" n
  • "Enable module WEB": n
  • Database configuration:
  • "Please enter the DataBase hostname": IP address or localhost
  • "Please enter the DataBase type (MYSQL/PGSQL)": PGSQL or MYSQL
  • "Enter the Database name":
  • "Enter the DataBase user":
  • "Enter the DataBase user password":
  • System users configuration
  • "LDAP password": default (enter)
  • "Enter admin cyrus password": default (enter)
  • "Do you want add syncrepl user?": default (no)
  • OBM UI configuration
  • "Choose the type of authentication": default (database)
  • "The /etc/httpd/conf.d/obm.conf file already exists. Do you want to replace it?": y
  • "What is the IP adress of the OBM-TOMCAT server": localhost
  • "What is the IP adress of the OPUSH server": localhost
  • "The slapd.conf file already exists. Do you want to replace it?": y
  • "Do you want to activate syncrepl for this LDAP?": n
  • "Do you want to activate SSL/TLS in LDAP ? ": n
  • OBM Cyrus configuration
  • "Do you want replace configuration ? ": y
  • OBM postfix configuration
  • "file /etc/postfix/main.cf already exist. Do you want replace this file ? ": y
  • "Please enter your relay host if you have it ": leave blank
  • "Please enter your 'mynetwork' (default empty) ": leave blank

Checking your setup

check that the URL (hostname FQDN) is the same in all the following files at the end of the install

  • /etc/hosts
  • /etc/sysconfig/network
  • /etc/httpd/conf.d/obm.conf
  • /etc/obm/obm_conf.ini

Restarting Jetty

root@host# service jetty6 restart

Activating services on boot

chkconfig cyrus-imapd on
chkconfig obm-tomcat on
chkconfig jetty6 on
chkconfig obm-satellite on
chkconfig postgresql on OR chkconfig mysqld on
chkconfig saslauthd on
chkconfig slapd on
chkconfig obm-locator on (since OBM 2.5.6)

System Configuration Tweaks

Warning on upgrade

Upgrading OBM from a version 2.5.x to any greater one, requires the restart of some services (or a reboot). The platform will not work properly otherwise.

service obm-tomcat restart
service jetty6 restart
service obm-satellite restart

Disable SELinux

First, set it to permissive using the command-line :

root@host# setenforce 0

Also disable it in /etc/selinux/config :

root@host# sed -i s/SELINUX=.*/SELINUX\=disabled/g /etc/selinux/config

You can also fix the issue anythere there is a httpd server installed :

root@host# setsebool -P httpd_can_network_connect 1

Disable IP tables

We cannot recommend those settings on a production server!

root@host# service iptables stop
root@host# chkconfig iptables off
root@host# service ip6tables stop
root@host# chkconfig ip6tables off

Disable IPv6

root@host# echo "net.ipv6.conf.all.disable_ipv6 = 1" >> /etc/sysctl.conf

Will be disabled on the next boot

Known issues

You may read this, which describes known issues with obm installation and functionalities.

Now that your installation is done, take a quick look at our Getting Started web page !

 

sneakers