Koozali.org: home of the SME Server

So you want to try out the 'hipergate' groupware package ...

dave_d

So you want to try out the 'hipergate' groupware package ...
« on: August 26, 2005, 04:10:07 PM »
========  Editted 2/9/05  -  fixed a couple of typos!    ============

Hello!  Just in case anyone else fancies trying out the groupware suite "hipergate", here's how I set it up on an SME 5.6 server.  I guess the same things will apply to 6.0.1-01, but I don't know.

This seems to be a low risk operation as we're not really touching any of the existing server.

The steps are:

Install Postgres   (not described here - search Contribs.org for instructions)
Install JAVA        (into /usr/java)
Install Tomcat     (into /opt)
Install hipergate   (into /opt)

Optionally
Make Tomcat a service
Install an Apache/Tomcat connector


So, here goes .......
0.  Get and install Postgres (7.4.2 in my case)

See Contribs.org!

1. Get and install Java

Get the latest JDK from Sun and put it onto your server by any means you choose.  In the end you want jdk-1_5_0_04-linux-i586-rpm.bin to be in an arbitrary location of your choice - say in /downloads/java.

# cd /downloads/java
# chown root:root jdk-1_5_0_04-linux-i586-rpm.bin
# ./jdk-1_5_0_04-linux-i586-rpm.bin

This takes a little time.  The effect is to create jdk-1_5_0_04-linux-i586.rpm AND perform an "rpm -Uvh jdk-1_5_0_04-linux-i586.rpm".  Anyway, you end up with Java installed in /usr/java

# ln -s /usr/java/jdk1.5.0-04 /usr/java/jdk

Now, it's necessary to ensure that the variable JAVA_HOME is defined and that the Java binary location is included in $PATH.  I guess there are several ways to achieve this, but I did it the following way.  (Any suggestions about how to be more "SME-Server-centric" gratefully received!!)

# touch /etc/profile.d/java_env.sh

Add the following content ...

      # java environment initialization script (sh)

      export JAVA_HOME="/usr/java/jdk"
      export PATH=$PATH:$JAVA_HOME/bin

Set the permissions as for other scripts in the directory.  (chmod 755)

2. Get and install Tomcat

Get Jakarta Tomcat.  Download jakarta-tomcat-5.5.9.tar.gz AND jakarta-tomcat-5.5.9-admin.tar.gz from http://jakarta.apache.org/site/downlods_tomcat5.cgi and put both by any means you choose into (say) /downloads/tomcat5

# cd /downloads/tomcat5
# tar -zxvf jakarta-tomcat-5.5.9.tar.gz
# tar -zxvf jakarta-tomcat-5.5.9-admin.tar.gz
# mv /downloads/tomcat5/jakarta-tomcat-5.5.9 /opt/
# ln -s /opt/jakarta-tomcat-5.5.9  /opt/tomcat5
# cd /opt/tomcat5
# ./startup.sh

Now check that Tomcat is working.  Visit http://<server>:8080 from a connected PC and wonder at the Tomcat screen.
There are a couple of things to note here.  If your server is 192.168.40.6 and its full name is lto-server.lto.nyorks (say), then replacing <server> with just 'lto-server' didn't seem to work all the time. Even if it did work, selecting things from the LHS column definitely don't work! (is that English?)  Using either '192.168.40.6' or 'lto-server.lto.nyorks' seemed to be OK.  I never did find out why!  If you click on "Tomcat Manager" on the LHS then you'll end up at the screen showing available applications.  Some of these seem not to work either!

Anyway, 'Onwards!'.

In order to be able to use Tomcat, we need to add a user/password to the 'user database'.  This 'user database' (for the purposes of this installation) is actually the file /opt/tomcat5/conf/tomcat-users.xml.

Edit /opt/tomcat5/conf/tomcat-users.xml and add the following line somewhere after the <tomcat-users> line:

  <user username="admin" password="xyzzy" roles="standard,manager,admin"/>

Write the modified file and restart Tomcat:

# cd /opt/tomcat5
# ./shutdown.sh
# ./startup.sh

Note:  This action seems to re-write the /opt/tomcat5/conf/tomcat-users.xml file into a slightly different form!!!!

Now visit http://<server>:8080  and select "Tomcat Administration" from the LHS.  Log in when prompted with admin/xyzzy and then simply press the "Commit changes" button.  This action appears to fix a couple of configuration files ensuring that the installation is correct for the SME-server.

The following assumes that Postgres has been installed and that there's a Postgres privileged user called 'postgres' with password 'postgres'.

# createdb -E UNICODE -U postgres -W hipergate
# createuser -U postgres -W hipergate    (allow create DB + users)
# psql -U hipergate -W hipergate
-# grant all on datbase hipergate to hipergate;
\quit
#createlang -U hipergate -W plpgsql hipergate

That's created the empty database 'hipergate' for use by hipergate!

3. Get and install hipergate   (into /opt)

Download hipergate-2.1.20-en-src.zip to /downloads/hipergate

# cd /downloads/hipergate
# unzip hipergate-2.1.20-en-src.zip

We need to make the global variable CATALINA_OPTS available.  To do this...

# touch /etc/profile.d/catalina_opts.sh

Add the following content ...

      # Set the CATALINA_OPTS environment variable - script (sh)

      export CATALINA_OPTS="-Dfile.encoding=UTF-8"

Set the permissions as for other scripts in the directory. (chmod 755)

Now move (or copy) the entire hipergate application to its new home.

# mv /downloads/hipergate/hipergate-2.1.20 /opt/

Create a symlink in the Tomcat web apps directory pointing at the appropriate hipergate directory.

# ln -s /opt/hipergate-2.1.20/web.en /opt/jakarta-tomcat-5.9.9/webapps/hipergate-web

Check to see that this has made the hipergate application visible in Tomcat.  Visit http://<server>:8080 and then select Tomcat Manager from the LHS.  The hipergate-web application should be visible - but it won't work yet!!!

Modify /opt/hipergate-2.1.20/conf/hipergate.cnf using the hints provided in the script.  I modified the postgres section at the start to be:

  # PostgreSQL Connection Parameters
  driver=org.postgresql.Driver
  dburl=jdbc:postgresql://192.168.40.6:5432/hipergate
  schema=public
  dbuser=hipergate
  dbpassword=hipergate

and, a bit further down ....

  # Web server base HTTP URL
  #webserver=http://localhost:8001/knowgate
  webserver=http://localhost:8080/hipergate-web

  # Imeges server base HTTP URL (optional)
  # imageserver=http://localhost:8001/knowgate/images

  # Directory where files not directly reachable throught HTTP are stored
  storage=/opt/hipergate-2.1.20/storage

  # Directory where files directly reachable throught HTTP are stored
  #workareasput=/opt/knowgate/web/workareas
  workareasput=/opt/hipergate-2.1.20/web.en/workareas

After you've made the changes, copy this file to /etc/hipergate.cnf  (Not very SME-server-centric, but it needs to be in /etc and it can be easily modified by the hipergate application)

Make one of the directories referenced above

# mkdir /opt/hipergate-2.1.20/web.en/workareas

Stop and restart the /hipergate-web application through the Tomcat Manager page.
Visit http://<server>:8080/hipergate-web/admin/setup.htm.  Follow the instructions.  Some of this takes a L  o  n  g    time to complete.  If all appears OK, visit  http://<server>:8080/hipergate-web/admin/test-connection.jsp and check that the database is reachable.

Restart Tomcat and hipergate should now run.  Enjoy!

If you like this, can someone tell me

a) How to make tomcat a service so that "service tomcat start|stop|restart" works,  and
b) how to map the tomcat stuff so that it's reachable via a virtual host without having to specify the port number.

Regards,

Dave
E&OE
 :-D

Offline Normando

  • *
  • 841
  • +2/-1
    • Unixlan
So you want to try out the 'hipergate' groupware package ...
« Reply #1 on: September 01, 2005, 03:45:39 PM »
Here you found how to install tomcat as service.
http://www.helmuth.net/mitel-sme/Tomcat/

Normando Hall