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.
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:
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
|
Set the correct files owner to the OBM sources (needed for safe_mode On, in documents)
cd /var/www/obm
|
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
|
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
|
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
|
OBM sources are in the php directory. Included files are in the obminclude directory.
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
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 :
Set your document root to : /var/www/obm/php
DocumentRoot /var/www/obm/php
|
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)
|
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"
|
Set an alias to images in the themes directory:
Alias /images /var/www/obm/resources |
Set the directory index to obm.php>
DirectoryIndex obm.php |
We strongly recommend to prevent direct access to .inc files
<Files ~ "\.inc$">
|
AddDefaultCharset ISO-8859-15
|
NameVirtualHost 102.168.1.5
|
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 |
Edit the obm_conf.ini in the conf/ directory and
; Database infos
host = localhost
|
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
|
Make sure this directory is writable by the apache process
$ chown www-data:www-data /var/www/obmdocuments
|
edit the obm_conf.inc file.
Set the $cgp_host with the acces url, then you can set tune here your conf.
$cgp_host = "http://obm/";
|
The scripts are in the scripts/2.1 directory.
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';
|
The script install_obmdb_2.1.sh handle all the database creation steps.
cd obm/scripts/2.1
|
Create the obm user and create the obm database :
create user obm password 'obm';
|
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.
The script install_obmdb_2.1.sh handle all the database creation steps.
cd obm/scripts/2.1
|
# 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
cd obminclude
ln -s Artichow-1.1.0-php4+5/ Artichow
|
# 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
|
# 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
|
cd scripts/2.1
php update-2.0-2.1.php
|
# 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)
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
|