Community wiki

Community wiki

Installing eGroupWare with MaxDB

Installing MaxDB on Linux

Download MaxDB from
I used the folowing Linux x86 rpm's:
  • Release independent: maxdb-ind-
  • Server: maxdb-srv75-
  • ODBC, JDBC: maxdb-callif-
  • Web tools: maxdb-web-
The webtools are only a webfrontend, to administrate (webdbm) or query (websql) the database. They are not used by eGW, but they might be useful for troubleshoting and development. They start their own webserver usualy on port 9999!
rpm -i maxdb*.rpm should install the rpm's. You might get a faild dependencie to, which can be solved on a RH system by up2date (installs the following rpms: compat-libstdc++, compat-libstdc++-devel, compat-gcc, compat-gcc-c++). You might need to install other / further packages to solve dependencies.
Now you can start the MaxDB server with /etc/init.d/maxdb75 start or already use your OS specific command to permanently start MaxDB when the system starts. Please note, you need to edit the /etc/init.d/maxdb75, if you which to start a certain database / instance on startup too. This is not done automaticaly by MaxDB! Therefor we first need to create the used MaxDB instance of cause:

Creating a MaxDB instance / database to install eGW

How to install a MaxDB instance from

MaxDB differs between 2 type of users:
  1. database-managers: dbm's can adminstrate the database (eg. use webdbm), but not query the db
  2. database-accessers dba's can only query the db (eg. use websql)

On a SuSE? system I use the following script to create the database:

# change these settings to the db-name, dbm-user and -pw, you want to use
dbmpass=<your dbm pw here>


if [ ! -x $cli ]
        echo "$cli not found or not executable"

# remove the comments from the following line to drop the db first
# $dbmcli -d $dbname -u $dbmuser,$dbmpass db_stop
# $dbmcli -d $dbname -u $dbmuser,$dbmpass db_drop

$dbmcli -s db_create $dbname $dbmuser,$dbmpass
# MAXUERTASKS need to be bigger then the number of apache-processes !!!
# SET LOG AUTO OVERWRITE ON cyclic overwrites the logs !!!
$dbmcli -d $dbname -u $dbmuser,$dbmpass << EOF
param_put MAXUSERTASKS 10
param_addvolume 1 LOG LOG_001 F 2000
param_addvolume 1 DATA DAT_001 F 10000
db_activate dba,<pw for dba>
load_systab -ud egw

On the RH enterprise server 3, it fails, so I:
  1. start the maxdb webserver: /etc/start/maxdbweb start
  2. point the browser to http://domain:9999/webdbm
  3. click on new database
    • give it just a name, eg. maxegw (standard egroupware is to long!)
    • define usernames and pw for dbm and dba users
    • the following pages are straight forward (just click next)
    • you only need to create data- and log-volumns
      • 1 data-volumn DAT_001 with eg. 10000 pages (1 page = 8k => ~80MB)
      • 1 log-volumn LOG_001 with eg. 2000 pages (1 page = 8k => ~16MB)
    • click next til it says the db instance is successfull created
  4. now we change the log-mode to start overwriting the log again from the beginning if its full. Else the db blocks, til you backup the logs. This can only be done with the commandline client dbmcli!
    • /opt/sdb/programs/bin/dbmcli -d maxegw -u dbm,<pw for dbm> << EOF
    • db_admin
    • util_connect
    • util_execute SET LOG AUTO OVERWRITE ON
    • util_release
    • EOF
  5. log into the webdbm, by using your db-name, dbm-account and -pw and switch the db to online

If you want the new DB / instance to be activated / useable automatical on systemstart, you need to edit the start-script /etc/init.d/maxdb75. There are comments inside helping you to find the right places (user and pw are the dbm user!)

configuring ODBC to enable php to access the DB

PHP can use 2 different ODBC libaries on linux systems:
unixODBC ( eg. on RH, or SuSE? 9.1+
iODBC ( eg. on SuSE? til 9.0 or .
Use phpinfo to find out, against which your php is linked. If you see no reference to ODBC, you probably need to install and/or load the module. The MaxDB rpm installs only unixODBC.
ODBC uses DSN's (data source names) to access db instances on whatever host: These DSN's need to be configured. There's a GUI client for iODBC as well as for unixODBC, but in my experience, the created config files dont work:
  • MaxDB is extremly picky about whitespace in this files
  • iODBC's odbcinst.ini file, is allways empty on SuSE? 9.0 at least

iODBC Installation (eg. SuSE? til 9.0):
  1. If it's not already the case you need to symlink /usr/spool to /var/spool (cd /usr; ln -s ../var/spool .)
  2. The configuration files for iODBC are in /etc/libiodbc the lib's in /usr/lib/libiodbc on SuSE? 9.0
    • odbc.ini Please note: use exactly the spaces used here (only before and after the = at Description), everything else will lead to a not working configuration!!! Please substitute MAXEGW with your DB name.
[ODBC Data Sources]
maxegw=Max DB 7.5

Description = Max DB 7.5

  • now link odbc.ini to /var/spool/sql/ini (cd /var/spool/sql/ini; ln -s /etc/libiodbc/odbc.ini)
  • odbcinst.ini
[ODBC Drivers]

Description = MaxDB 7.5
  • Now we need to copy the setup libary from /usr/lib/unixODBC to /usr/lib/libiocbc (cd /usr/lib/unixODBC; cp /usr/lib/libiodbc; cd /usr/lib/libiodbc; ln -s

unixODBC Installation (eg. RedHat? or SuSE? 9.1+):
  1. Find the unixODBC config directory /etc on RH (/etc/unixODBC on SuSE?) and the lib's /usr/lib on RH (/usr/lib/unixODBC on SuSE?)
  2. the config files have the same names as for libiodbc, but a slightly different syntax ;-)
    • odbc.ini Please note: use exactly the spaces used here (only before and after the = at Description), everything else will lead to a not working configuration!!! Please substitute MAXEGW with your DB name.
Description = MaxDB 7.5
  • now we need to link odbc.ini to /var/spool/sql/ini (cd /var/spool/sql/ini; ln -s /etc/odbc.ini)
  • odbcinst.ini
Description = MaxDB 7.5
  • unlike for libiodbc the setup libary is already in place from the MaxDB installation

Install eGroupWare on MaxDB

  1. Create a new domain in headeradmin
    • select MaxDB as db-type
    • the above defined DSN 'egw' need to be placed in the db-host field, db-port and db-name should be empty
    • db-user and db-password are from the created dba user (a dbm user will not work!)
    • select php4 sessions, as with db-sessions MaxDB complains about queries with the session-data are to big (for the way they are inserted/updated)
    • for the other setting consult the install & security howto
    • download or write the new configuration
  2. log into setup (upper login), it should say the db is ready and offers to install eGW
  3. from here on should be no difference to any other eGW install ...

Other resources:

These first install document was complied by RalfBecker. Feel free to add your experiences and/or tips ...

Back to AdminDocs
You are here