JavaMail (2,3 MB):
There are two versions of javamail, consider to try the 1.4-ea or the 1.3.3.01 (both working)
lynx 'http://java.sun.com/products/javamail/downloads/index.html'
-> download -> accept, continue -> download now -> D (Download), save as, name: javamail-1_3_3_01.zip _OR_ javamail-1_4-ea.zip
Activation (360 KB):
lynx 'http://java.sun.com/products/javabeans/glasgow/jaf.html'
-> download -> download now -> accept, continue -> download now -> D (Download), save as, name: jaf-1_0_2-upd2.zip
JSDK (470 KB):
lynx 'http://java.sun.com/products/servlet/archive.html'
-> Java Servlet development kit 2.1: download -> accept, continue -> Download now -> D (Download), save as, name: jsdk2_1-solsparc.tar.Z
In order to get TomCat working, modify the root ~/.profile file adding:
echo 'JAVA_HOME=/usr' >> /root/.profile
echo 'CATALINA_HOME=/usr/local/tomcat' >> /root/.profile
echo 'TOMCAT_HOME=$CATALINA_HOME' >> /root/.profile
echo 'ANT_HOME=/usr/local/ant' >> /root/.profile
echo 'OX_HOME=/usr/local/openxchange' >> /root/.profile
echo 'PATH=$PATH:$JAVA_HOME/bin:$CATALINA_HOME/bin:$ANT_HOME/bin:$OX_HOME/bin:$OX_HOME/sbin' >> /root/.profile
echo export PATH JAVA_HOME CATALINA_HOME TOMCAT_HOME ANT_HOME OX_HOME >> /root/.profile
Now install the downloaded software:
cd /usr/local
tar xzvf /root/xchange/jakarta-tomcat-5.0.28.tar.gz
ln -s /usr/local/jakarta-tomcat-5.0.28 /usr/local/tomcat
tar xzvf /root/xchange/apache-ant-1.6.5-bin.tar.gz
ln -s /usr/local/apache-ant-1.6.5 /usr/local/ant
mkdir jdbc
cp /root/xchange/pg74.216.jdbc3.jar jdbc
unzip /root/xchange/javamail-1_3_3_01.zip
ln -s javamail-1.3.3_01 /usr/local/javamail
unzip /root/xchange/jaf-1_0_2-upd2.zip
ln -s /usr/local/jaf-1.0.2 /usr/local/jaf
tar xzvf /root/xchange/Xerces-J-bin.2.8.0.tar.gz
ln -s /usr/local/xerces-2_8_0 /usr/local/xerces
mkdir jdom-b10
ln -s /usr/local/jdom-b10 /usr/local/jdom
mkdir /usr/local/jdom/build
cp /root/xchange/jdom-b10.jar jdom-b10/
ln -s /usr/local/jdom/jdom-b10.jar /usr/local/jdom/jdom.jar
ln -s /usr/local/jdom/jdom-b10.jar /usr/local/jdom/build/jdom.jar
tar xzvf /root/xchange/jsdk2_1-solsparc.tar.Z
cd /root/xchange/
Testing TomCat:
. ../.profile
/usr/local/tomcat/bin/startup.sh
netstat -pan|grep 8080
You must see something similar:
tcp6 0 0 :::8080 :::* LISTEN ..../java
Verifying:
lynx http://localhost:8080
Then shut down TomCat:
/usr/local/tomcat/bin/shutdown.sh
OpenXChange
cd /root/xchange/
wget http://mirror.open-xchange.org/download/archive/open-xchange-0.8.0-6.tar.gz
tar zxvf open-xchange-0.8.0-6.tar.gz
cd open-xchange-0.8.0-6
./configure \
--prefix=/usr/local/openxchange \
--with-mailjar=/usr/local/javamail/mail.jar \
--with-activationjar=/usr/local/jaf/activation.jar \
--with-jdomjar=/usr/local/jdom-b10/jdom-b10.jar \
--with-xercesjar=/usr/local/xerces/xercesImpl.jar \
--with-jsdkjar=/usr/local/tomcat/common/lib/servlet-api.jar \
--with-jdbcjar=/usr/local/jdbc/pg74.216.jdbc3.jar \
--with-dbpass=superPippo \
--with-runuid=www-data --with-rungid=nogroup \
--enable-webdav
make
make install
Preliminary configuration
cd /root/xchange; wget http://www.fantoma.it/extras/ubox_1.0/ldap_fld
Edit /root/xchange/ldap_fld with your options and run it in each console you're using:
. /root/xchange/ldap_fld
PostGRESQL configuration
change configuration files as follows, init the database with the OpenXChange settings then apply the /root/xchange/pginit.sql SQL configuration file:
cd /root/xchange; wget http://www.fantoma.it/extras/ubox_1.0/pginit.sql
mv /etc/postgresql/7.4/main/pg_hba.conf /etc/postgresql/7.4/main/pg_hba.conf.ORG
cat /etc/postgresql/7.4/main/pg_hba.conf.ORG |\
sed 's/local all all ident sameuser/local all all trust/'|\
sed 's/host all all 127.0.0.1 255.255.255.255 md5/host all all 127.0.0.1 255.255.255.255 trust/' >/etc/postgresql/7.4/main/pg_hba.conf
mv /etc/postgresql/7.4/main/postgresql.conf /etc/postgresql/7.4/main/postgresql.conf.ORG
cat /etc/postgresql/7.4/main/postgresql.conf.ORG |\
sed 's/^#tcpip_socket = false/tcpip_socket = true/' > /etc/postgresql/7.4/main/postgresql.conf
/etc/init.d/postgresql-7.4 restart
Now act as postgres user:
su - postgres
createuser --pwprompt
Enter name of user to add: openexchange
Enter password for new user: superPippo
Enter it again: superPippo
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 -O openexchange -E UNICODE openexchange
psql -U openexchange openexchange < /usr/local/openxchange/share/init_database.sql
psql -U openexchange openexchange < /root/xchange/pginit.sql
exit
(back to root user)
LDAP/SLAPD configuration
The /root/xchange/slapd.conf and /root/xchange/init_ldap.ldif files are prepared for using the previous definition file in creation of definitive files:
cd /root/xchange; wget http://www.fantoma.it/extras/ubox_1.0/slapd.conf
mv /etc/ldap/slapd.conf /etc/ldap/slapd.conf.ORG
cat /root/xchange/slapd.conf |\
sed "s/DCDOMAIN/$DCDOMAIN/" |\
sed "s/DCDOMAIN\"/$DCDOMAIN\"/" |\
sed "s/PASSWORD/$PASSWORD/" > /etc/ldap/slapd.conf
/etc/init.d/slapd stop
rm /var/lib/ldap/*
/etc/init.d/slapd start
cd /root/xchange; wget http://www.fantoma.it/extras/ubox_1.0/init_ldap.ldif
mv /usr/local/openxchange/share/init_ldap.ldif /usr/local/openxchange/share/init_ldap.ldif.ORG
cat /root/xchange/init_ldap.ldif |\
sed "s/DCDOMAIN/$DCDOMAIN/" |\
sed "s/DCNAME/$DCNAME/" |\
sed "s/MAILDOMAIN/$MAILDOMAIN/" |\
sed "s/ORGANIZATION/$ORGANIZATION/" |\
sed "s/SMTPSERVER/$SMTPSERVER/" |\
sed "s/IMAPSERVER/$IMAPSERVER/" |\
sed "s/POSTMASTER/$POSTMASTER/" |\
sed "s/ROOT/$ROOT/" |\
sed "s/TZONE/$TZONE/" |\
sed "s/USERPASS/$USERPASS/" > /usr/local/openxchange/share/init_ldap.ldif
slapadd -l /usr/local/openxchange/share/init_ldap.ldif
mv /etc/ldap/ldap.conf /etc/ldap/ldap.conf.ORG
echo "BASE $DCDOMAIN" > /etc/ldap/ldap.conf
echo "HOST localhost" >> /etc/ldap/ldap.conf
ln -s /etc/ldap/ldap.conf /usr/local/openxchange/etc/groupware/ldap.conf
ln -s /etc/ldap/ldap.conf /usr/local/openxchange/etc/webmail/ldap.conf
TomCat configuration
cd $TOMCAT_HOME/webapps
mkdir servlet
mkdir servlet/WEB-INF
mkdir servlet/WEB-INF/classes
cd servlet/WEB-INF/classes
cp $OX_HOME/share/servlets/*.class .
Configure TomCat servlets with the file web.xml and set parameters as following:
cd /root/xchange; wget http://www.fantoma.it/extras/ubox_1.0/web.xml
cat /root/xchange/web.xml >> $TOMCAT_HOME/webapps/servlet/WEB-INF/web.xml
mkdir -p $TOMCAT_HOME/webapps/servlet/WEB-INF/lib
cp $OX_HOME/lib/*.jar $TOMCAT_HOME/webapps/servlet/WEB-INF/lib
mkdir -p $TOMCAT_HOME/webapps/umin/WEB-INF/lib
cp $OX_HOME/lib/*.jar $TOMCAT_HOME/webapps/umin/WEB-INF/lib
cp $OX_HOME/lib/*.war $TOMCAT_HOME/webapps/
cd /root/xchange
mv $TOMCAT_HOME/conf/tomcat-users.xml $TOMCAT_HOME/conf/tomcat-users.xml.ORG
cat $TOMCAT_HOME/conf/tomcat-users.xml.ORG|egrep -v "^</tomcat-users>" > $TOMCAT_HOME/conf/tomcat-users.xml
echo ' <user username="oxadmin" password="superPippo" roles="manager"/>' >> $TOMCAT_HOME/conf/tomcat-users.xml
echo '</tomcat-users>' >> $TOMCAT_HOME/conf/tomcat-users.xml
cd $TOMCAT_HOME/webapps/servlet/WEB-INF
cp /usr/local/jaf/activation.jar lib
cp /usr/local/jdom/jdom-b10.jar lib
cp /usr/local/jdbc/pg74.216.jdbc3.jar lib
mkdir -p $TOMCAT_HOME/webapps/umin/WEB-INF/classes/
cp /root/xchange/open-xchange-0.8.0-6/system/umin/oxuserminconfig.properties $TOMCAT_HOME/webapps/umin/WEB-INF/classes/oxuserminconfig.properties.ORG
cat $TOMCAT_HOME/webapps/umin/WEB-INF/classes/oxuserminconfig.properties.ORG |\
sed "s/^LDAP_BASEDN=.*$/LDAP_BASEDN=$DCDOMAIN/" > $TOMCAT_HOME/webapps/umin/WEB-INF/classes/oxuserminconfig.properties
Apache configuration
Add to the /etc/apache/httpd.conf file the /root/xchange/apache.conf one, then configure the /etc/libapache-mod-jk/workers.properties file:
cd /root/xchange; wget http://www.fantoma.it/extras/ubox_1.0/apache.conf
cp /etc/apache/httpd.conf /etc/apache/httpd.conf.ORG
cat /root/xchange/apache.conf >> /etc/apache/httpd.conf
mv /etc/libapache-mod-jk/workers.properties /etc/libapache-mod-jk/workers.properties.ORG
cat /etc/libapache-mod-jk/workers.properties.ORG| \
sed 's/workers.tomcat_home=.*$/workers.tomcat_home=\/usr\/local\/tomcat/' | \
sed 's/workers.java_home=.*$/workers.java_home=\/usr/' > /etc/libapache-mod-jk/workers.properties
/etc/init.d/apache restart
OpenXChange post-conf
Configure the /usr/local/openxchange/etc/admintools.conf and the /usr/local/openxchange/etc/webmail/webmail.properties files in order to fit your choices:
mv /usr/local/openxchange/etc/admintools.conf /usr/local/openxchange/etc/admintools.conf.ORG
cat /usr/local/openxchange/etc/admintools.conf.ORG |\
sed "s/^ORGA=\".*$/ORGA=\"$ORGANIZATION\"/" |\
sed "s/^BINDDN=\"cn=Manager,.*$/BINDDN=\"cn=Manager,$DCDOMAIN\"/" |\
sed "s/^BINDPW=\".*$/BINDPW=\"$PASSWORD\"/" |\
sed "s/^DEFAULT_PREF_LANG=\".*$/DEFAULT_PREF_LANG=\"EN\"/" > /usr/local/openxchange/etc/admintools.conf
mv /usr/local/openxchange/etc/webmail/webmail.properties /usr/local/openxchange/etc/webmail/webmail.properties.ORG
cat /usr/local/openxchange/etc/webmail/webmail.properties.ORG |\
sed "s/^user.default.folder.autocreate=false/user.default.folder.autocreate=true/" |\
sed "s/^#user.default.folder.autocreate=.*$/user.default.folder.autocreate=true/" > /usr/local/openxchange/etc/webmail/webmail.properties
cp $OX_HOME/share/perl/login.* /usr/lib/cgi-bin
Web files creation:
cd /var/www
mkdir cfintranet
mkdir cfintranet/webmail
cd /usr/local/openxchange/share/groupware/data
cp -R images css javascript /var/www/cfintranet
cd /usr/local/openxchange/share/webmail/data
cp -R images css javascript /var/www/cfintranet/webmail
cd /usr/local/openxchange/sbin
sh correctfilespool
Last things...
mv /usr/local/openxchange/sbin/adduser_ox /usr/local/openxchange/sbin/adduser_ox.ORG
cat /usr/local/openxchange/sbin/adduser_ox.ORG |\
sed 's/Tuxworld/Italy/' > /usr/local/openxchange/sbin/adduser_ox
chmod 755 /usr/local/openxchange/sbin/adduser_ox
mv /usr/lib/cgi-bin/login.pm /usr/lib/cgi-bin/login.pm.ORG
cat /usr/lib/cgi-bin/login.pm.ORG|\
sed "s/^my \$appname.*$/my \$appname = \'$ORGANIZATION\';/" > /usr/lib/cgi-bin/login.pm
Iconset installation
cd /root/xchange
wget http://ox.cutmasta.org/zenith/ox_zenith_iconset-0.1.tar.gz
tar zxvf ox_zenith_iconset-0.1.tar.gz
cd /root/xchange/ox_zenith_iconset/top
cp /root/xchange/ox_zenith_iconset/top/* /var/www/cfintranet/images/top/EN/
cp /root/xchange/ox_zenith_iconset/top/* /var/www/cfintranet/images/top/DE/
Language Pack [IT] installation
mkdir /root/xchange/lang
cd /root/xchange/lang
wget http://mirror.open-xchange.org/download/archive/i18n/IT/OX-IT-Groupware.0.8.0-6.tar.gz
wget http://mirror.open-xchange.org/download/archive/i18n/IT/OX-IT-Webmail.0.8.0-6.tar.gz
mkdir /root/xchange/lang/oxgw
mkdir /root/xchange/lang/oxwm
cd /root/xchange/lang/oxgw
tar zxvf ../OX-IT-Groupware.0.8.0-6.tar.gz
cd /root/xchange/lang/oxgw/opt/html
cp -r IT $OX_HOME/share/groupware/data/templates/
cd ../locales
cp IT.dlc $OX_HOME/etc/groupware/locales/
cd /root/xchange/lang/oxwm
tar zxvf ../OX-IT-Webmail.0.8.0-6.tar.gz
cd /root/xchange/lang/oxwm/opt/html
cp -r IT $OX_HOME/share/webmail/data/templates/
cd ../locales
cp IT.dlc $OX_HOME/etc/webmail/locales/
mv /usr/lib/cgi-bin/login.pm /usr/lib/cgi-bin/login.pm.LNG
cat /usr/lib/cgi-bin/login.pm.LNG |\
sed "s/^my \$languages.*$/my \$languages = [\'IT\',\'DE\',\'EN\']\;/" |\
sed "s/my \$default_lang.*$/my \$default_lang = \'IT\'\;/" > /usr/lib/cgi-bin/login.pm
mv $TOMCAT_HOME/webapps/umin/WEB-INF/classes/oxuserminconfig.properties $TOMCAT_HOME/webapps/umin/WEB-INF/classes/oxuserminconfig.properties.LNG
cat $TOMCAT_HOME/webapps/umin/WEB-INF/classes/oxuserminconfig.properties.LNG |\
sed 's/AVAILABLE_LANGUAGES\=/AVAILABLE_LANGUAGES\=IT,/'|\
sed 's/DEFAULT_LANGUAGE\=.*$/DEFAULT_LANGUAGE\=IT/' > /usr/local/tomcat/webapps/umin/WEB-INF/classes/oxuserminconfig.properties
mv $OX_HOME/etc/admintools.conf $OX_HOME/etc/admintools.conf.LNG
cat $OX_HOME/etc/admintools.conf.LNG |\
sed "s/^DEFAULT_PREF_LANG=\".*$/DEFAULT_PREF_LANG=\"IT\"/" > $OX_HOME/etc/admintools.conf
mkdir /var/www/cfintranet/images/top/IT
cp /root/xchange/ox_zenith_iconset/top/* /var/www/cfintranet/images/top/IT/
Practice
Starting Open-XChange:
/etc/init.d/slapd start
/usr/local/tomcat/bin/startup.sh
/etc/init.d/apache start
/usr/local/openxchange/etc/init.d/openexchange start
Stopping Open-XChange:
/usr/local/openxchange/etc/init.d/openexchange stop
/etc/init.d/apache stop
/usr/local/tomcat/bin/shutdown.sh
/etc/init.d/slapd stop
User creation:
/usr/local/openxchange/sbin/adduser_ox \
--username="fantoma" \
--passwd="pippo" \
--name="Diego" \
--sname="Fantoma" \
--maildomain="ld2005.linux.trieste.it" \
--ox_timezone="Europe/Rome"
Modify some user parameter:
/usr/local/openxchange/sbin/changeuserattr_ox --attrib=imapServer --value=my.mail.it --username=fantoma