How To Install Apache Wave on a CentOS 6.4 x64 VPS

About Apache Wave


An open source and real time communication platform- Apache Wave isbased upon the work done for Google Wave by Google. In the beginning it was conceived as an email’s replacement as it integrates real time communication with general messaging, latest sharing abilities and rich content. It is like a blend of wikis, email, a real-time document editor and chat.

In 2010, Googlevoiced that they will not develop Wave any longer and passed the project onto Apache Software Foundation (ASF). In spite of Google’s exit, the open-source contributors and ASF are continuously striving for evolving the platform.

For this guide, we will be using a CentOS 6.4 VPS alongwith 4 GB of RAM.

Step 1: Preconditions


Prior to beginning, ensure that you possess sudo access in your normal user account. Majority of steps would be run through your normal user account.

This guide will tutor you to create a user account and grant it sudo power.

Installation of Prerequisites

Firstly, log in your user account, then deploy the prerequisite packages for compiling and running Wave.

sudo yum install git java-1.6.0-openjdk java-1.6.0-openjdk-devel mongodb ant

Creating a Wave User

Specifically generate a user account for operating the Wave server. Superuser permissions should not be there with this user. You can choose any name for this user. For the Wave user account, this guide will use username wave.

This guide will take you through a user account creation, but user root privileges should not be granted to it.

Checking Your RAM

Creation and execution of Wave consumes a huge amount of memory. As per the size of your VPS, you would have to provide swap space for compiling Wave successfully. In caseswap is not yet added to your VPS, then this tutorial will instruct you on how to enable  swap for CentOS 6.

You need to possess a minimum of 2.5 GB of RAM including swap, in other words, if you already have 512MB VPS running, then you need to add 2 GB of swap space.

Step 2: Compiling Wave


Grab the source code of Wave

Turn into the wave user that you had earlier created:

sudo su - wave

Now pull down the most recent Wave source utilizing git. With this, a subfolder called wave will be created that will contain the requisite files for running Wave:

cd ~
git clone git://git.apache.org/wave.git wave

Tweaking Build Configuration

Enter in the newly cloned source tree  being still as the wave user:

cd ~/wave

In case you are operating on a VPS with real RAM size of less than 2 GB,it will accelerate compilation for reducing the number of threads utilized for compiling at a single time. Considerable amount of time will get wasted due to data swapping in and out of the limited RAM that’s available because of the default 4 setting.

In order to decrease the number of threads that are being used, modify the build.xml file:

emacs build.xml

Look for a line reading <arg line="-localWorkers 4"/> and modify 4 to a 1. The line would now look like this:

<arg line="-localWorkers 1"/>

Build

Utilize ant, get hold of any anyrequired third-party dependencies and finally go for compiling the Wave source:

ant get-third-party
ant compile-gwt dist-server

As per your VPS specifications, compiling the code may take an hour or two.

Step 3: Configuring Your Wave


A configuration file needs to be created prior to beginning the Wave server. Although there are a number of choices for configuring, some needs to be specified so that the cloud server canbegin accepting remote connections. You will need to mention atleast the hostname of the Wave server as well as your cloud server’s IP to which it should bind and serve on.

For creating this configuration file, run the command below by filling in hostname of your serverand IP address of your cloud server:

ant -f server-config.xml -Dwave_server_domain=<domain> -Dhttp_frontend_public_address=<ip>:8282

With this command, a configuration file will be created for serving on IP of your VPS on port 8282. Port number can be updated for being anything, although port numbers lesser than 1024 (like80-the standard HTTP port) would not be accessible to be bound with the wave user.

Step 4: Running and Using Wave


Now your Wave instance is configured and ready for running. For launching the backend servers and the Wave front, operate the run-server.sh script while being the wave user:

cd ~/wave/

./run-server.sh

This will initiate the server utilizing the configuration that was mentioned in Step 3. Move on to the port and the IP you specified and you can begin using Wave!

KB Admin has written 28 articles

Leave a Reply