Vliegen.sietse.net Sietse.net
login De wederhelft Hosted by CSV-Networks
 
  :: Hoofdmenu
Start
eBlog
Fotogalerij
Downloads
OpenXchange
Zimbra
Vakanties
Londen 2008
Reno 2008
Nepal 2008
Praag 2008
Madrid 2007
Moskou-Peking 2007
Parijs 2006
Canada 2006
Polen 2006
Thailand 2005/6
Cannes 2005
Florida 2004
Rusland 2004

Vliegen
Weer
iWDL

Open-Xchange on RedHat 9 and Fedora Core 1/2/3/4 How-to

Version 1.6 (2005/09/26)

Introduction
This page ...

... will try to help you to setup Open-Xchange on your RedHat 9, Fedora Core 1, 2 3 or 4 box.

Open-Xchange ("OX") is a GPL Groupware solution provided by Netline. It's the "community" version of Novell/SUSE LINUX Openexchange Server ("SLOX").

Important: the way the software is installed here is good enough for testing purposes, but certainly not for a production environment (weak passwords, too many things done with the root user ...) !!! You have been warned ...

License

Copyright (c) 2004 Laurent FRANCOISE.
Copyright (c) 2004-2005 Sietse Visser.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".

GNU Free Documentation License

The license is here.

Legal

I am not responsible of the possible data losses caused by the use of this document ... blablabla ...

Fedora Core 3
Select another distribution than Fedora Core 3

The following chapters show the howto for Fedora Core 3. Click below for another distribution.

Show Show RedHat 9 howto
Show Show Fedora Core 1 howto
Show Show Fedora Core 2 howto
Show Show Fedora Core 3 howto
Show Show Fedora Core 4 howto

Before starting ...

The Open-Xchange software will be installed in$OX_INSTALL. For instance, OX_INSTALL=/usr/local/ox.

Most software is installed using yum and rpm.

I assume that you use a fresh install of FC3, updated with 'yum dist-upgrade'.

I suppose that your web host is called "myhost".

Pre-install
Fedora install
First, install a fresh copy of Fedora Core 3, do a yum update, add some lines in your /etc/apt/sources.list, and install some RPM's:

For Fedora Core 3:

We need packages from Dag Wieer's and the jpackage repository, so we install his key.
Please note, it took me ages to figure out the correct order for the installation of the packages. So if you divert from the order below, things may go wrong.

# Install dag.wieers his key
rpm --import http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txt

# Get the repo definitions for jpackage
cd /etc/yum.repos.d
wget http://jpackage.org/jpackage.repo

yum update
Download jdk, javamail, jaf and jta from Sun:
Go to http://java.sun.com/j2se/1.5.0/download.html and download jdk-1_5_0_04-linux-i586.bin for the jdk
Go to http://java.sun.com/products/javamail/downloads/index.html and download javamail-1_3_2-upd.zip.
Go to http://java.sun.com/products/javabeans/glasgow/jaf.html and download jaf-1_0_2-upd2.zip.
Go to http://java.sun.com/products/jta/ and download the class files and javadocs.

Now let's install the Sun JDK, and make rpm's out of javamail, jaf and jta.

cp <jdk linux bin file> /usr/src/redhat/SOURCES/jdk-1_5_0_04-linux-i586.bin
cp <javamail file> /usr/src/redhat/SOURCES/javamail-1_3_2.zip
cp <jaf file> /usr/src/redhat/SOURCES/jaf-1_0_2-upd.zip
cp <jta classes file> /usr/src/redhat/SOURCES/jta-1_0_1B-classes.zip
cp <jta doc file> /usr/src/redhat/SOURCES/jta-1_0_1B-doc.zip

rpm -Uvh http://mirrors.dotsrc.org/jpackage/1.6/generic/non-free/SRPMS/jaf-1.0.2-4jpp.nosrc.rpm \
         http://mirrors.dotsrc.org/jpackage/1.6/generic/non-free/SRPMS/jta-1.0.1-0.b.4jpp.nosrc.rpm \
         http://mirrors.dotsrc.org/jpackage/1.6/generic/non-free/SRPMS/javamail-1.3.2-1jpp.nosrc.rpm \
         http://mirrors.dotsrc.org/jpackage/1.6/generic/non-free/SRPMS/java-1.5.0-sun-1.5.0.04-1jpp.nosrc.rpm

cd /usr/src/redhat/SPECS
rpmbuild -ba java-1.5.0-sun.spec
yum install xorg-x11-deprecated-libs
rpm -Uvh /usr/src/redhat/RPMS/*/java-1.5.0-sun*

rpmbuild -ba javamail.spec
rpmbuild -ba jaf.spec
rpmbuild -ba jta.spec
rpm -Uvh ../RPMS/noarch/jaf* ../RPMS/noarch/jta* ../RPMS/noarch/javamail*

# Install some OX-required packages
rpm -Uvh http://apt.sw.be/packages/perl-Net-SSLeay/perl-Net-SSLeay-1.25-1.1.fc3.rf.i386.rpm \
         http://apt.sw.be/packages/perl-IO-Socket-SSL/perl-IO-Socket-SSL-0.96-1.1.fc3.rf.noarch.rpm \
         http://apt.sw.be/packages/perl-Authen-SASL/perl-Authen-SASL-2.08-1.1.fc3.rf.noarch.rpm

yum install \
    postgresql postgresql-server postgresql-libs httpd httpd-manual \
    xerces-j2 jdom mod_jk-ap20 perl-Convert-ASN1 perl-XML-NamespaceSupport  ant \
    tomcat5 tomcat5-admin-webapps xml-commons-apis

rpm -Uvh http://download.fedora.redhat.com/pub/fedora/linux/core/updates/3/i386/postgresql-jdbc-7.4.8-1.FC3.1.i386.rpm

service tomcat5 start
You can check whether tomcat installed allright by visiting http://myhost:8080/manager.
LDAP stuff
Fedora Core 3

The FC3 LDAP server is not compiled with --enable-aci, so Micah Quinn downloaded the source rpm, edited the openldap.spec file (it is here for the curious), and generated new RPM's.
Install openldap-servers-2.2.13_aci-2.i386.rpm:

rpm -e openldap-servers # Just in case, remove old version first
rpm -Uvh http://sietse.net/exoops/modules/OpenXchange/fc3/openldap-servers-2.2.13_aci-2.i386.rpm
yum install openldap-clients
service ldap start
Configure Postgres

First, start postgres:

service postgresql start

Edit the file /var/lib/pgsql/data/postgresql.conf and make sure there is a line with:

tcpip_socket = true

Edit the file /var/lib/pgsql/data/pg_hba.conf and make sure the following is in there:

local   all         all                                             trust
host    all         all         127.0.0.1         255.255.255.255   trust

Now restart postgres:

service postgresql restart
Users and groups

We need a few users and groups on Unix and Postgres to make the installation go without an error message.

useradd ox
su - postgres
createuser -A -D -P openxchange # asks a password, use xxx
createdb openxchange
exit
Installation

Go to http://mirror.open-xchange.org/ox/EN/community/download.htm and download open-xchange-0.8.0-5.tar.bz2
Make sure you set $OX_INSTALL to a sensible value, e.g. /usr/local/ox.

cd /usr/src/
tar xjvf /path/to/open-xchange-0.8.0-5.tar.bz2
cd /usr/src/open-xchange-0.8.0-5
export OX_INSTALL=/usr/local/ox
# On Fedora Core 3/4
./configure \
--prefix=$OX_INSTALL \
--with-mailjar=/usr/share/java/javamail.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/share/java/servletapi5.jar \
--with-jdbcjar=/usr/share/java/pg74.215.jdbc3.jar \
--enable-webdav \
--with-htdocsdir=/var/www/html \
--with-cgibindir=/var/www/cgi-bin \
--with-dbname=openxchange \
--with-dbuser=openxchange \
--with-dbpass=xxx \
--with-dbhost=localhost \
--with-runuid=ox \
--with-rungid=ox

# I added the following lines to the configure command for my own domainname:
--with-domain=sietse.net \
--with-organization="Home of Vogons" \
--with-basedn="dc=sietse,dc=net" \
--with-rootdn="cn=admin,dc=sietse,dc=net" \

make
make install

You can safely ignore the error message on 'missing' when running configure.

Post-installation
Login.pl

Try to enter the login screen, the URL is http://myhost/cgi-bin/login.pl

If you have an "Internal server error", check your apache logfiles and perl config.

Servlets

Copy intranet.class and webmail.class in the tomcat webapps tree :

cd /var/lib/tomcat5/webapps
mkdir servlet
mkdir servlet/WEB-INF
mkdir servlet/WEB-INF/classes
mkdir servlet/WEB-INF/lib
cd servlet/WEB-INF/
cp $OX_INSTALL/share/servlets/*.class classes/
cp $OX_INSTALL/lib/* lib/
mv lib/uadmin .
chown -R tomcat4:tomcat4 /var/lib/tomcat5

Now we need the file web.xml in /var/lib/tomcat5/webapps/servlet/WEB-INF. Here's mine: web.xml
Then, restart Tomcat.

cd /var/lib/tomcat5/webapps/servlet/WEB-INF
wget http://sietse.net/exoops/modules/OpenXchange/web.xml
service tomcat5 restart

Now, go to the URL http://myhost:8080/servlet/intranet. You should see a message "No running Server found" : it means that all is OK.

Otherwise, try to have a look at the Manager: http://myhost:8080/manager/html

To be able to pass the login prompt, you have to edit the file /etc/tomcat5/tomcat-users.xml and add a line like this:

<user username="themanager" password="thepassword" roles="manager"/>
Mod_jk

You must now explain to Apache that he has to work with Tomcat.

cp /usr/share/doc/mod_jk-ap20-1.2.8/workers.properties.sample /etc/httpd/conf/workers.properties
cp /usr/share/doc/mod_jk-ap20-1.2.8/mod_jk.conf.sample /etc/httpd/conf.d/mod_jk.conf
echo "JkMount /servlet/* ajp13" >> /etc/httpd/conf.d/mod_jk.conf
echo "JkMount /umin/* ajp13" >> /etc/httpd/conf.d/mod_jk.conf

Then restart Apache :

service httpd restart

You should now be able to go to the URL http://myhost/servlet/intranet and obtain again "No running server found"

Postgresql

It is time to populate the database :

psql -dopenxchange -h localhost -Uopenxchange -W -f $OX_INSTALL/share/init_database.sql
psql -dopenxchange -h localhost -Uopenxchange -W
INSERT INTO sys_gen_rights_template values
('now','admin','now','','default_template','y','y','y','y',
'y','y','y','y','y','y','y','y','y','y','y','y','y','y','y',
'y','y','y','y','y','y','y','y','y','y','y','y','y','y','y',
'y','y','y','y','y','y','y','y','y','y','y','y','y');
\q
LDAP

Edit your /etc/openldap/slapd.conf and from line 81 (RH9) or line 101 (FC1) or 68 (FC2/3) on make it look like:

database        ldbm
#suffix         "dc=my-domain,dc=com"
#rootdn         "cn=Manager,dc=my-domain,dc=com"
# Cleartext passwords, especially for the rootdn, should
# be avoided.  See slappasswd(8) and slapd.conf(5) for details.
# Use of strong authentication encouraged.
# rootpw                secret
# rootpw                {crypt}ijFYNcSNctBYg

# The database directory MUST exist prior to running slapd AND
# should only be accessible by the slapd and slap tools.
# Mode 700 recommended.
directory       /var/lib/ldap

# Indices to maintain for this database
#index objectClass                       eq,pres
#index ou,cn,mail,surname,givenname      eq,pres,sub
#index uidNumber,gidNumber,loginShell    eq,pres
#index uid,memberUid                     eq,pres,sub
#index nisMapName,nisMapEntry            eq,pres,sub

# Replicas of this database
#replogfile /var/lib/ldap/openldap-master-replog
#replica host=ldap-1.example.com:389 tls=yes
#     bindmethod=sasl saslmech=GSSAPI
#     authcId=host/ldap-master.example.com@EXAMPLE.COM

include         $OX_INSTALL/share/openxchange.schema

suffix "dc=example,dc=org"
rootdn "cn=Manager,dc=example,dc=org"
rootpw secret

index uid,mailEnabled,cn,sn,givenname,lnetMailAccess,alias,loginDestination eq,sub

Verify your path to openxchange.schema - you cannot use the varialbe $OX_INSTALL there!
Also, if you changed the basedn and rootdn during the configure step of OpenXchange, you must change suffix and rootdn here also.

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";'
CGPbeX4Qyrui2

Edit $OX_INSTALL/share/init_ldap.ldif and modify the line ...

userPassword: secret

... to the result of the perl command. In my example it is:

userPassword: {CRYPT}CGPbeX4Qyrui2

Now insert the LDAP data :

service ldap stop
rm -rf /var/lib/ldap/*
slapadd -l $OX_INSTALL/share/init_ldap.ldif
chown -R ldap:ldap /var/lib/ldap
service ldap start

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 :

Now modify your /etc/openldap/ldap.conf like this :

BASE dc=example,dc=org
HOST localhost

Again, if you don't want to spend another hour checking a stupid bug, don't put any space after the comma in dc=example,dc=org !!!
If you changed basedn during the configure of OpenXchange, you have to change BASE here also.

Create symbolic links like this :

ln -s /etc/openldap/ldap.conf $OX_INSTALL/etc/groupware/ldap.conf
ln -s /etc/openldap/ldap.conf $OX_INSTALL/etc/webmail/ldap.conf
Create a user

First, fix a bug in $OX_INSTALL/sbin/addusersql_ox: change /bin/java in /usr/bin/java.
Then, try your PostgreSQL / LDAP config by adding a user :

$OX_INSTALL/sbin/adduser_ox \
--username="john" \
--passwd="password" \
--name="doe" \
--sname="john" \
--maildomain="example.org" \
--ox_timezone="Europe/Amsterdam"

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:

$OX_INSTALL/sbin/addgroup_ox --group=developers
WebDav

Perform the following steps to install webdav. It seems to work, but I have not tested it very well.

service tomcat5 stop cd /var/lib/tomcat5/webapps/servlet/WEB-INF/classes
cp $OX_INSTALL/lib/webdav.jar .
jar xvf webdav.jar
cd ../lib
ln -s /usr/share/java/jdom.jar .
ln -s /usr/share/pgsql/pg73jdbc3.jar . # for RedHat 9
ln -s /usr/share/java/postgresql.jar . # for FC 1
ln -s /usr/share/java/pg74.215.jdbc3.jar . # for FC 2/3
touch $OX_INSTALL/var/log/jserv.log
chown tomcat4:tomcat4 $OX_INSTALL/var/log/jserv.log $OX_INSTALL/var/filespool
chown -R tomcat4:tomcat4 /var/lib/tomcat5 echo "JAVA_OPTS=\" -Dopenexchange.propfile=$OX_INSTALL/etc/groupware/system.properties\"" >> /etc/tomcat5/tomcat5.conf
service tomcat5 start

Three other steps have already been done elsewhere:

  • the --enable-webdav switch for ./configure;
  • servlet definitions in web.xml
  • JkMount in /etc/httpd/conf.d/mod_jk.conf.
Start Open Xchange

Now, all should be OK for starting. First, start the openxchange service :

$OX_INSTALL/etc/init.d/openexchange start

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 :

To show off webdav: install Mozilla Calendaring, go to mozilla broswer, type in the url http://localhost/servlet/webdav.ical and see what happens!

Webmail

Webmail works out-of-the-box if you have an imap server on the same machine as open-xchange, and the user-id's and passwords of open-xchange and the imap server match.
In case your imap server is somewhere else, the easiest way is to globally change the mailserver for open-xchange:

$OX_INSTALL/sbin/changeuserattr_ox --username=mailadmin --attrib=imapServer --value=yourServer

Still make sure the userid's and passwords match.

Acknowledgements

My acknowledgement goes to Laurent Francoise - I stole this document from him and made it into a Fedora document. He also put me on the right track for LDAP, I would never have found out...

Revisions
  • Version 0.1 -- First release
  • Version 0.2 -- Added license sections
  • Version 0.3 -- Fixed jta downloads and build
  • Version 0.4 -- Move to ox 0.7.1; fix ldap for webmail; add icons
  • Version 0.5 -- Removed manual perl module install by rpm's
  • Version 0.6 -- More RPM's, less manual stuff. Added RH9 and FC2 stuff
  • Version 0.7 -- Add webdav install
  • Version 0.8 -- Add webmail section
  • Version 0.9 -- FC2 updates, thanks to Micah Quinn. He also provided the openldap binaries for FC2. No more jsdk20. Move to 0.7.2
  • Version 1.0 -- More FC2 updates - I have a FC2 box now, and got everything compiling. Move to 0.7.4
  • Version 1.1 -- More FC2 updates after I had to re-install the machine...
  • Version 1.2 -- Update for all kinds of packages, including OX. Also reogranised howto: distribution is selectable
  • Version 1.3 -- Added FC3. Also, only show selected distribution.
  • Version 1.4 -- Added FC4.
  • Version 1.5 -- umin is now working; new web.xml downloadble
  • Version 1.6 -- added missing newline

To top

Search


 

- Pagina gemaakt in 0.05 seconden | 7 Bevragingen | 40 bestanden gelezen: 277.51 Kb | Platte HTML: 36.51 Kb -