By Frank Neugebauer
Last Modified: 28/09/2004 8:11 PM
OPEN-XCHANGE™ is a collaboration and integration server environment with a continuous right management for modules and objects.
OPEN-XCHANGE™ ("OX") is a GPL Groupware solution provided by Netline.
It's the "community" version of Novell/SUSE LINUX OPEN-XCHANGE™ Server ("SLOX").
The product is based on existing components like a web server, mail server, directory server and a database.
OPEN-XCHANGE™ is JAVA™ based with some pieces of C for security components.
OPEN-XCHANGE™ provides the following modules:
This guide contains all the necessary information for installing and understanding the architectural layout of the implementation. It was written with the assumption that you understand how to install programs and have a basic understanding of Linux Mandrake. This includes installing Linux Mandrake and RPM packages, editing files, making directories, compiling software and understanding general UNIX commands. This guide doesn’t explain how to use or configure OPEN-XCHANGE™, Apache, Postfix, Cyrus and all the other server but information on where to obtain this information can be found in the “Additional information” section.
Please note, the way the software is installed here is good enough for testing purposes, but certainly not for a production environment. I am also not responsible of possible data losses caused by the use of this guide.
The guide is divided in three parts. In the first part we will perform a basic Mandrake 9.2 installation and the basic configuration of the needed servers. The second part continues with Java installation and compiling. This guide ends with the Post-Installation process and the basic OPEN-XCHANGE™ configuration.
1.0 Basic Mandrake 9.2 Installation
I’m using Mandrake Linux PowerPack 9.2 (9 CDs) for this installation. You can already find this distribution (DVD) in some computer magazines or please purchase the software here:
I don’t want to explain how to install Mandrake. It is very easy theses days. If you need help, please use the following link:
It is now time to specify which programs you wish to install on your system. There are thousands of packages available for Mandrake Linux, and to make it simpler to manage the packages have been placed into groups of similar applications. We just need a basis system. For that reason you should select the following groups:
· Console Tools
· KDE Workstation (or Gnome)
Additionally you need the following packages:
(urpmi openldap-servers openldap-migration)
PostgreSQL server is not setup on Mandrake by default (Client is, but not server), used control centre install to dowload server and jdbc.
login as root
# su - postgres
$ createuser youruser
Shall the new user be allowed to create databases? (y/n) y
Shall the new user be allowed to create more new users? (y/n) n
$ createdb youruser
# su youruser
Welcome to psql 7.3.2, the PostgreSQL interactive terminal.
youruser=> create table states (state_code varchar(2) primary key, state_name varchar(30) not null);
youruser=> insert into states(state_code, state_name) values ('VA','Virgina');
INSERT 16981 1
youruser=> insert into states(state_code, state_name) values ('MD','Maryland');
INSERT 16982 1
youruser=> select * from states;
state_code | state_name
VA | Virgina
MD | Maryland
Please use the Mandrake Control Center to perform an update of your software. By clicking on “Mandrake Update” the system will be connected to the nearest FTP server and will get security updates, bugfixes and normal updates.
1.1 Get Webmin running
It is time to get Webmin running. Webmin is a web-based interface for system administration for UNIX. Using any browser that supports tables and forms (and Java for the File Manager module), you can setup user accounts, Apache, DNS, MySQL, file sharing and so on. Webmin consists of a simple web server, and a number of CGI programs which directly update system files like /etc/inetd.conf and /etc/passwd. The web server and all CGI programs are written in Perl version 5, and use no non-standard Perl modules. Please get more information about Webmin here:
Honestly, we really do not need Webmin to get everything running, but it is a wonderful tool for a LINUX system administrator and it will help us to configure Apache, PostgresSQL, Open-LDAP and all other servers. After the installation please check if Webmin is already running:
If not, please start it like this:
You can now use the Webmin interface with your favorite browser via the following URLs:
https://localhost:10000 or https://IP-address:10000
1.2 Create users and databases
OPEN-XCHANGE™ needs few users and groups on Mandrake and PostgresSQL to make the installation go without an error message.
createuser -A -D -P openexchange
createdb openexchange exit
Note: Please remember the passwords.
1.3 Configure PostgreSQL
Please edit the following configuration file:
and make sure that the this line is anabled:
tcpip_socket = true
In the file /var/lib/pgsql/data/pg_hba.conf we need this the following:
local all all trust
host all all 127.0.0.1 255.255.255.255 trust
Please use Webmin to open PostgreSQL Database Server by clicking on Servers - PostgreSQL Database Server. You will find the database openexchange (just empty) and the openexchange user already installed. In this phase just make sure that PostgresSQL starts and stops without an error.
Note: You need the perl-DBD-Pg package installed to avoid error messages.
1.4 Configuring Apache2
To configure Apache2 use Webmin – Servers – Apache Webserver and click on Module Config.
Please change the following entries:
Path to httpd executable to: /usr/sbin/httpd2
Path to httpd.conf to: /etc/httpd/2.0/conf/httpd2.conf
Configure the necessary modules (just leave it like it is) and you will find the global configuration overview. In this phase just make sure that Apache starts and stops without an error message. We will configure it later.
1.5 Configuring Open-LDAP
To configure Open-LDAP use Webmin – Servers – OpenLDAP Server. Leave everything like it is. Just make sure that the daemon starts and stops without error.
2.0 Installing Java and compiling OPEN-XCHANGE™
This part is not so easy like the first part. We need to download a lot more rpm packages and other files from different locations. It is not always uncomplicated to find the correct file on the 9 Mandrake 9.2 CDs. I downloaded some software from Sun as well.
2.1 Java stuff
Lets go to Sun first. Download the following files and store them in your favourite installation directory: (i.e. /installations)
download the class files and javadocs.
download Java Servlet Development Kit 2.0 for Solaris (jsdk20-solaris2-sparc.tar.Z).
Install j2sdk like this:
chmod 700 j2sdk-1_4_2_05-linux-i586.bin
(need to add create java_home and add to path
Install javamail like this:
cp mail.jar /usr/share/java
Install jaf like this:
cp –R * /usr/share/java
Install Jta like this:
Unzip the following files and copy the content to /usr/share/java:
tar xzf jsdk20-solaris2-sparc.tar.Z
chown –R root:root JSDK2.0/
cp -R JSDK2.0 /usr/local/
2.2 Install additional RPM packages from Installation CD
Please use RPMDrake in Mandrake Control Center to install the following files:
We also need some perl libraries:
Note: If RPMDrake asks to install depended files, please do it.
2.3 Compiling OPEN-XCHANGE™ and first check
Please download the OPEN-XCHANGE™ from the following website and store it in your installation directory:
tar xzf open-xchange-0.7.1.tar.gz
./configure --prefix=/usr/local/ox --with-mailjar=/usr/share/java/mail.jar --with-activationjar=/usr/share/java/activation.jar --with-jdomjar=/usr/share/java/jdom.jar --with-xercesjar=/usr/share/java/xerces-j2.jar --with-jsdkjar=/usr/local/JSDK2.0/lib/jsdk.jar --with-jdbcjar=/usr/share/pgsql/pg73jdbc3.jar --with-runuid=ox --with-rungid=ox
chown –R ox:ox /usr/local/ox/var
Note: To avoid the following error message, you should start PostgrSQL sever first:
configure: WARNING: it seems that the database can not be reached ... maybe the application will not work as expected
Next we need to copy the following files to Apache’s cgi-bin directory: login.pl and login.pm
cp login.* /var/www/cgi-bin
Please try to enter the login screen using your favourite browser:
http://servername/cgi-bin/login.pl or http://IPaddress/cgi-bin/login.pl
I had an Internal Server error. Checking the Apache error log file I discovered the following message:
Can't locate auto/Net/SSLeay/randomize.al in @INC (@INC contains:
I found out that the RPM package perl-Net_SSLeay-1.25-mdk.i586.rpm doesn't have the file randomize.al.
Here is my workaround:
I regenerated the file SSLeay.pm with the following commands:
perl -e 'use AutoSplit; autosplit("Net/SSLeay", "auto", 0, 1, 1)'
2.4 Installing Jakarta Tomcat 5
Please download jakarta-tomcat-5.0.28.tar.gz from here and store it in you installation directory:
Install Tomcat like this:
tar xzf jakarta-tomcat-5.0.28.tar.gz
cp –R * /usr/local/tomcat
Use your favourite browser to check if tomcat is installed properly.
2.5 Installling Servlets
Copy intranet.class and webmail.class in the tomcat webapps tree :
cp /usr/local/ox/share/servlets/*.class .
Now create the file web.xml in
Use this as an example:
Servlet OpenXchange 0.7.1
The servlets won't work until you modify the classpath. So do this:
cp /usr/local/ox/lib/*.jar .
At the end do not forget to restart Tomcat 5 like this:
To check if everything is working fine, open you favourite Browser and go to the following URL:
You should see a message "No running Server found“: it means that all is OK.
2.6 Install Apache Module Mod_jk
I couldn’t find this Apache Module on the CDs. So I searched for files I can download out of the net. Here is my solution:
I downloaded jakarta-tomcat-connectors-jk2-2.0.4-src.zip
To compile the source we need to do the following steps:
This will create a folder called jakarta-tomcat-connectors-jk2-2.0.4-src. Rename it to jakarta-tomcat-connector.
Move this folder to wherever you store source files on your system. I used /usr/src.
copy –R jakarta-tomcat-connector /usr/src
Then run the buildconf script to create the configuration file.
Run the configure script with the path to the apxs file on your system and the options below:
Note: You need to install rpm package apache2-devel-2.0.47 first!
Build mod_jk2 with the following command:
If all went well, the mod_jk2.so file was successfully created. Manually copy it to Apache's shared object files directory:
cp /usr/src/jakarta-tomcat-connector/jk/build/jk2/apache2/mod_jk2.so /etc/httpd/2.0/modules
cp /usr/src/jakarta-tomcat-connectors-jk2-2.0.4-src/jk/native2/server/apache2/mod_jk2.c /etc/httpd/2.0/modules
cp /usr/src/jakarta-tomcat-connector/jk/native2/server/apache2/mod_jk2.c /etc/httpd/2.0/modules
Add the following line to the file /etc/httpd/2.0/conf/httpd2.conf:
LoadModule jk2_module modules/mod_jk2.so
Copy the file workers2.properties to /etc/httpd/conf
Restart Apache like this:
service httpd restart
3.0 Post-Installation and first run
3.1 Postgresql database
In the last part we’ll finally configure Postgresql, LDAP and will start the necessary services.
Lets start to populate the database. Just do the following:
psql -dopenexchange -h localhost -Uopenexchange -W -f /usr/local/ox/share/init_database.sql
psql -dopenexchange -h localhost -Uopenexchange -W
INSERT INTO sys_gen_rights_template values
3.2 Configuring LDAP
Edit your /etc/openldap/slapd.conf and add the following lines:
index uid,mailEnabled,cn,sn,givenname,lnetMailAccess,alias,loginDestination eq,sub
Now create a password as stated in the INSTALL file:
$perl -e 'print crypt("mypassword",pack("C2",(int(rand 26)+65),(int(rand 26)+65)))."\n";'
Edit /usr/local/ox/share/init_ldap.ldif and modify the line
... to the result of the perl command. In my example it is:
Now insert the LDAP data :
slapadd -l /usr/local/ox/share/init_ldap.ldif
If you have an error, check your config and try again until it works ... If you need to reset the LDAP database, here's the solution:
(you need to remove any duplicated entries from the indicated files,dont understand why these things are wrong out of the box?)
Note: Please check if all files in /var/lib/ldap are owned by ldap.
Now modify your /etc/openldap/ldap.conf like this:
Note: Do not put any space after the comma in dc=example,dc=org !!!
Create a symbolic link like this:
ln -s /etc/openldap/ldap.conf /usr/local/ox/etc/groupware/ldap.conf
3.3 Create a user
Let's try your PostgreSQL / LDAP config by adding a user:
adduser_ox --username="john" --passwd="password" --name="doe" --sname="john" --maildomain="example.org" --ox_timezone="Europe/Paris"
Check carefully the feedback of the command. Even if you have a green "OK" message, you can have an error message ... If this is the case, don't go further until it is corrected!
If we still follow the INSTALL file, we now add a openxchange group:
3.4 Website files preparation
Copy the following files to wwwroot (Mandrake normally uses /var/www/html)
3.5 Creating the filespool
The documentation says this script can "take some time". It's true! If you have a slow server, it is time for a tea or coffee.
Now, all should be OK for starting. First, start the openxchange service :
Then open the login page http://myhost/cgi-bin/login.pl, and login with the username and password supplied previously to the command adduser_ox :
4.0 Face Lifting
OK, what you now see is not nice. (no icons but ugly squares instead). Fortunately somebody did allady great work.
Please download the file ox_zenith_iconset-0.1.tar.gz from here:
Install the new icons like this:
tar xzf ox_zenith_iconset-0.1.tar.gz
cp * /var/www/html/cfintranet/images/top/EN/
cp * /var/www/html/cfintranet/images/top/DE/