back

These docs are valid for OBM 2.1.x Only specific OBM steps are described. To know how to install apache, php, mysql or others components, look in your distribution manuals.

Basic steps to build and install OBM 2.1.x

Assumptions

We suppose apache, php and a database server (mysql or postgres) are correctly installed and functionnal.
For pre-packaged distributions, check in your distribution docs.
In Debian, following packages must be installed:

We suppose that as an example the obm root is /var/www/obm

1: Get the source

Would be more difficult without it.
And uncompress it in /var/www (or where your document root will be located).

wget http://obm.aliasource.org/obm-archives/obm-2.1.0.tar.gz
tar -C /var/www -xzvf obm-2.1.0.tar.gz
cd /var/www
ln -s obm-2.1.0 obm

Set the correct files owner to the OBM sources (needed for safe_mode On, in documents)

cd /var/www/obm
chown -R www-data:www-data * (on Debian)
chown -R apache:apache * (on Redhat)

2: PHP (module and command line configuration)

PHP apache module config file :

Command line PHP must be configured too (Some tools (install script, admin tools) works or are also available with php in command line mode (php-cli).)

The include_path directive must be set :

include_path = ".:/var/www/obm"

To avoid some PHP warnings for a previous php version bug, turn on these 2 directives (and now OBM works with register_globals set to Off) :

session.bug_compat_42 = Off
session.bug_compat_warn = Off

Magic quotes must be On :

magic_quotes_gpc = On

and depending on obm file's owner (of course works well with safe_mode turne Off too !):

safe_mode = On

2.1: Check that php support mysql or postgresql

Depending on your database engine, one of these lines must be present in your php.ini (both module and command line if they are separated) :

extension=mysql.so
extension=pgsql.so

3: Apache and PHP configuration

OBM sources are in the php directory. Included files are in the obminclude directory.

Configure apache to process PHP files

In recent distribution (Debian,...) this step is automatically done when you install the packages.

Edit your apache2.conf (or httpd.conf or srm.conf) file and add:

AddType application/x-httpd-php .php

On RedHat 8 with apache2, check that your /etc/httpd/conf.d/php.conf is correct

OBM virtual host creation

We set up a virtual host to handle one occurence of OBM (there can be several on one server). In the virtual host section set :

Document root

Set your document root to : /var/www/obm/php

DocumentRoot /var/www/obm/php

OBM include directory

The name obminclude is now a variable to allow multiple OBM instances on the same code source base (only obminclude will differ which give different database, themes, langs... for each instances).

This variable is set through an environment variable in the obm virtual host sites-available/obm file (or in the apache httpd.conf file).

load the env module

LoadModule env_module /usr/lib/apache2/modules/mod_env.so (apache 2 sous Debian)
LoadModule env_module /usr/lib/apache/1.3/mod_env.so (apache 1.3 on Debian)
LoadModule env_module modules/mod_env.so (apache 2 on Redhat)

fill the OBM_INCLUDE_VAR with the name of the obminclude dir

Setenv OBM_INCLUDE_VAR obminclude

The path to php include files must be given. As a side note, the obminclude directory can be moved to another location.

fill the php include_path with the location of the obminclude

php_value include_path ".:/var/www/obm"

Images alias

Set an alias to images in the themes directory:

Alias /images /var/www/obm/resources

Directory Index

Set the directory index to obm.php

    DirectoryIndex obm.php

We strongly recommend to prevent direct access to .inc files

<Files ~ "\.inc$">
Order allow,deny
Deny from all
</Files>

Default Charset

OBM lang files are coded in latin 9. Set the charset to ISO-8859-15 (latin 9).
AddDefaultCharset ISO-8859-15

Complete virtual host block example

Be sure that your ip is defined as a named virtual host and enter this block
NameVirtualHost 102.168.1.5

<VirtualHost 192.168.1.5>
    ServerAdmin root@localhost
    DocumentRoot /var/www/obm/php
    ServerName obm
    ErrorLog /var/log/apache/obm-error.log
    CustomLog /var/log/apache/obm-access.log common
    SetEnv OBM_INCLUDE_VAR obminclude
    Alias /images /var/www/obm/resources
    DirectoryIndex obm.php
    AddDefaultCharset ISO-8859-15
</VirtualHost>

4: OBM configuration

Since OBM 2.0, the configuration is located in conf/obm_conf.ini and conf/obm_conf.inc files (before obm 2.0, the configuration was in the obminclude/obm_conf.inc file).

in the conf directory, copy the obm_conf.inc.sample and obm_conf.ini.sample files to obm_conf.inc and obm_conf.ini and edit them.

conf / all conf is in conf/ config directory
conf/obm_conf.ini Set database host, engine, user, password here
conf/obm_conf.inc OBM application configuration

4.1: Global OBM system configuration (needed before install)

4.1.1: Database configuration

Edit the obm_conf.ini in the conf/ directory and

; Database infos host = localhost
dbtype = MYSQL
db = obm
user = obm
; Password must be enclosed with "
password = "aliasource"

; Default language
lang = fr

4.1.2: Document repository

The document repository is automatically handled by OBM. In the install step OBM populate the repository configured with some structured directories for internal storage.

Declare your document repository in the obm_conf.inc file.

// Document : Root of the document repository
$cdocument_root = "/var/www/obmdocuments";

Make sure this directory is writable by the apache process

$ chown www-data:www-data /var/www/obmdocuments
or
$ chmod a+rwx /var/www/obmdocuments

4.2: OBM application configuration (can be tuned after install)

edit the obm_conf.inc file.

Set the $cgp_host with the access url, then you can set tune here your conf.

$cgp_host = "http://obm/";
...
$cdocument_root = "/var/www/obmdocuments/";
...
// is Mail enabled ? (agenda)
$cgp_mail_enabled = false;

4.3: Database Configuration and Creation

The scripts are in the scripts/2.1 directory.

4.3.1: MySQL

Requisite : you must know (or create) a valid mysql login/password

mysql user creation example (user obm / obm)

GRANT CREATE, DROP, SELECT, UPDATE, INSERT, DELETE, LOCK TABLES, INDEX ON obm.* TO obm@localhost IDENTIFIED BY 'obm';
(or simpler GRANT ALL ON obm.* TO obm@localhost IDENTIFIED BY 'obm';)

The script install_obmdb_2.1.sh handle all the database creation steps.

cd obm/scripts/2.1
./install_obmdb_2.1.sh

4.3.2: PostgreSQL

Create the obm user and create the obm database :

create user obm password 'obm';
create database obm with owner = obm;
4.3.2.1: Encoding

If your Postgres server is not configured with latin1 character set:
edit the file scripts/2.1/postgres-pre.sql and uncomment the line (now uncommented by default)

\encoding latin1

OBM should in the future be converted to UTF8 by default.

4.3.3.2: Install

The script install_obmdb_2.1.sh handle all the database creation steps.

cd obm/scripts/2.1
./install_obmdb_2.1.sh

5: Run OBM (access the obm.php from your browser)

# First restart your apache web server

/etc/init.d/apache restart

# If all goes well run firefox (or others browsers) and launch the url
yourvirtualhost/

Available users after install

login password profile domain
admin1 admin admin 1
editor1 editor editor 1
user1 user user 1
admin0 admin admin 0 (superadmin)

UPGRADE from version 2.0.x to version 2.1.x

Replace your current archive with the new one

Recreate the Artichow library link (should not be needed anymore as the link is now handled by subversion)
cd obminclude ln -s Artichow-1.1.0-php4+5/ Artichow

Update OBM configuration

OBM configuration has evolved.

Update Database model

# MySQL

mysql -u obm -pobm obm < scripts/2.1/update-2.0-2.1.mysql.sql

# Postgres

psql -U obm obm < scripts/2.1/update-2.0-2.1.pgsql.sql

Insert new default preferences values

The default preferences SQL file name has changed in 2.1

# MySQL

mysql -u obm -pobm obm < scripts/2.1/obmdb_prefs_values_2.1.sql

# Postgres

psql -U obm obm < scripts/2.1/obmdb_prefs_values_2.1.sql

Update data to new database model

cd scripts/2.1 php update-2.0-2.1.php

UPGRADE COMMON ACTIONS

Option: Restore default display values for each user

# In OBM, from the ADMINISTRATION section (must be connected with an admin user), go to the Prefs (or Preferences) module and execute the action user_pref_update (which drop preferences for each user, hence leading to default)

Option: Insert NAF code values

A naf code dump is available (french naf codes). It has not been updated from 1.0 one. If you want to insert these reference data :
# MySQL Naf code data

mysql -u obm -pobm obm < scripts/2.1/data-fr/obmdb_nafcode_2.1.sql

# Postgres Naf code data

psql -U obm obm < scripts/2.1/data-fr/obmdb_nafcode_2.1.sql

 

back