<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="home" title="HomePage" href="HomePage.html" />
<link rel="help" title="HowToUseWiki" href="HowToUseWiki.html" />
<link rel="copyright" title="GNU General Public License" href="http://www.gnu.org/copyleft/gpl.html#SEC1" />
<link rel="author" title="The PhpWiki Programming Team" href="http://phpwiki.org/ThePhpWikiProgrammingTeam" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta http-equiv="Content-Language" content="en" />
<meta name="robots" content="noindex,nofollow" />
<meta name="language" content="en" />
<meta name="document-type" content="Public" />
<meta name="document-rating" content="General" />
<meta name="generator" content="PhpWiki" />
<meta name="PHPWIKI_VERSION" content="1.3.14" />

<link rel="stylesheet" type="text/css" charset="iso-8859-1" href="phpwiki-printer.css" />
<title>PhpWiki - Open-Xchange</title>
</head>
<body>

<div id="header">
  
<!-- Page title -->
<h1>Open-Xchange</h1>
</div>
<div id="content">



<div class="wikitext"><h4>Change Log</h4>
<p class="tightenable top bottom">Check here to see previous revisions and for notes on changes made to this page:<br />
<a href="Open-Xchange&amp;action=PageHistory.html" target="" class="namedurl"><span style="white-space: nowrap"><img src="images/http.png" alt="" class="linkicon" border="0" />Open-Xchange&amp;action=PageHistory</span></a><br />
<br />
Inspiration for this script was the instructions found on this page:<br />
<a href="http://sietse.net/exoops/modules/OpenXchange/" target="" class="namedurl"><span style="white-space: nowrap"><img src="images/http.png" alt="" class="linkicon" border="0" />http://sietse.net/exoops/modules/OpenXchange/</span></a><br />
<br /></p>
<pre class="tightenable top">
Following on from Greg's original work in publishing a roadmap
with clues on how to get OpenXchange installed on an SME server,

I offer you the following script.
You ought to be able to cut it out and paste it into a suitable editor.

BEWARE!!!  This is pure development stuff!  No account has been taken
of maintaining integrity of the development server,

and security
has not been addressed in any way.

I would have continued the work, but business pressures have intervened
and I'm going to have to do some paying work for a while.

Good luck to potential developers!

Dave</pre>
<h3>Installation Script</h3>
<pre class="tightenable top bottom">
#!/bin/bash
#
# This little (!) command procedure simply fetches some of the software
# required to get OpenXchange working on a fresh
# SME 6.0.1-01 server installation.  Thanks to lots of people!!
#
# ============================================================================= #
# Revision history                                                              #
# 22 February 2005  - Original version by Dave Dumolo                           #
#    -- A 'hack through the software jungle with a machete' version with        #
#    -- the aim of getting all the software needed to achieve a compilation     #
#    -- of Open-Xchange.                                                        #
#    -- Due to lack of time this version was never tested on a new installation #
#    -- of an SME server 6.0.1-01, the system on which it was developed.        #
#                                                                               #
#    -- Someone must want to carry this work on ..........                      #
# ============================================================================= #
#
#
# Create two top level directories for doing all this stuff
# - it just keeps things tidy
#
# The general idea is that we'll get all the files first and then process them.
# That way we're less likely to end up with a mess.
#
Prerequisitedirectory='/OpenXchange-prerequisite'
Installdirectory='/OpenXchange-install'

echo &quot;The pre-requisites directory will be &lt;$Prerequisitedirectory&gt;, and&quot;
echo &quot;the install directory will be &lt;$Installdirectory&gt;&quot;
#
# Some files need to be manually fetched from the Sun Java site.
# We'll check to see if this has been done.  If it hasn't, then
# give the poor user some hints!!  This is the prerequisites stage
# - 'cos we can't to it automagically!
#
echo &quot;&quot;
if ! [ -e &quot;$Prerequisitedirectory&quot; ]
then
  echo &quot;Before the installation of OpenXchange can proceed, certain pre-requisite&quot;
  echo &quot;files need to be fetched manually.&quot;
  echo &quot;If you choose to proceed, the pre-requisites directory will be created and&quot;
  echo &quot;you will then see a list of files that need to be fetched manually and&quot;
  echo &quot;placed into the pre-requisite directory &lt;$Prerequisitedirectory&gt;.&quot;
  while true; do
    echo &quot;Do you want to create the pre-requisite directory and continue (C),&quot;
    echo -n &quot;or quit the installation while you are ahead? (Q) (C/Q) ?&quot;
    read cq
    case $cq in
      c* | C* )
        mkdir $Prerequisitedirectory; break;;
      [qQ] )
        echo &quot;OK! Probably a very wise decision!  Bye!&quot;; exit;;
      * ) echo &quot;Unrecognised response. Try again&quot; ;;
    esac
  done
else
  echo &quot;A pre-requisite software directory has been found.&quot;
  while true; do
    echo &quot;You can continue and the files will be checked (C),&quot;
    echo -n &quot;or you can quit the installation leaving the pre-requisite files intact (Q) (C/Q)&quot;
    read cq
    case $cq in
      c* | C* ) break;;
      [qQ] )
        echo &quot;OK! Probably a very wise decision!  Bye!&quot;; exit;;
      * ) echo &quot;Unrecognised response. Try again&quot; ;;
    esac
  done
fi

echo &quot;Checking pre-requisite files .....&quot;
cd &quot;$Prerequisitedirectory&quot;
Missing=0
if [ ! -e jdk-1_5_0_01-linux-i586.bin ]           # If java not available ...
then
  echo &quot;You need to get jdk-1_5_0_01-linux-i586.bin from the Sun site and place it in &lt;$Prerequisitedirectory&gt;&quot;;
  echo &quot;Look in http://java.sun.com/j2se/1.5.0/download.html using a web browser.&quot;
  echo &quot;&quot;
  let &quot;Missing += 1&quot;
fi

if [ ! -e javamail-1_3_2.zip ]           # If javamail not available ...
then
  echo &quot;You need to get javamail-1_3_2.zip from the Sun site and place it in &lt;$Prerequisitedirectory&gt;&quot;;
  echo &quot;Look in http://java.sun.com/products/javamail/downloads/index.html using a web browser.&quot;
  echo &quot;&quot;
  let &quot;Missing += 1&quot;
fi

if [ ! -e jaf-1_0_2-upd.zip ]
then
  echo &quot;You need to get jaf-1_0_2-upd.zip from the Sun site and place it in &lt;$Prerequisitedirectory&gt;&quot;;
  echo &quot;Look in http://java.sun.com/products/javabeans/glasgow/jaf.html using a web browser.&quot;
  echo &quot;&quot;
  let &quot;Missing += 1&quot;
fi

if [ ! -e jta-1_0_1B-classes.zip ]
then
  echo &quot;You need to get jta-1_0_1B-classes.zip from the Sun site and place it in &lt;$Prerequisitedirectory&gt;&quot;;
  echo &quot;Look in http://java.sun.com/products/jta/ using a web browser.&quot;
  echo &quot;&quot;
  let &quot;Missing += 1&quot;
fi

if [ ! -e jta-1_0_1B-doc.zip ]
then
  echo &quot;You need to get jta-1_0_1B-doc.zip from the Sun site and place it in &lt;$Prerequisitedirectory&gt;&quot;;
  echo &quot;Look in http://java.sun.com/products/jta/ using a web browser.&quot;
  echo &quot;&quot;
  let &quot;Missing += 1&quot;
fi

if [ ! -e jmx-1_2_1-ri.zip ]
then
  echo &quot;You need to get jmx-1_2_1-ri.zip from the Sun site and place it in &lt;$Prerequisitedirectory&gt;&quot;;
  echo &quot;Look in http://java.sun.com/products/JavaManagement/download.html using a web browser.&quot;
  echo &quot;&quot;
  let &quot;Missing += 1&quot;
fi

if [ $Missing -gt 0 ]
then
  echo &quot;Checks revealed that $Missing files are missing from the pre-requisites directory.&quot;
  echo &quot;Unable to continue until these files have been fetched and placed in $Prerequisitedirectory.&quot;
  echo &quot;&quot;
  echo &quot;Good luck with the downloads! Bye!&quot;
  exit
fi

echo &quot;All pre-requisite files appear to be available.  Do you want to&quot;
echo -n &quot;continue on to the automated file fetching and installation process (Y/N)?&quot;
while true; do
  read yn
  case $yn in
    y* | Y* ) break;;
    [nN] )
      echo &quot;OK! Probably a very wise decision!  Bye!&quot;; exit;;
    * ) echo &quot;Unrecognised response. Try again&quot; ;;
  esac
done

echo &quot;&quot;
if [ -e &quot;$Installdirectory&quot; ]   # If the installation directory exists ....
then
  echo &quot;It looks as if the software for Open-Xchange has already been installed here.&quot;
  echo &quot;If you continue then you can EITHER clean up the installation source&quot;
  echo &quot;and try again OR continue and allow the script to attempt some sort of&quot;
  echo &quot;recovery. Continuing could possibly have some unexpected side effects.&quot;
  echo &quot;However, you may want to do this to preserve the files that have already&quot;
  echo &quot;been downloaded.  Note that cleaning up the installation source&quot;
  echo &quot;is not the same as an 'UNINSTALL' process - that's not addressed here!&quot;
  echo &quot;&quot;
  echo &quot;Continue at your own risk!&quot;
  while true; do
    echo -n &quot;Do you want to continue? (Y/N)&quot;
    read yn
    case $yn in
      y* | Y* ) break;;
      [nN] ) echo &quot;Installation terminated by user&quot; ; exit;;
      * ) echo &quot;Unrecognised response. Try again&quot; ;;
    esac
  done
  while true; do
    echo &quot;Do you want to wipe out the install directory structure and start again (W),&quot;
    echo -n &quot;or leave existing files intact and attempt a recovery (R)  (W/R) ?&quot;
    read wr
    case $wr in
    #  If the user wants to continue then we'll simply delete the install directory
    #  and all it's contensts and start over.
      w* | W* )
# I took this out because of the HUGE amount of software that would get removed.
#        rm -R $Installdirectory; break;;
         echo &quot;I did not remove your software - but we will stop anyway&quot;; exit; break;;
      [rR] ) echo &quot;OK! Recovering if possible!&quot; ; break;;
      * ) echo &quot;Unrecognised response. Try again&quot; ;;
    esac
  done
fi

# If we get to here without error than we EITHER have no install directory
# or the user decided to leave the existing structure intact. If there isn't
# one we'll make one and start the installation process.

if [ ! -e &quot;$Installdirectory&quot; ]   # If the installation directory doesn't exist ....
then
  mkdir $Installdirectory
  if [ $? -ne 0 ]         # Test exit status of &quot;mkdir&quot; command.
  then
    echo &quot;Ooops!  Unable to make the installation directory.&quot;
    echo &quot;Abandoning installation&quot;
    echo &quot;&quot;
    exit
  fi
fi

# Onwards!!! ....

echo &quot;Now we'll get most of the software required to install Open-XChange.&quot;
echo &quot;No installations will take place at this time.&quot;

############################
# Get the development RPMs #
############################

echo &quot;Getting the development RPMs ....&quot;
cd $Installdirectory
subdirectory=&quot;dev-rpms&quot;
if [ ! -e $subdirectory ]
then
  mkdir $subdirectory
fi
cd $subdirectory

wget -c http://mirror.contribs.org/smeserver/contribs/hpe/devtools-6.01/dev-rpms/anaconda-7.3-7es115.i386.rpm
wget -c http://mirror.contribs.org/smeserver/contribs/hpe/devtools-6.01/dev-rpms/anaconda-runtime-7.3-7es115.i386.rpm
wget -c http://mirror.contribs.org/smeserver/contribs/hpe/devtools-6.01/dev-rpms/apache-devel-1.3.27-2.7.2.i386.rpm
wget -c http://mirror.contribs.org/smeserver/contribs/hpe/devtools-6.01/dev-rpms/autoconf-2.13-17.noarch.rpm
wget -c http://mirror.contribs.org/smeserver/contribs/hpe/devtools-6.01/dev-rpms/automake-1.4p5-4.noarch.rpm
wget -c http://mirror.contribs.org/smeserver/contribs/hpe/devtools-6.01/dev-rpms/bison-1.35-1.i386.rpm
wget -c http://mirror.contribs.org/smeserver/contribs/hpe/devtools-6.01/dev-rpms/cpp-2.96-113.i386.rpm
wget -c http://mirror.contribs.org/smeserver/contribs/hpe/devtools-6.01/dev-rpms/gcc-2.96-113.i386.rpm
wget -c http://mirror.contribs.org/smeserver/contribs/hpe/devtools-6.01/dev-rpms/gcc-c++-2.96-113.i386.rpm
wget -c http://mirror.contribs.org/smeserver/contribs/hpe/devtools-6.01/dev-rpms/gettext-0.11.1-2.i386.rpm
wget -c http://mirror.contribs.org/smeserver/contribs/hpe/devtools-6.01/dev-rpms/glibc-devel-2.2.5-44.i386.rpm
wget -c http://mirror.contribs.org/smeserver/contribs/hpe/devtools-6.01/dev-rpms/glibc-kernheaders-2.4-7.16.i386.rpm
wget -c http://mirror.contribs.org/smeserver/contribs/hpe/devtools-6.01/dev-rpms/kernel-source-2.4.20-18.7.i386.rpm
wget -c http://mirror.contribs.org/smeserver/contribs/hpe/devtools-6.01/dev-rpms/libacl-2.0.11-7.i386.rpm
wget -c http://mirror.contribs.org/smeserver/contribs/hpe/devtools-6.01/dev-rpms/libacl-devel-2.0.11-7.i386.rpm
wget -c http://mirror.contribs.org/smeserver/contribs/hpe/devtools-6.01/dev-rpms/libattr-2.0.8-6.i386.rpm
wget -c http://mirror.contribs.org/smeserver/contribs/hpe/devtools-6.01/dev-rpms/libstdc++-devel-2.96-113.i386.rpm
wget -c http://mirror.contribs.org/smeserver/contribs/hpe/devtools-6.01/dev-rpms/libtool-1.4.2-7.i386.rpm
wget -c http://mirror.contribs.org/smeserver/contribs/hpe/devtools-6.01/dev-rpms/m4-1.4.1-7.i386.rpm
wget -c http://mirror.contribs.org/smeserver/contribs/hpe/devtools-6.01/dev-rpms/mkisofs-1.10-11.i386.rpm
wget -c http://mirror.contribs.org/smeserver/contribs/hpe/devtools-6.01/dev-rpms/ncurses-devel-5.2-26.i386.rpm
wget -c http://mirror.contribs.org/smeserver/contribs/hpe/devtools-6.01/dev-rpms/openssl-devel-0.9.6b-35.7.i386.rpm
wget -c http://mirror.contribs.org/smeserver/contribs/hpe/devtools-6.01/dev-rpms/pam-devel-0.75-46.7.3.i386.rpm
wget -c http://mirror.contribs.org/smeserver/contribs/hpe/devtools-6.01/dev-rpms/readline-devel-4.2a-4.i386.rpm
wget -c http://mirror.contribs.org/smeserver/contribs/hpe/devtools-6.01/dev-rpms/rpm-python-4.0.4-7x.18.i386.rpm
wget -c http://mirror.contribs.org/smeserver/contribs/hpe/devtools-6.01/dev-rpms/zlib-devel-1.1.4-8.7x.i386.rpm
#wget -c http://mirror.contribs.org/smeserver/contribs/hpe/devtools-6.01/smeserver-skel/smeserver-skel-0.2-01.src.rpm
wget -c ftp://rpmfind.net/linux/redhat/7.3/en/os/i386/RedHat/RPMS/XFree86-libs-4.2.0-8.i386.rpm
wget -c ftp://rpmfind.net/linux/redhat/7.3/en/os/i386/RedHat/RPMS/tk-8.3.3-67.i386.rpm
wget -c ftp://rpmfind.net/linux/redhat/7.3/en/os/i386/RedHat/RPMS/expect-5.32.2-67.i386.rpm

###########################################
# Get PHP4.3.10 - thanks to Ergin Ozdemir #
###########################################

echo &quot;Getting PHP 4.3.10 files .... &quot;
cd $Installdirectory
subdirectory=&quot;php-rpms&quot;
if [ ! -e $subdirectory ]
then
  mkdir $subdirectory
fi
cd $subdirectory

wget -c http://mirror.contribs.org/smeserver/contribs/ergozd/scripts/phprpms/php-4.3.10-3eo.i386.rpm
wget -c http://mirror.contribs.org/smeserver/contribs/ergozd/scripts/phprpms/php-devel-4.3.10-3eo.i386.rpm
wget -c http://mirror.contribs.org/smeserver/contribs/ergozd/scripts/phprpms/php-imap-4.3.10-3eo.i386.rpm
wget -c http://mirror.contribs.org/smeserver/contribs/ergozd/scripts/phprpms/php-mysql-4.3.10-3eo.i386.rpm
wget -c http://mirror.contribs.org/smeserver/contribs/ergozd/scripts/phprpms/php-ldap-4.3.10-3eo.i386.rpm
wget -c http://mirror.contribs.org/smeserver/contribs/ergozd/scripts/phprpms/php-odbc-4.3.10-3eo.i386.rpm
wget -c http://mirror.contribs.org/smeserver/contribs/ergozd/scripts/phprpms/php-snmp-4.3.10-3eo.i386.rpm
wget -c http://mirror.contribs.org/smeserver/contribs/ergozd/scripts/phprpms/php-pgsql-4.3.10-3eo.i386.rpm
wget -c http://mirror.contribs.org/smeserver/contribs/ergozd/scripts/phprpms/php-curl-4.3.10-3eo.i386.rpm
wget -c http://mirror.contribs.org/smeserver/contribs/ergozd/scripts/phprpms/php-mcrypt-4.3.10-3eo.i386.rpm
wget -c http://mirror.contribs.org/smeserver/contribs/ergozd/scripts/phprpms/php-mhash-4.3.10-3eo.i386.rpm
wget -c http://mirror.contribs.org/smeserver/contribs/ergozd/scripts/phprpms/php-domxml-4.3.10-3eo.i386.rpm
wget -c http://mirror.contribs.org/smeserver/contribs/ergozd/scripts/phprpms/php-xmlrpc-4.3.10-3eo.i386.rpm
#wget -c http://mirror.contribs.org/smeserver/contribs/dbrown/RPMS/i386/php-manual-4.3.10-1db_rh73.i386.rpm

# Install unixOBDC if not installed.
rpm -qa &gt; rpmlist
IS_ODBC=`pic rpmlist | grep -c unixODBC`
if [ $IS_ODBC -eq 0 ]
then
  wget -c http://download.fedoralegacy.org/redhat/7.3/os/i386/unixODBC-2.2.0-5.i386.rpm
else
  echo &quot;unixODBC installed skipping download&quot;
fi
rm rpmlist

#########################
# Get the Postgres RPMs #
#########################

echo &quot;Getting Postgres 7.4.2 .... &quot;
cd $Installdirectory
subdirectory=&quot;postgres-rpms&quot;
if [ ! -e $subdirectory ]
then
  mkdir $subdirectory
fi
cd $subdirectory

wget -c ftp://ftp.be.postgresql.org/postgresql/binary/v7.4.2/redhat/redhat-7.3/postgresql-7.4.2-1PGDG.i386.rpm
wget -c ftp://ftp.be.postgresql.org/postgresql/binary/v7.4.2/redhat/redhat-7.3/postgresql-contrib-7.4.2-1PGDG.i386.rpm
wget -c ftp://ftp.be.postgresql.org/postgresql/binary/v7.4.2/redhat/redhat-7.3/postgresql-devel-7.4.2-1PGDG.i386.rpm
wget -c ftp://ftp.be.postgresql.org/postgresql/binary/v7.4.2/redhat/redhat-7.3/postgresql-docs-7.4.2-1PGDG.i386.rpm
wget -c ftp://ftp.be.postgresql.org/postgresql/binary/v7.4.2/redhat/redhat-7.3/postgresql-jdbc-7.4.2-1PGDG.i386.rpm
wget -c ftp://ftp.be.postgresql.org/postgresql/binary/v7.4.2/redhat/redhat-7.3/postgresql-libs-7.4.2-1PGDG.i386.rpm
wget -c ftp://ftp.be.postgresql.org/postgresql/binary/v7.4.2/redhat/redhat-7.3/postgresql-pl-7.4.2-1PGDG.i386.rpm
wget -c ftp://ftp.be.postgresql.org/postgresql/binary/v7.4.2/redhat/redhat-7.3/postgresql-python-7.4.2-1PGDG.i386.rpm
wget -c ftp://ftp.be.postgresql.org/postgresql/binary/v7.4.2/redhat/redhat-7.3/postgresql-server-7.4.2-1PGDG.i386.rpm
wget -c ftp://ftp.be.postgresql.org/postgresql/binary/v7.4.2/redhat/redhat-7.3/postgresql-tcl-7.4.2-1PGDG.i386.rpm
wget -c ftp://ftp.be.postgresql.org/postgresql/binary/v7.4.2/redhat/redhat-7.3/postgresql-test-7.4.2-1PGDG.i386.rpm
wget -c http://linuxsoft.cern.ch/cern/7.3.X/i386/RedHat/RPMS/mx-2.0.3-1.i386.rpm

#############################
# Get the Berkeley DB stuff #
#############################

echo &quot;Getting Berkeley DB 4.3 .... &quot;
cd $Installdirectory
subdirectory=&quot;BerleleyDB-pkg&quot;
if [ ! -e $subdirectory ]
then
  mkdir $subdirectory
fi
cd $subdirectory
wget -c ftp://ftp.sleepycat.com/releases/db-4.3.27.NC.tar.gz
wget -c http://www.sleepycat.com/update/4.3.27/patch.4.3.27.1
wget -c http://www.sleepycat.com/update/4.3.27/patch.4.3.27.2
wget -c http://www.sleepycat.com/update/4.3.27/patch.4.3.27.3

#######################
# Get OpenLDAP 2.2.23 #
#######################

echo &quot;Getting OpenLDAP 2.2.23 .... &quot;
cd $Installdirectory
subdirectory=&quot;OpenLDAP-pkg&quot;
if [ ! -e $subdirectory ]
then
  mkdir $subdirectory
fi
cd $subdirectory

wget -c ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/openldap-2.2.23.tgz

##########################
# Get some Perl stuff .. #
##########################

echo &quot;Getting OpenLDAP 2.2.23 .... &quot;
cd $Installdirectory
subdirectory=&quot;perl-stuff&quot;
if [ ! -e $subdirectory ]
then
  mkdir $subdirectory
fi
cd $subdirectory
wget -c http://tdknights.com/buildapache/perlinstall
#ftp://rpmfind.net/linux/redhat/7.3/en/os/i386/RedHat/RPMS/expect-5.32.2-67.i386.rpm
#wget -c http://www.quantumlinux.com/~kevin/rpmpan/rpm/perl-Convert-ASN1-0.18-8.noarch.rpm
#wget -c http://www.quantumlinux.com/~kevin/rpmpan/rpm/perl-perl-ldap-0.3202-8.noarch.rpm
#wget -c http://www.quantumlinux.com/~kevin/rpmpan/rpm/perl-IO-Socket-SSL-0.96-8.noarch.rpm
#wget -c http://www.quantumlinux.com/~kevin/rpmpan/rpm/perl-Net_SSLeay.pm-1.25-8.i386.rpm
##Authen::SASL is ...
#wget -c http://www.quantumlinux.com/~kevin/rpmpan/rpm/perl-perl-ldap-0.15-8.noarch.rpm
#wget -c http://www.quantumlinux.com/~kevin/rpmpan/rpm/perl-XML-NamespaceSupport-1.08-8.noarch.rpm
#wget -c http://www.quantumlinux.com/~kevin/rpmpan/rpm/perl-Bundle-XML-0.11-8.i386.rpm

#######################
# Get some Java stuff #
#######################

echo &quot;Getting some of the required Java files .... &quot;
cd $Installdirectory
subdirectory=&quot;java-apps&quot;
if [ ! -e $subdirectory ]
then
  mkdir $subdirectory
fi
cd $subdirectory
#
# These RPMs really just supply .spec files that enable RPMs to be built.
#
wget -c http://mirrors.sunsite.dk/jpackage/1.6/generic/non-free/SRPMS/java-1.5.0-sun-1.5.0.01-3jpp.nosrc.rpm
wget -c http://mirrors.sunsite.dk/jpackage/1.6/generic/non-free/SRPMS/javamail-1.3.2-1jpp.nosrc.rpm
wget -c http://mirrors.sunsite.dk/jpackage/1.6/generic/non-free/SRPMS/jta-1.0.1-0.b.4jpp.nosrc.rpm
wget -c http://mirrors.sunsite.dk/jpackage/1.6/generic/non-free/SRPMS/jmx-1.2.1-1jpp.nosrc.rpm

#Get ant

wget -c http://mirrors.sunsite.dk/jpackage/1.6/generic/free/RPMS/ant-1.6.2-3jpp.noarch.rpm
wget -c http://mirrors.sunsite.dk/jpackage/1.6/generic/free/RPMS/ant-optional-full-1.5.4-2jpp.noarch.rpm

#Get Tomcat

wget -c http://mirrors.sunsite.dk/jpackage/1.6/generic/free/RPMS/tomcat5-5.0.30-6jpp.noarch.rpm
wget -c http://mirrors.sunsite.dk/jpackage/1.6/generic/free/RPMS/tomcat5-servlet-2.4-api-5.0.30-6jpp.noarch.rpm
wget -c http://mirrors.sunsite.dk/jpackage/1.6/generic/free/RPMS/tomcat5-jasper-5.0.30-6jpp.noarch.rpm

# Some additional stuff required to satisfy various dependancies

wget -c http://mirrors.sunsite.dk/jpackage/1.6/generic/free/RPMS/xerces-j2-2.6.2-4jpp.noarch.rpm            #xerces-j2
wget -c http://mirrors.sunsite.dk/jpackage/1.6/redhat-7.3/free/RPMS/mod_jk-ap13-1.2.6-3jpp.i386.rpm
wget -c http://mirrors.sunsite.dk/jpackage/1.6/redhat-7.3/free/RPMS/mod_jk-manual-1.2.6-3jpp.i386.rpm
wget -c http://mirrors.sunsite.dk/jpackage/1.6/redhat-7.3/free/RPMS/mod_jk-tools-1.2.6-3jpp.i386.rpm
wget -c http://mirrors.sunsite.dk/jpackage/1.6/generic/free/RPMS/xalan-j2-2.6.0-2jpp.noarch.rpm
wget -c http://mirrors.sunsite.dk/jpackage/1.6/generic/free/RPMS/jdom-1.0-1jpp.noarch.rpm
wget -c http://mirrors.sunsite.dk/jpackage/1.6/generic/free/RPMS/xml-commons-resolver-1.1-3jpp.noarch.rpm

wget -c http://mirrors.sunsite.dk/jpackage/1.6/generic/free/RPMS/tyrex-1.0.1-2jpp.noarch.rpm
wget -c http://mirrors.sunsite.dk/jpackage/1.6/generic/free/RPMS/regexp-1.3-2jpp.noarch.rpm
wget -c http://mirrors.sunsite.dk/jpackage/1.6/generic/free/RPMS/bcel-5.1-5jpp.noarch.rpm
wget -c http://mirrors.sunsite.dk/jpackage/1.6/generic/free/RPMS/wsdl4j-1.4-3jpp.noarch.rpm
wget -c http://mirrors.sunsite.dk/jpackage/1.6/generic/free/RPMS/log4j-1.2.8-8jpp.noarch.rpm
wget -c http://mirrors.sunsite.dk/jpackage/1.6/generic/free/RPMS/axis-1.1-3jpp.noarch.rpm
wget -c http://mirrors.sunsite.dk/jpackage/1.6/generic/free/RPMS/junit-3.8.1-4jpp.noarch.rpm
wget -c http://mirrors.sunsite.dk/jpackage/1.6/generic/free/RPMS/xml-commons-1.0-0.b2.7jpp.noarch.rpm
wget -c http://mirrors.sunsite.dk/jpackage/1.6/generic/free/RPMS/xml-commons-apis-1.0-0.b2.7jpp.noarch.rpm
wget -c http://mirrors.sunsite.dk/jpackage/1.6/generic/free/RPMS/mx4j-2.0.1-2jpp.noarch.rpm
wget -c http://mirrors.sunsite.dk/jpackage/1.6/generic/free/RPMS/jakarta-commons-beanutils-1.7.0-2jpp.noarch.rpm
wget -c http://mirrors.sunsite.dk/jpackage/1.6/generic/free/RPMS/jakarta-commons-collections-3.1-1jpp.noarch.rpm
wget -c http://mirrors.sunsite.dk/jpackage/1.6/generic/free/RPMS/jakarta-commons-daemon-1.0-2jpp.noarch.rpm
wget -c http://mirrors.sunsite.dk/jpackage/1.6/generic/free/RPMS/jakarta-commons-dbcp-1.2.1-3jpp.noarch.rpm
wget -c http://mirrors.sunsite.dk/jpackage/1.6/generic/free/RPMS/jakarta-commons-digester-1.6-2jpp.noarch.rpm
wget -c http://mirrors.sunsite.dk/jpackage/1.6/generic/free/RPMS/jakarta-commons-pool-1.2-2jpp.noarch.rpm
wget -c http://mirrors.sunsite.dk/jpackage/1.6/generic/free/RPMS/jakarta-commons-el-1.0-3jpp.noarch.rpm
wget -c http://mirrors.sunsite.dk/jpackage/1.6/generic/free/RPMS/jakarta-commons-fileupload-1.0-3jpp.noarch.rpm
wget -c http://mirrors.sunsite.dk/jpackage/1.6/generic/free/RPMS/jakarta-commons-launcher-0.9-3jpp.noarch.rpm
wget -c http://mirrors.sunsite.dk/jpackage/1.6/generic/free/RPMS/jakarta-commons-logging-1.0.4-2jpp.noarch.rpm
wget -c http://mirrors.sunsite.dk/jpackage/1.6/generic/free/RPMS/jakarta-commons-modeler-1.1-3jpp.noarch.rpm
wget -c http://mirrors.sunsite.dk/jpackage/1.6/generic/free/RPMS/jakarta-commons-discovery-0.2-2jpp.noarch.rpm

#wget -c ftp://ftp3.ca.postgresql.org/pub/binary/v7.2.4/RPMS/redhat-7.3/postgresql-jdbc-7.2.4-1PGDG.i386.rpm #postgresql-jdbc
wget -c http://mirror.poundhost.com/fedora.redhat.com/development/i386/Fedora/RPMS/servletapi5-5.0.18-1jpp_3fc.noarch.rpm

#######################################
# Finally - get the OpenXchange stuff #
#######################################

echo &quot;Getting OpenXchange files .... &quot;
cd $Installdirectory
subdirectory=&quot;ox-pkgs&quot;
if [ ! -e $subdirectory ]
then
  mkdir $subdirectory
fi
cd $subdirectory

#wget -c http://mirror.open-xchange.org/download/open-xchange-0.7.5.tar.gz ... no longer valid ... Tib
wget -c http://mirror.open-xchange.org/download/archive/open-xchange-0.7.5.tar.gz

###########################################
# Save some configuration files for later #
###########################################

cd $Installdirectory
subdirectory=&quot;saved-stuff&quot;
if [ ! -e $subdirectory ]
then
  mkdir $subdirectory
fi
cd $subdirectory

cp /etc/rc.d/init.d/ldap .
cp /etc/e-smith/templates/etc/openldap .

############################################################################################

echo &quot;&quot;
echo &quot;So far, so good!  That is all the files needed to continue.&quot;
echo &quot;You will be warned when you get to the point where the SME distribution&quot;
echo &quot;is modified in a way that cannot easily be restored.&quot;
echo &quot;&quot;
echo &quot;Now we need to install some of the files to be able to continue ...&quot;
while true; do
  echo -n &quot;Do you want to install the development RPMs (Y/N) ?&quot;
  read yn
  case $yn in
    y* | Y* )
      cd &quot;$Installdirectory/dev-rpms&quot;
# The *.rpm doesn't work for some reason!!
#      rpm -Uvh --nodeps *.rpm                  # Install all the development RPMs
      rpm -Uvh --nodeps anaconda-7.3-7es115.i386.rpm
      rpm -Uvh --nodeps anaconda-runtime-7.3-7es115.i386.rpm
      rpm -Uvh --nodeps apache-devel-1.3.27-2.7.2.i386.rpm
      rpm -Uvh --nodeps autoconf-2.13-17.noarch.rpm
      rpm -Uvh --nodeps automake-1.4p5-4.noarch.rpm
      rpm -Uvh --nodeps bison-1.35-1.i386.rpm
      rpm -Uvh --nodeps cpp-2.96-113.i386.rpm
      rpm -Uvh --nodeps expect-5.32.2-67.i386.rpm
      rpm -Uvh --nodeps gcc-2.96-113.i386.rpm
      rpm -Uvh --nodeps gcc-c++-2.96-113.i386.rpm
      rpm -Uvh --nodeps gettext-0.11.1-2.i386.rpm
      rpm -Uvh --nodeps glibc-devel-2.2.5-44.i386.rpm
      rpm -Uvh --nodeps glibc-kernheaders-2.4-7.16.i386.rpm
      rpm -Uvh --nodeps kernel-source-2.4.20-18.7.i386.rpm
      rpm -Uvh --nodeps libacl-2.0.11-7.i386.rpm
      rpm -Uvh --nodeps libacl-devel-2.0.11-7.i386.rpm
      rpm -Uvh --nodeps libattr-2.0.8-6.i386.rpm
      rpm -Uvh --nodeps libstdc++-devel-2.96-113.i386.rpm
      rpm -Uvh --nodeps libtool-1.4.2-7.i386.rpm
      rpm -Uvh --nodeps m4-1.4.1-7.i386.rpm
      rpm -Uvh --nodeps mkisofs-1.10-11.i386.rpm
      rpm -Uvh --nodeps ncurses-devel-5.2-26.i386.rpm
      rpm -Uvh --nodeps openssl-devel-0.9.6b-35.7.i386.rpm
      rpm -Uvh --nodeps pam-devel-0.75-46.7.3.i386.rpm
      rpm -Uvh --nodeps readline-devel-4.2a-4.i386.rpm
      rpm -Uvh --nodeps rpm-python-4.0.4-7x.18.i386.rpm
      rpm -Uvh --nodeps tk-8.3.3-67.i386.rpm
      rpm -Uvh --nodeps XFree86-libs-4.2.0-8.i386.rpm
      rpm -Uvh --nodeps zlib-devel-1.1.4-8.7x.i386.rpm
      break;;
    [nN] ) echo &quot;Skipping installation of development RPMs&quot; ; break;;
    * ) echo &quot;Unrecognised response. Try again&quot; ;;
  esac
done
echo &quot;&quot;
echo &quot;Only continue if the development RPMs installed&quot;
echo &quot;without problem.  The whole installation process&quot;
echo &quot;from now on depends on each step working correctly.&quot;
echo &quot;&quot;
echo &quot;Now we'll get Perl up to date ....&quot;
echo &quot;This will replace the existing Perl with the latest available.&quot;
echo &quot;&quot;
echo &quot;You'll only need to do this once in the course of testing&quot;
while true; do
  echo -n &quot;Do you want to bring Perl up to date and install some extra modules (Y/N) ?&quot;
  read yn
  case $yn in
    y* | Y* )
      cd &quot;$Installdirectory/perl-stuff&quot;
      chmod 755 perlinstall
      ./perlinstall
# Do this to check that everything is up to date
#      perl -MCPAN -e 'CPAN::Shell-&gt;install(CPAN::Shell-&gt;r)'
       perl -MCPAN -e 'install Convert::ASN1'
       perl -MCPAN -e 'install Net::LDAP'
       perl -MCPAN -e 'install IO::Socket::SSL'
       perl -MCPAN -e 'force install Net::SSLeay'
       perl -MCPAN -e 'install Authen::SASL'
       perl -MCPAN -e 'install Authen::PAM'
       perl -MCPAN -e 'install XML::NamespaceSupport'
       perl -MCPAN -e 'install XML::SAX'
      break;;
    [nN] ) echo &quot;Skipping installation of Perl and Perl modules&quot; ; break;;
    * ) echo &quot;Unrecognised response. Try again&quot; ;;
  esac
done
#
while true; do
  echo -n &quot;Do you want to install Postgres 7.4.2 (Y/N) ?&quot;
  read yn
  case $yn in
    y* | Y* )
      cd &quot;$Installdirectory/postgres-rpms&quot;
      rpm -Uvh --nodeps *.rpm                   # Install all the Postgres RPMs
      /etc/init.d/postgresql start
      # Create template directories
      mkdir -p /etc/e-smith/templates/var/lib/pgsql/data
      mkdir -p /etc/e-smith/templates-custom/var/lib/pgsql/data
      # Copy original config file into template directory
      cp /var/lib/pgsql/data/postgresql.conf /etc/e-smith/templates/var/lib/pgsql/data
      cp /var/lib/pgsql/data/pg_hba.conf /etc/e-smith/templates/var/lib/pgsql/data
      # Make modifications for this SME install
      # This changes '#tcpip_socket = false' to 'tcpip_socket = true' whilst
      # making the copy
      sed '/#tcpip_socket/s/#tcpip_socket/tcpip_socket/;s/false/true/' \
       /etc/e-smith/templates/var/lib/pgsql/data/postgresql.conf &gt; \
       /etc/e-smith/templates-custom/var/lib/pgsql/data/postgresql.conf
      # This changes 'local all all ident sameuser' to '#local all all ident sameuser'
      # whilst making the copy
      sed -e '/local/s/local[ ]*all[ ]*all/#local all all/' \
      /etc/e-smith/templates/var/lib/pgsql/data/pg_hba.conf &gt; \
      /etc/e-smith/templates-custom/var/lib/pgsql/data/pg_hba.conf
      # ..and this adds some lines
      echo &quot;&quot;
      echo -n &quot;Enter the IP address of this server (please get it right, there's no checking!!) &quot;
      read ipstring
      echo -n &quot;Enter the IP mask of this server (probably 255.255.255.0) &quot;
      read maskstring
      echo &quot;host all all $ipstring $maskstring trust&quot; &gt;&gt; /etc/e-smith/templates-custom/var/lib/pgsql/data/pg_hba.conf
      echo &quot;host all all 0.0.0.0 255.255.255.255 reject&quot; &gt;&gt; /etc/e-smith/templates-custom/var/lib/pgsql/data/pg_hba.conf
      #
      # ..and these should not really be added - it's just for testing
      echo &quot;local all all                              trust&quot; &gt;&gt; /etc/e-smith/templates-custom/var/lib/pgsql/data/pg_hba.conf
      echo &quot;host  all all 127.0.0.1  255.255.255.255   trust&quot; &gt;&gt; /etc/e-smith/templates-custom/var/lib/pgsql/data/pg_hba.conf

      /sbin/e-smith/expand-template /var/lib/pgsql/data/pg_hba.conf
      /sbin/e-smith/expand-template /var/lib/pgsql/data/postgresql.conf

      # Just a symbolic link so that the actual postgress Java interfacec can be changed easily
      ln -s /usr/share/java/pg74.1jdbc3.jar /usr/share/java/postgresql.jar

      /etc/init.d/postgresql stop
      /etc/init.d/postgresql start

      # Enable automatic launching of postgres on system start
      ln -s /etc/init.d/postgresql /etc/rc.d/rc7.d/S56postgresql
      ln -s /etc/init.d/postgresql /etc/rc.d/rc6.d/K03postgresql
      break;;
    [nN] ) echo &quot;Skipping installation of Postgres&quot; ; break;;
    * ) echo &quot;Unrecognised response. Try again&quot; ;;
  esac
done

echo &quot;&quot;
echo &quot;That's got Postgres up and running!!&quot;
echo &quot;&quot;
while true; do
  echo -n &quot;Do you want to install the PHP upgrade (Y/N) ?&quot;
  read yn
  case $yn in
    y* | Y* )
      # This is a cludge! The file libpq.so.2 is missing.
      # A fix that seems to work is to make a symbolic link to libpq.so.3
      ln -s /usr/lib/libpq.so.3 /usr/lib/libpq.so.2
      cd &quot;$Installdirectory/php-rpms&quot;
      rpm -Uvh --nodeps *.rpm                   # Install all the development RPMs
      mkdir -p /etc/e-smith/templates-custom/etc/php.ini
      templatefile=&quot;/etc/e-smith/templates-custom/etc/php.ini/50PathsDirectories&quot;
      touch $templatefile
      echo 'include_path   = &quot;.:/usr/share/pear&quot;' &gt; $templatefile
      echo 'doc_root       =' &gt;&gt; $templatefile
      echo 'user_dir       =' &gt;&gt; $templatefile
      echo 'extension_dir  = /usr/lib/php4' &gt;&gt; $templatefile
      echo 'enable_dl      = On' &gt;&gt; $templatefile
      # Make Postgres available to PHP
      templatefile=&quot;/etc/e-smith/templates-custom/etc/php.ini/70PgsqlExtension&quot;
      touch $templatefile
      echo &quot;extension=pgsql.so&quot; &gt; $templatefile

      pear upgrade Log
      pear upgrade Date
      /sbin/e-smith/expand-template /etc/php.ini
      # service httpd restart     # Modified after requtest from contribs.org forum to:
      /etc/e-smith/events/actions/restart-httpd-full
      break;;
    [nN] ) echo &quot;Skipping installation of PHP&quot; ; break;;
    * ) echo &quot;Unrecognised response. Try again&quot; ;;
  esac
done

echo &quot;That's the PHP upgrade done!&quot;
echo &quot;&quot;
echo &quot;&quot;
echo &quot;From now on the SME server will be modified by means other than installing RPMs.&quot;
echo &quot;This means that an original SME server cannot easily be restored once the&quot;
echo &quot;following changes have n=been made.&quot;
echo &quot;YOU HAVE BEEN WARNED!!!.....&quot;
echo &quot;&quot;

#################################
# Build and install Berkeley DB #
#################################

while true; do
  echo -n &quot;Do you want to build and install Berkeley DB (Y/N) ?&quot;
  read yn
  case $yn in
    y* | Y* )
      cd &quot;$Installdirectory/BerleleyDB-pkg&quot;
      tar -zxvf db-4.3.27.NC.tar.gz
      cd db-4.3.27.NC
      patch -p0 &lt; ../patch.4.3.27.1
      patch -p0 &lt; ../patch.4.3.27.2
      patch -p0 &lt; ../patch.4.3.27.3
      cd build_unix
      ../dist/configure
      make
      make install
      while true; do
        echo -n &quot;Do you want to modify /etc/ld.so.conf (Y/N) ?&quot;
        read yn1
        case $yn1 in
          y* | Y* ) echo &quot;&quot; &gt;&gt; /etc/ld.so.conf; break;;
          [nN] ) echo &quot;Skipping modification of ld.so.conf&quot; ; break;;
          * ) echo &quot;Unrecognised response. Try again&quot; ;;
        esac
      done
      ldconfig
      break;;
    [nN] ) echo &quot;Skipping build and installation of Berkeley DB&quot; ; break;;
    * ) echo &quot;Unrecognised response. Try again&quot; ;;
  esac
done

############################
# Process the new OpenLDAP #
############################

# What goes on here is not very nice!  The following should really be
# done using one or more RPMS - but I don't know how to build them.
# This method results in the loss of the Directory command from the
# server manager front end - not very clever!!
#
while true; do
  echo -n &quot;Do you want to build and install an updated OpenLDAP (Y/N) ?&quot;
  read yn
  case $yn in
    y* | Y* )
      cd &quot;$Installdirectory/OpenLDAP-pkg&quot;
      tar -zxvf openldap-2.2.23.tgz
      cd openldap-2.2.23
# Some configuration command, eh?
# This is the command line to get OpenLDAP to configure
LD_LIBRARY_PATH=&quot;/usr/lib:/usr/local/lib:/usr/local/BerkeleyDB.4.3/lib:/usr/local/ssl/lib&quot; \
LDFLAGS=&quot;-L/usr/local/lib -L/usr/local/BerkeleyDB.4.3/lib -L/usr/local/ssl/lib&quot; \
CPPFLAGS=&quot;-I/usr/local/include -I/usr/local/BerkeleyDB.4.3/include -I/usr/local/ssl/include&quot; \
./configure --enable-bdb --enable-crypt --with-tls
      make depend
      make
      while true; do
        echo &quot;In order to install the new OpenLDAP, certain distribution RPMs need to be removed.&quot;
        echo &quot;It will be difficult to recover to a clean SME server from now on.&quot;
        echo -n &quot;Do you want to continue? (Y/N) &quot;
        read yn1
        case $yn1 in
          y* | Y* )
            rpm -e --nodeps openldap-2.0.27-2.7.3es
            rpm -e --nodeps openldap-clients-2.0.27-2.7.3es
            rpm -e --nodeps perl-perl-ldap-0.22-10
            rpm -e --nodeps openldap-servers-2.0.27-2.7.3es
            rpm -e --nodeps e-smith-ldap-4.10.0-03
            rpm -e --nodeps php-ldap-4.3.8-1db
            break;;
          [nN] ) echo &quot;Termination the installation process.&quot;; exit; break;;
          * ) echo &quot;Unrecognised response. Try again&quot; ;;
        esac
      done
      make install
      while true; do
        echo -n &quot;Do you want to run the installations tests(Y/N) ?&quot;
        read yn1
        case $yn1 in
          y* | Y* ) make test; break;;
          [nN] ) echo &quot;Skipping modification of ld.so.conf&quot; ; break;;
          * ) echo &quot;Unrecognised response. Try again&quot; ;;
        esac
      done
      make clean
      cd &quot;$Installdirectory/saved-stuff&quot;
      cp ldap /etc/rc.d/init.d
      cp -R openldap /etc/e-smith/templates
      /sbin/e-smith/expand-template /etc/openldap/ldap.conf
      /sbin/e-smith/expand-template /etc/openldap/slapd.conf
      break;;
    [nN] ) echo &quot;Skipping build and installation of Berkeley DB&quot; ; break;;
    * ) echo &quot;Unrecognised response. Try again&quot; ;;
  esac
done

#################################
# Now for the Java installation #
#################################

while true; do
  echo -n &quot;Do you want to install Java and the Java modules (Y/N) ?&quot;
  read yn
  case $yn in
    y* | Y* )
      echo &quot;This process involves making RPMs as root.&quot;
      echo &quot;This is probably not a very good idea, but it will do for testing.&quot;
      echo -n &quot;Hit &lt;RET&gt; to continue ...&quot;
      read anykey
      echo &quot;Making the required Java rpms ....&quot;
      if [ ! -e /usr/src/redhat/TMP ]
      then
        mkdir /usr/src/redhat/TMP
      fi
      if [ !  -e ~/.rpmmacros ]
      then
        touch ~/.rpmmacros
        echo &quot;%_builddir      /usr/src/redhat/BUILD&quot; &gt;&gt; ~/.rpmmacros
        echo &quot;%_rpmdir        /usr/src/redhat/RPMS&quot; &gt;&gt; ~/.rpmmacros
        echo &quot;%_sourcedir     /usr/src/redhat/SOURCES&quot; &gt;&gt; ~/.rpmmacros
        echo &quot;%_specdir       /usr/src/redhat/SPECS&quot; &gt;&gt; ~/.rpmmacros
        echo &quot;%_srcrpmdir     /usr/src/redhat/SRPMS&quot; &gt;&gt; ~/.rpmmacros
        echo &quot;%_tmppath       /usr/src/redhat/TMP&quot; &gt;&gt; ~/.rpmmacros
      fi
# Build Java
      echo &quot;Building and installing Java ....&quot;
      cd $Installdirectory/java-apps/
      #The nosrc.rpm just creates the required /usr/src/redhat/SPEC file
      rpm -Uvh $Installdirectory/java-apps/java-1.5.0-sun-1.5.0.01-3jpp.nosrc.rpm
      cp $Prerequisitedirectory/jdk-1_5_0_01-linux-i586.bin /usr/src/redhat/SOURCES
      chmod +x /usr/src/redhat/SOURCES/jdk-1_5_0_01-linux-i586.bin
      cd  /usr/src/redhat/SPECS
      rpmbuild -ba java-1.5.0-sun.spec
      rpm -Uvh  /usr/src/redhat/RPMS/i586/java-1.5.0-sun-1.5.0.01-3jpp.i586.rpm
      rpm -Uvh  /usr/src/redhat/RPMS/i586/java-1.5.0-sun-devel-1.5.0.01-3jpp.i586.rpm
      rpm -Uvh  /usr/src/redhat/RPMS/i586/java-1.5.0-sun-src-1.5.0.01-3jpp.i586.rpm
      rpm -Uvh  /usr/src/redhat/RPMS/i586/java-1.5.0-sun-demo-1.5.0.01-3jpp.i586.rpm
      rpm -Uvh  /usr/src/redhat/RPMS/i586/java-1.5.0-sun-plugin-1.5.0.01-3jpp.i586.rpm
##     rpm -Uvh  /usr/src/redhat/RPMS/i586/java-1.5.0-sun-fonts-1.5.0.01-3jpp.i586.rpm
##     rpm -Uvh  /usr/src/redhat/RPMS/i586/java-1.5.0-sun-alsa-1.5.0.01-3jpp.i586.rpm
##     rpm -Uvh  /usr/src/redhat/RPMS/i586/java-1.5.0-sun-jdbc-1.5.0.01-3jpp.i586.rpm
# Build JTA
      echo &quot;Building and installing JTA ....&quot;
      #The nosrc.rpm just creates the required /usr/src/redhat/SPEC file
      rpm -Uvh $Installdirectory/java-apps/jta-1.0.1-0.b.4jpp.nosrc.rpm
      cp $Prerequisitedirectory/jta-1_0_1B-classes.zip /usr/src/redhat/SOURCES
      cp $Prerequisitedirectory/jta-1_0_1B-doc.zip /usr/src/redhat/SOURCES
      cd  /usr/src/redhat/SPECS
      rpmbuild -ba jta.spec
      rpm -Uvh  /usr/src/redhat/RPMS/noarch/jta-1.0.1-0.b.4jpp.noarch.rpm
      rpm -Uvh  /usr/src/redhat/RPMS/noarch/jta-javadoc-1.0.1-0.b.4jpp.noarch.rpm
# Build Javamail
      echo &quot;Building and installing Javamail ....&quot;
      #The nosrc.rpm just creates the required /usr/src/redhat/SPEC file
      rpm -Uvh $Installdirectory/java-apps/javamail-1.3.2-1jpp.nosrc.rpm
      cp $Prerequisitedirectory/javamail-1_3_2.zip /usr/src/redhat/SOURCES
      cd  /usr/src/redhat/SPECS
      rpmbuild -ba javamail.spec
      rpm -Uvh /usr/src/redhat/RPMS/noarch/javamail-1.3.2-1jpp.noarch.rpm
      rpm -Uvh /usr/src/redhat/RPMS/noarch/javamail-manual-1.3.2-1jpp.noarch.rpm
      rpm -Uvh /usr/src/redhat/RPMS/noarch/javamail-javadoc-1.3.2-1jpp.noarch.rpm
      rpm -Uvh /usr/src/redhat/RPMS/noarch/javamail-demo-1.3.2-1jpp.noarch.rpm
      rpm -Uvh /usr/src/redhat/RPMS/noarch/javamail-monolithic-1.3.2-1jpp.noarch.rpm
# Build JAF
      echo &quot;Building and installing JAF .... &quot;
      #The nosrc.rpm just creates the required /usr/src/redhat/SPEC file
      rpm -Uvh $Installdirectory/java-apps/jaf-1.0.2-4jpp.nosrc.rpm
      cp $Prerequisitedirectory/jaf-1_0_2-upd.zip /usr/src/redhat/SOURCES
      cd  /usr/src/redhat/SPECS
      rpmbuild -ba jaf.spec
      rpm -Uvh /usr/src/redhat/RPMS/noarch/jaf-1.0.2-4jpp.noarch.rpm
      rpm -Uvh /usr/src/redhat/RPMS/noarch/jaf-manual-1.0.2-4jpp.noarch.rpm
      rpm -Uvh /usr/src/redhat/RPMS/noarch/jaf-javadoc-1.0.2-4jpp.noarch.rpm
      rpm -Uvh /usr/src/redhat/RPMS/noarch/jaf-demo-1.0.2-4jpp.noarch.rpm
# Build JMX
      echo &quot;Building and installing JMX .... &quot;
      #The nosrc.rpm just creates the required /usr/src/redhat/SPEC file
      rpm -Uvh $Installdirectory/java-apps/jmx-1.2.1-1jpp.nosrc.rpm
      cp $Prerequisitedirectory/jmx-1_2_1-ri.zip /usr/src/redhat/SOURCES
      cd  /usr/src/redhat/SPECS
      rpmbuild -ba jmx.spec
      rpm -Uvh /usr/src/redhat/RPMS/noarch/jmx-1.2.1-1jpp.noarch.rpm
      rpm -Uvh /usr/src/redhat/RPMS/noarch/jmx-javadoc-1.2.1-1jpp.noarch.rpm
#
      echo &quot;Installing ANT ....&quot;
      rpm -Uvh $Installdirectory/java-apps/ant-1.6.2-3jpp.noarch.rpm
#
      echo &quot;Installing JAVA support modules .... &quot;
      cd $Installdirectory/java-apps
      rpm -Uvh servletapi5-5.0.18-1jpp_3fc.noarch.rpm
      rpm -Uvh jakarta-commons-beanutils-1.7.0-2jpp.noarch.rpm
      rpm -Uvh jakarta-commons-collections-3.1-1jpp.noarch.rpm
      rpm -Uvh jakarta-commons-digester-1.6-2jpp.noarch.rpm
      rpm -Uvh jakarta-commons-daemon-1.0-2jpp.noarch.rpm
      rpm -Uvh jakarta-commons-dbcp-1.2.1-3jpp.noarch.rpm
      rpm -Uvh jakarta-commons-pool-1.2-2jpp.noarch.rpm
      rpm -Uvh jakarta-commons-el-1.0-3jpp.noarch.rpm
      rpm -Uvh servletapi5-5.0.18-1jpp_3fc.noarch.rpm
      rpm -Uvh jakarta-commons-fileupload-1.0-3jpp.noarch.rpm
      rpm -Uvh jakarta-commons-launcher-0.9-3jpp.noarch.rpm
      rpm -Uvh jakarta-commons-logging-1.0.4-2jpp.noarch.rpm
      rpm -Uvh xml-commons-resolver-1.1-3jpp.noarch.rpm
      rpm -Uvh xerces-j2-2.6.2-4jpp.noarch.rpm
      rpm -Uvh xalan-j2-2.6.0-2jpp.noarch.rpm
      rpm -Uvh jakarta-commons-modeler-1.1-3jpp.noarch.rpm
      rpm -Uvh jakarta-commons-discovery-0.2-2jpp.noarch.rpm
      rpm -Uvh xml-commons-1.0-0.b2.7jpp.noarch.rpm
      rpm -Uvh xml-commons-apis-1.0-0.b2.7jpp.noarch.rpm
      rpm -Uvh junit-3.8.1-4jpp.noarch.rpm
      rpm -Uvh log4j-1.2.8-8jpp.noarch.rpm
      rpm -Uvh wsdl4j-1.4-3jpp.noarch.rpm
      rpm -Uvh axis-1.1-3jpp.noarch.rpm
      rpm -Uvh regexp-1.3-2jpp.noarch.rpm
      rpm -Uvh bcel-5.1-5jpp.noarch.rpm
      rpm -Uvh mx4j-2.0.1-2jpp.noarch.rpm
      rpm -Uvh tyrex-1.0.1-2jpp.noarch.rpm
      rpm -Uvh tomcat5-servlet-2.4-api-5.0.30-6jpp.noarch.rpm
      rpm -Uvh tomcat5-jasper-5.0.30-6jpp.noarch.rpm
      rpm -Uvh tomcat5-5.0.30-6jpp.noarch.rpm
      break;;
    [nN] ) echo &quot;Skipping installation of Java and Java modules&quot; ; break;;
    * ) echo &quot;Unrecognised response. Try again&quot; ;;
  esac
done

echo &quot;That's Java and the Java modules installed!&quot;
echo &quot;&quot;

new
####################################
# Configure and build Open-Xchange #
####################################

while true; do
  echo -n &quot;Do you want to install Open-Xchange (Y/N) ?&quot;
  read yn
  case $yn in
    y* | Y* )
      echo &quot;&quot;
      echo &quot;Creating a new Postgres database and user ....&quot;
      echo &quot;When asked for a password, enter xyzzy.&quot;
      echo &quot;This is only for development and the password xyzzy is hard coded later!!&quot;
      echo &quot;&quot;
      /usr/sbin/adduser ox
      su - postgres -c &quot;dropdb openexchange&quot;
      su - postgres -c &quot;dropuser openexchange&quot;
      su - postgres -c &quot;createuser -A -D -P openexchange&quot;
      su - postgres -c &quot;createdb openexchange&quot;
#
      cd $Installdirectory/ox-pkgs
      tar -zxvf open-xchange-0.7.5.tar.gz
      cd open-xchange.0.7.5
#
      export ANT_HOME=/usr/local/ant
      export JAVA_HOME=&quot;/usr/lib/jvm/java&quot;
      export PATH=${PATH}:${ANT_HOME}/bin
      export OX_INSTALL=/usr/local/ox

      ./configure \
      --prefix=$OX_INSTALL \
      --with-dbpass=&quot;xyzzy&quot; \
      --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/postgresql.jar \
      --enable-webdav \
      --with-runuid=ox \
      --with-rungid=ox
      make
      make install
      cp /usr/local/ox/share/perl/login.* /home/e-smith/files/ibays/Primary/cgi-bin/
      break;;
    [nN] ) echo &quot;Skipping installation of Open-Xchange&quot; ; break;;
    * ) echo &quot;Unrecognised response. Try again&quot; ;;
  esac
done

echo &quot;That's the Open-Xchange built!!  We're not finished yet&quot;
echo &quot;but you might like to us a web browser to visit&quot;
echo &quot;  http://&lt;your-server&gt;/cgi-bin/login.pl  and see if you get a login screen&quot;
echo &quot;before you continue.&quot;
echo &quot;&quot;
while true; do
  echo -n &quot;Do you want to continue (Y/N) ?&quot;
  read yn
  case $yn in
    y* | Y* )      break;;
    [nN] ) echo &quot;Terminating at user request&quot; ; exit; break;;
    * ) echo &quot;Unrecognised response. Try again&quot; ;;
  esac
done

echo &quot;Doing post installation stuff ....&quot;
echo &quot;&quot;

cd /var/lib/tomcat5/webapps
if [ -e &quot;servlet&quot; ]
then
  rm -R servlet/*
  rmdir servlet
fi
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/
cp /OpenXchange-install/ox-pkgs/open-xchange.0.7.5/system/servlet/web.xml /var/lib/tomcat5/webapps/servlet/WEB-INF
service tomcat5 restart
#
echo &quot;Now, go to the URL http://myhost:8080/servlet/intranet. You should see a message&quot;
echo &quot;\&quot;No running Server found\&quot;. This means that all is OK.&quot;
echo &quot;Otherwise, try to have a look at the Manager: http://myhost:8080/manager/html&quot;
echo &quot;To be able to pass the login prompt, you have to edit the file&quot;
echo &quot;/etc/tomcat5/tomcat-users.xml and add a line like this:&quot;
echo &quot;&lt;user username=\&quot;themanager\&quot; password=\&quot;thepassword\&quot; roles=\&quot;manager\&quot;&gt;&quot;
echo &quot;&quot;
echo -n &quot;When you've tried this, hit any key to continue ...&quot;
read yn
#
echo &quot;&quot;
echo &quot;Installing mod_jk ...&quot;

cp /usr/share/doc/mod_jk-ap20-1.2.5/workers.properties.sample /etc/httpd/conf/workers.properties
cp /usr/share/doc/mod_jk-ap20-1.2.5/mod_jk.conf.sample /etc/httpd/conf/mod_jk.conf
echo &quot;JkMount /servlet/* ajp13&quot; &gt;&gt; /etc/httpd/conf/mod_jk.conf
echo &quot;JkMount /servlet/webdav.contacts/* ajp13&quot; &gt;&gt; /etc/httpd/conf/mod_jk.conf
service httpd restart
#
echo &quot;You should now be able to go to the URL http://myhost/servlet/intranet&quot;
echo &quot;and again obtain \&quot;No running server found\&quot;
echo &quot;&quot;
echo -n &quot;When you've tried this, hit any key to continue ...&quot;
read yn
echo &quot;&quot;
echo &quot;Updating the Postgres database ...&quot;
psql -dopenexchange -h localhost -Uopenexchange -W -f $OX_INSTALL/share/init_database.sql
touch temp.sql
echo &quot;INSERT INTO sys_gen_rights_template values &quot; &gt; temp.sql
echo &quot;('now','admin','now','','default_template','y','y','y','y',&quot; &gt;&gt; temp.sql
echo &quot;'y','y','y','y','y','y','y','y','y','y','y','y','y','y','y',&quot; &gt;&gt; temp.sql
echo &quot;'y','y','y','y','y','y','y','y','y','y','y','y','y','y','y',&quot; &gt;&gt; temp.sql
echo &quot;'y','y','y','y','y','y','y','y','y','y','y','y','y');&quot; &gt;&gt; temp.sql
psql -dopenexchange -h localhost -Uopenexchange -W -f temp.sql
rm temp.sql
#
#
echo &quot;That is as far as I had time for.  Post installation and configuration&quot;
echo &quot;still needs to be done to get this whole thing working&quot;
echo &quot;&quot;
echo &quot;Any volunteers??&quot;</pre>
</div>

<div id="footer">  <hr class="printer" noshade="noshade" />
<p class="editdate">Owner: &quot;jester&quot;  Last edited on March 10, 2005 12:50 pm by &quot;jester&quot;</p>
</div>

</div>
<!-- Add your Disclaimer here -->
</body>
</html>
