We hope you find this tutorial helpful. In addition to guides like this one, we provide simple cloud infrastructure for developers. Learn more →

How To Install Apache Wave on a CentOS 6.4 x64 VPS

Posted Sep 18, 2013 7.3k views Applications CentOS

About Apache Wave

Apache Wave is an open sourced, real-time communication platform based on the work done by Google for Google Wave. Initially envisioned as a replacement for email built for the modern day, it combines typical messaging with real-time communication, rich content, and advanced sharing capabilities -- sort of a mashup of email, chat, wikis, and a real-time document editor.

Google announced in 2010 they were no longer developing Wave, and handed the project to the Apache Software Foundation to continue its development. Despite Google's exit, the ASF and open-source contributors continue to evolve the platform.

We will use a CentOS 6.4 VPS with 4 GB of RAM for this tutorial.

Step 1: Prerequisites

Before getting started, make sure you have a regular user account with sudo access. Most steps will be run as your regular user account.

This tutorial will run you through creating a user account and granting it sudo power.

Install Prerequisites

Logged in as your user account, install the prerequisite packages to compile and run Wave.

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

Create a Wave User

Create a user account explicitly for running the Wave server. This user should not have superuser permissions. You can name this user anything; this tutorial will assume the username wave for the Wave user account.

This tutorial will run you through creating a user account, but do not grant this user root privileges.

Check Your RAM

Building and executing Wave takes a lot of memory. Depending on your VPS size, you'll need to add swap space in order to successfully compile Wave. If you haven't yet added swap to your VPS, this tutorial has instructions on enabling swap for CentOS 6.

Have at least 2.5 GB of RAM including swap (i.e., if you have a 512MB VPS running, add 2 GB of swap space).

Step 2: Compile Wave

Grab the Wave source code

Become the wave user you created earlier:

sudo su - wave

Then pull down the latest Wave source using git. This will create a subfolder called wave containing the files needed to run Wave:

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

Tweak Build Configuration

Still as the wave user, go into the newly cloned source tree:

cd ~/wave

If you're running on a VPS with less than 2 GB of real RAM, it'll speed up compilation to reduce the number of threads used to compile at one time. The default setting of 4 will cause a lot of wasted time swapping data in and out of the limited RAM available.

To reduce the number of threads used, edit the build.xml file:

emacs build.xml

Find a line that reads <arg line="-localWorkers 4"/> and change the 4 to a 1. The line will now look like this:

<arg line="-localWorkers 1"/>


Using ant, grab any needed third-party dependencies and compile the Wave source:

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

Depending on your VPS' specs, it can take up to an hour to compile the code.

Step 3: Configure Your Wave

You'll need to create a configuration file before starting the Wave server. While there are many options to configure, there are a couple that need to be specified in order for the cloud server to start accepting remote connections. At minimum you will specify the Wave server's hostname and the IP of your cloud server that it should bind and serve on.

To create this configuration file, execute this command filling in with your server's hostname, and with your cloud server's IP address:

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

This will create a configuration file to serve on your VPS' IP on port 8282. You can update the port to be anything, though port numbers below 1024 (such as the standard HTTP port, 80) will not be available for the wave user to bind to.

Step 4: Run and Use Wave

Your Wave instance is now configured and ready to run. To launch the Wave front and backend servers, run the run-server.sh script.

As the wave user:

cd ~/wave/

This will bring up the server using the configuration you specified in Step 3. You can now navigate to the IP and port you specified, and start using Wave!


Creative Commons License