Export to GitHub

sametimed - SametimedInstallationInstructions.wiki


Sametimed: Installation Instructions


Setup

To make it work, you'll need to setup these application on the hosting machine:

XMPP and Wave Protocol servers are installed in one step, if you follow this tutorial.

Deploying to Apache Tomcat server, as an example, is described at the end of the page. (Also look for easy way on FedOne server configuration below in section about Apache Tomcat)

Note on Development

For development I use Java EE SDK 6

So, as IDE for this project I use Eclipse with RunJettyRun plugin.

The last is Web application server for me.

If you want to develop, you need to use this project as Eclipse Project and run from there, follow DevelopingSametimed instructions.

Libraries

Required libraries are included in war/WEB-INF/lib directory, but to mention that on build path:

  • cometd-api-1.0.1.jar
  • cometd-java-server-1.0.1.jar
  • fedone-server-0.2.jar
  • jetty-continuation-8.0.0.M0.jar
  • jetty-servlets-8.0.0.M0.jar
  • jetty-util-8.0.0.M0.jar
  • junit.jar
  • logback-classic-0.9.18.jar
  • logback-core-0.9.18.jar
  • servlet-api-2.5.jar (this one is optional - if your server supports Java EE specs, it will provide it)
  • slf4j-api-1.5.11.jar

The fedone-server one is coming with wave-protocol server sources which are installed paralelly with the server.

Currently sametimed do not uses WebSockets, but it will, very possibly

Configuration

To run the application you need to configure it before deploying. The only file to change is WEB-INF/classes/sametimed-waveserver.xml file. If you kept defaults values, when you've installed XMPP/FedOne server, there is no need no change. The content describes the required changes, if not:

```

equals to WAVE_SERVER_DOMAIN_NAME in run-config.sh of Federation Wave Protocol Server

wave_server_domain=wave.acmewave.com

equals to WAVE_SERVER_HOSTNAME in run-config.sh

wave_server_host=localhost

equals to WAVE_SERVER_PORT in run-config.sh

wave_server_port=9876 ```

You need to specify the same values as in run-config.sh file for wave-protocol server.

Running

To run the application:

  1. If required, start XMPP server
  2. Start wave-protocol server by running run-server.sh.
  3. Deploy the application to the Web Application Server
  4. Point at http://localhost:8080/sametimed (or any address your Web Server describes)

For testing purposes there is a possibility to create several wave clients - just enter the name you want and click "Get Client" button.


Example: Deploying to Apache Tomcat

First, as mentioned above, you need to install XMPP(Openfire(>=3.6) , for example)/Wave Protocol(0.2) servers pair, following these instructions. Try to use these values for wave server configuration to save yourself from configuring sametimed web-app (for openfire, leave configuration exactly as shown on the screenshots to make it work):

  • Wave server domain (WAVE_SERVER_DOMAIN_NAME): wave.acmewave.com
  • Wave server port (WAVE_SERVER_HOSTNAME): localhost
  • Wave server host (WAVE_SERVER_PORT): 9876

Be warned that Wave Protocol server is also in development stage, so it may sometimes behave unusually.

If you are using application not for testing, then you do need to set correct values and change web-app configuration, of course (or change /etc/hosts accordingly). I have issue 14 to make it easier in future.

You can use the example run-config.sh that is configured to use default/sametimed configurations. Also, I've provided make-cert.sh and make-ca-cert.sh script which generate certificates for wave-server, you may put them into wave server dir. To use with the provided config file, you'll need to use:

$ cd <wave-protocol-server-dir> $ wget http://sametimed.googlecode.com/files/run-config.sh $ wget http://sametimed.googlecode.com/files/make-cert.sh (optional) $ wget http://sametimed.googlecode.com/files/make-ca-cert.sh (optional) $ chmod +x *.sh $ ./make-cert.sh wave.acmewave.com (optional) $ ./make-ca-cert.sh wave.acmewave.com (optional) $ ./run-server.sh

You can answer anything you want, just be sure to answer your DNS name (for example, wave.acmewave.com) when script asks you about your name. For required run-config.sh configuration for certificates read here (they are disabled in in downloaded run-config.sh).

If you want to specify your own values here, feel free to change run-config.sh file, but be sure to change WEB-INF/classes/sametimed-waveserver.xml and /etc/hosts accordingly.

For Prosody server, you may create soft links for certificate files:

$ sudo ln -s <wave-protocol-server-dir>/wave.acmewave.com.key /etc/prosody/certs/wave.acmewave.com.key

$ sudo ln -s <wave-protocol-server-dir>/wave.acmewave.com.crt /etc/prosody/certs/wave.acmewave.com.crt

Do not forget to insert the line 127.0.0.1 acmewave.com in your /etc/hosts file.

Then, you need to download Apache Tomcat server (any version you like) and install it as required for your OS. It is better to get it as tar.gz archive, if you are on Linux (substitute ~/Worktable with any folder and please don't forget to copy JAVA_HOME export command in your .bashrc):

$ tar -xvzf ./apache-tomcat-6.0.20.tar.gz $ mv ./apache-tomcat-6.0.20.tar.gz ~/Worktable $ export JAVA_HOME=/usr/lib/jvm/java-6-sun $ cd ~/Worktable/ $ ./bin/startup.sh

Now, download the last version of the web application from this page, choose the one with .tomcat.war ending, if it is a new version - if not, choose a simple .war - the only difference in them is existence of servlet-api.jar library in the simple .war version.

Deploy this application to the tomcat server. On Debian/UNIX it will be something like:

$ cp ~/Downloads/sametimed.b0.1.tomcat.war ~/Worktable/apache-tomcat-6.0.20/webapps

Because Tomcat uses the war-file name for web-application, it will be accessible with address http://localhost:8080/sametimed.b0.1.tomcat/ (or equal to the war-file name you've got). Otherwise, you can deploy it manually through your Tomcat Manager, there you can select any context path you like.