UserPreferences

OXDebianSargeFromPackage


Installing Open-Xchange on Debian Sarge from .deb packages.

Development stopped, see http://www.open-xchange.org/pipermail/user/2006-November/059403.html for details

Configure APT

Add the following lines to your /etc/apt/sources.list file, using this script:

cat >> /etc/apt/sources.list <<EOFile
#######################################################################
# Blackdown java packages
deb http://www.tux.org/pub/java/debian sarge non-free

# Open-Xchange and JavaMail packages
# Sorry, you have to build the package for yourself from the subversion repository:
# http://svn.debian.org/wsvn/pkg-openxchange 
 

#######################################################################
EOFile

Make sure you have contrib and non-free after your pre-existing debian sources

Update package database

apt-get update

Install and configure packages Open-Xchange depends on / recommends

Installation:

Please choose the defaults if you are not sure how to answer any questions, but do answer yes to enable tomcat web administration.

apt-get install postgresql tomcat4 tomcat4-webapps apache2 libapache2-mod-jk2 slapd courier-base courier-ldap courier-imap db4.2-util 

Configure packages Open-Xchange depend on

Configure Tomcat4

<tomcat-users>
...
   <role rolename="manager"/>
   <user username="tomcat" password="somepassword" roles="tomcat,manager"/>
...
</tomcat-users>
TOMCAT4_SECURITY=no
/etc/init.d/tomcat4 restart

Configure Apache2

a2enmod jk2
cp /usr/share/doc/libapache2-mod-jk2/examples/workers2.properties.minimal /etc/apache2/workers2.properties
    JkSet config.file /etc/apache2/workers2.properties
cat >> /etc/apache2/workers2.properties <<'EOFile'
[uri:/servlet/*]
worker=ajp13:localhost:8009

[uri:/umin/*]
worker=ajp13:localhost:8009
EOFile
/etc/init.d/apache2 restart

Configure PostgreSQL

Enable password based authentication, add the following line to /etc/postgresql/pg_hba.conf:

# added line :
  host    all    all    127.0.0.1   255.255.255.255   md5
# original line: (you can keep it, just insert the new line before it)
  host    all         all         127.0.0.1         255.255.255.255   ident sameuser

/etc/init.d/postgresql restart

Disable vacuumdb in /etc/cron.d/postgresql (causes login failures). Attention: you may need this cron job to keep your database stable. Additional comments appriciated!

# Run VACUUM ANALYSE on all databases every 5 hours
#2 0,5,10,15,20 * * 1-6 postgres        if ! pidof /usr/lib/postgresql/bin/pg_autovacuum > /dev/null && [ -x /usr/lib/postgresql/bin/do.maintenance ]; then /usr/lib/postgresql/bin/do.maintenance -a; fi

Courier Configuration

When you are asked - DO NOT select the web based configuration option for courier. This will cause the integration between OX and courier to break, and you will have to manually set up new mail users. (Could you mail me the details? I have a working configuration with web based configuration for courier. Balint Reczey)

You can get some configuration tips for Courier and other IMAP servers here: [WWW]MailServerSetup

Database creation (optional)

If you use a remote database or just want to create the database for yourself (not recommended!) follow these steps:

         postgres@yourhost:~$ /usr/bin/psql template1" <<-EOF
         CREATE USER < db user > WITH PASSWORD '< password >';
         EOF
        postgres@yourhost:~$ createdb -O openexchange -E UNICODE openexchange

Install and configure Open-Xchange

Javamail Download

When you will install open-Xchange, the debian package libsunmail-java will be installed.

This one require that you download the file javamail-1_3_3_01-upd.zip, and debconf suggest you a http location from where you can get it after accepting it's license.

Open-Xchange installation

Install the Open-Xchange Debian package, and read after how to answer to the other debconf packages questions:

apt-get install open-xchange open-xchange-theme-top-zenith # OR open-xchange-theme-top-crystal OR open-xchange-theme-top-crystal-boxed
You have to configure slapd while the open-xchange package's installation is running.

Configure LDAP

This step should be performed while open-xchange postinst script is running, when the script asks you:

 =================== Configuring open-xchange ===================
|                                                                |
| Read carefully /usr/share/doc/open-xchange/README.Debian NOW!  |
|                                                                |
|                             <Ok>                               |
|                                                                |
 ================================================================
       include         /etc/ldap/schema/open-xchange.schema
/etc/init.d/slapd stop; /etc/init.d/slapd start;

Now continue with the Open-Xchange installation selecting [OK]

After Installation

Restart OpenLDAP server by running:

/etc/init.d/slapd restart

It is possible that you have to restart Tomcat4 and Apache2 after installing/upgrading open-xchange:

/etc/init.d/tomcat4 restart  # should be restarted 1st
/etc/init.d/apache2 restart

Alternatively you can try deploying the installed servlets through Tomcat's manager interface by accessing the following URLs:

http://localhost:8180/manager/install?path=/servlet&war=servlet
http://localhost:8180/manager/install?path=/umin&war=umin
You will be asked for Tomcat administration username/password.

Using Open-Xchange

You can create users by running adduser_ox:

adduser_ox --username=testuser \
           --passwd=test \
           --name=John \
           --sname=Doe \
           --maildomain=test.org \
           --lang=EN \
           --mail_enabled=OK \
           --ox_timezone=Europe/Budapest \
           --write_global_address=TRUE

and you need to add the user to a group

addusertogroup_ox --user=testuser --group=users

After finishing installation You can login to Open-Xchange at https://yourhostname/cgi-bin/login.pl

Differences between the official Open-Xchange source and Debian packages

Migration

Under construction, do not try that on production machine yet! Feedbacks and corrections are welcome!

Migration from .tar.gz to .deb based install

Stop open-xchange server

Prerequisites

Installing Open-Xchange from source makes using Tomcat installation in /usr/local possible, but the Debian package relies on paths used by Tomcat packages, so use tomcat4 or tomcat5 debian packages.

Move files to it's new location

( if installed using./configure --prefix=/usr/local/openxchange )
mkdir /var/lib/open-xchange
mv /usr/local/openxchange/var/filespool /var/lib/open-xchange/
mv /usr/local/openxchange/var/settings /var/lib/open-xchange/
mv /usr/local/openxchange/var/drafts /var/lib/open-xchange/
mv /usr/local/openxchange/var/webmailupload /var/lib/open-xchange/
mv /usr/local/openxchange/var/dictionary /var/lib/open-xchange/

Removing files

Execute:
rm -r /usr/local/openxchange

Cleaning up after failed .deb install

apt-get remove --purge open-xchange slapd postgresql postgresql-client
rm -r /var/log/open-xchange /var/lib/open-xchange /var/lib/postgres /etc/postgresql
apt-get install slapd postgresql postgresql-client
apt-get install open-xchange

FAQ

Question: What is the state of the Debian package?

Answer: See: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=269329

Question: What is your email address?

Answer: balint_reczey AT yahoo DOT com.

Question: I got error code 403 when installing servlets on Tomcat4:

tomcatdeploy:

BUILD FAILED
/usr/share/open-xchange/tomcat.xml:40: java.io.IOException: Server
returned
HTTP response code: 403 for URL:
http://localhost:8180/manager/deploy?path=%2Fservlet

Answer: 403 HTTP Response code means Forbidden, check your Tomcat administration account settings.

Question: Kontact can not upload/download meetings/contacts

WebDAV file access willfail if the user does not belong to any group.

/usr/sbin/addusertogroup_ox --user=testuser --group=users

will solve that for the testuser.

Question: How can I change configuration values?

Answer: Just run:

dpkg-reconfigure open-xchange

Question: How do I install translation packages?.

Answer: Just run:
apt-get install open-xchange-groupware-i18n-it open-xchange-webmail-i18n-it
, where "it" should be changed to your language's two letter lowercase code.

Question: I get this errors when I start/stop apache2:

[error] config.update(): Can't create channel.jni:jni
[error] env.createBean2(): Factory error creating vm: ( vm, )
[error] config.update(): Can't create vm:
[error] env.createBean2(): Factory error creating worker.jni:onStartup ( worker.jni, onStartup)
[error] config.update(): Can't create worker.jni:onStartup
[error] env.createBean2(): Factory error creating worker.jni:onShutdown ( worker.jni, onShutdown)
[error] config.update(): Can't create worker.jni:onShutdown

Answer: I took the wrong workers2.properties:

/usr/share/doc/libapache2-mod-jk2/examples/workers2.properties <-- the one where the above errors occure /usr/share/doc/libapache2-mod-jk2/examples/workers2.properties.minimal <-- this one works for me

Question: I get this error when I try to adduser_ox:

sudo adduser_ox --username=mjb \
                --passwd=mypassword \
                 --name=Mal \
                 --sname=Beaton \
                  --maildomain=mydomaink.com.au \
                  --lang=EN_AU \
                 --mail_enabled=OK \
                 --ox_timezone=Australia/Brisbane \
                  --write_global_address=TRUE

invalid per syntax

Answer: "EN_AU" is not a valid language code in Open-Xchange, use "EN" instead.

Question: I get this error while open-xchange postinst script is running:

Error, entries missing!
  entry 1: dc=example,dc=org

Answer: Your LDAP and open-xchange configuration does not match, it is possible that you haven't changed the basedn in open-xchange configuration process.

Question: I get this error when I try to send mail:

MessagingException in ComposeMessage/sendMessage
Unable to send message.
Details: javax.mail.MessagingException: IOException while sending message;
  nested exception is:
        javax.activation.UnsupportedDataTypeException: no object DCH for MIME type text/plain; charset=us-ascii
Answer: The files activation.jar and sunmail.jar found in /usr/share/java do not match. download the zip packages jaf-1_1-ea.zip and javamail-1_3_3_01.zip currently located at http://java.sun.com/products/javabeans/jaf/downloads/ea/index.html and http://java.sun.com/products/javamail/downloads/index.html respectively. Replace /usr/share/java/activation.jar with the one in jav-1_1-ea.zip and /usr/share/sunmail.jar with mail.jar found in the javamail-1_3_3_01.zip. You may need to restart open-xchange (/etc/init.d/open-xchange restart) after doing this.

Wish list

I Wish: that we could seperate out the error resolutions from the faq section, and and into its own section, further divide that section up into types of errors like ldap, postgres, webmail etc. panman AT widewire DOT net

Known Bugs in current package version

upgrade to new version fails when using Tomcat5

Upgrade fails with :

File
exists
replace /var/lib/tomcat5/webapps/umin/META-INF/MANIFEST.MF? [y]es, 
[n]o,
[A]ll, [N]one, [r]ename: y

dpkg: error processing open-xchange (--configure):
 subprocess post-installation script killed by signal (Interrupt)

The cause is a bug in prerm script in .deb versions < 0.8.0.6-3 ( < 0.8.1.3-3 for development branch).

Fix: run:

rm -rf /var/lib/tomcat5/webapps/umin/
rm -rf /var/lib/tomcat5/webapps/servlet/
after failed upgrade and try the upgrade again

adduser_ox gives an SQL-error

When adding a user and you get

LDAP Success
SQL Error
Deleting User from LDAP
The forum tells that the up2date jdbc postgresql connector does not work, but older versions do if you have an postgresql error like this:
ERROR: column "creating_date" is of type timestamp with time zone but expression is of type character varying
Get pg74.215.jdbc3.jar from http://jdbc.postgresql.org/download.html and copy it to /var/lib/tomcat5/webapps/umin/WEB-INF/lib/ and /usr/share/java/. Do the following:
~# cd /var/lib/tomcat5/webapps/umin/WEB-INF/lib
/var/lib/tomcat5/webapps/umin/WEB-INF/lib# mv postgresql-jdbc3.jar postgresql-jdbc3.jar.old
/var/lib/tomcat5/webapps/umin/WEB-INF/lib# ln -s pg74.215.jdbc3.jar postgresql-jdbc3.jar
/var/lib/tomcat5/webapps/umin/WEB-INF/lib# cd /usr/share/java
/usr/share/java# mv postgresql-jdbc3.jar postgresql-jdbc3.jar.old
/usr/share/java# ln -s pg74.215.jdbc3.jar postgresql-jdbc3.jar
After that, adduser_ox will work.

Old (Resolved) Bugs

WebDAV is not working

After following the installation procedure here, the webdav isn't working. If you try to access webdav.documents you get "javax.servlet.ServletException: Load of configuration failed." This also happens when you try to access webdav.ical,...

Fix: It is a bug in pre-0.8.0.5-7 package versions, thanks to Tommie Van Mechgelenfor for submitting it. Use the last version to avoid it. Similar exceptions can happen when you do not wait enough for Tomcat4 to start up completely and try to access WebDAV too early. Just try again a bit later.

Installation hangs

The install procedure pauses at : Starting OXWebmail webmail module: done.

Fix: It is a bug in pre-0.8.0.5-7 package versions, thanks to Markus Schulz for hint about fix. Use the last version to avoid it.

Icons are just colored squares.

Fix: Just run:
apt-get install open-xchange-theme-top-zenith # OR open-xchange-theme-top-crystal OR open-xchange-theme-top-crystal-boxed

It was a lack of feature in pre-0.8.0.5-6 package versions.

Database is not initialized correctly

Fix:Relevant to 0.8.0.5-3 package version run:
dbinit_ox
Thanks to Christoph Thielecke for reporting it.