Quick Installation - Tomcat

From bemoko developer wiki

Jump to: navigation, search

New Documentation

This article has been superseded by the article in the bemokoLive product documentation site - please visit this page for more up-to-date information

Introduction

This article gives you a quick guide on how to get bemokoLive up and running using Tomcat.

bemokoLive can also be started without a pre-installed application server using the jumpstart mode. If you're new to Java then this jumpstart mode is often the quickest way to get going - see Quick Installation - Jumpstart for more information.

Assumptions

This guide assumes that you installing bemokoLive on your local machine. If you want to install on a remote machine then you shouldaccess the system with the appropriate URLs to the deployed bemokoLive installation, other than the localhost examples below.

The guide also assumes that you have Java installed. If it is not installed then read this

Dependencies

First off we need to get a Java application server up and running for you to deploy bemokoLive into. If you already have one deployed you can skip this section and go straight to installing the bemokoLive web application.

Apache Tomcat

Download Tomcat v6.0.20 from http://tomcat.apache.org/ and install Tomcat:

Windows Linux & Mac OS
Go to http://tomcat.apache.org/download-60.cgi
Click on "Windows Service Installer" to download the Tomcat installer and run the exe downloaded.
Following the instructions in the installer ... and you should have Tomcat running locally in a few seconds.
cd /opt/local

Feel free to install tomcat in an alternative location if you desire, and adjust the instruction below accordingly

gnutar -xzvf apache-tomcat-6.0.20.tar.gz
ln -s apache-tomcat-6.0.20 tomcat
/opt/local/tomcat/bin/startup.sh

And test by accessing http://localhost:8080/. You should see the Tomcat welcome page - if you do then you're good to continue.

Installing the bemokoLive Web Application

Tomcat needs to configured with at least 256Mb of memory for the bemokoLive application.

Windows Linux & Mac OS

Open the "Configure Tomcat" console by clicking the Windows icon, searching for "Configure Tomcat", right clicking the "Configure Tomcat" Program and selecting "Run as administrator"

Click on the "Java" tab in the Tomcat properties window and enter 512 in the Maximum memory pool input field.

Edit bin/setenv.sh in the Tomcat installation directory, e.g. /opt/local/tomcat/bin/setenv.sh (creating the file if necessary).

JAVA_OPTS="-Xms512m -Xmx512m -XX:MaxPermSize=256m"
echo JAVA_OPTS=\$JAVA_OPTS

Restart Tomcat to pick up the new JVM configuration.

Download bemokoLive - whilst it's downloading please read the evaluation agreement and ensure you're happy with the Ts & Cs.

Copy the bemokoLive web application file (i.e. war file) into the Tomcat deployment directory as described below:

Windows Linux & Mac OS

Open the downloaded bemokoLive-1.7.3-evaluation.zip and extract the bemokoLive-1.7.3-evaluation.war to your desktop.

Rename bemokoLive-1.7.3-evaluation.war to live.war and move into the webapps directory in the Tomcat installation directory. By default this directory will be at C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps

cd /opt/local
unzip bemokoLive-1.7.3-evaluation.zip
cp bemokoLive-1.7.3/bemokoLive-1.7.3-evaluation.war /opt/local/tomcat/webapps/live.war
/opt/local/tomcat/bin/shutdown.sh & /opt/local/tomcat/bin/startup.sh

Access the welcome page http://localhost:8080/live/welcome/i. You should see a friendly welcome page with configuration information such as the screen shot below. That's all there is to it to get access to many of the features of the bemokoLive platform and start building some mobile sites. Yes - there's more you can do, but we'll come to those later once you've had some hands on.

Appendix : Troubleshooting

Log files

If you do have problems take a look at the log files for any issues that might have occurred:

Windows Linux & Mac OS

View the log files in the logs directory in the Tomcat installation directory

stdout-*.log → bemokoLive logging
localhost-*.log → Tomcat logging
less tomcat/logs/catalina.out

use if you want to search through an existing log file

tail -f tomcat/logs/catalina.out

use if you want to watch the logs as they happen

Java Installation

bemokoLive requires Java to be pre-installed. To verify whether you have Java installed OK, use the command prompt and check that you have a java 6 installed. See here if you are unfamiliar with using the command prompt on your machine.

java -version


Output should look something like

java version "1.6.0_07"
Java(TM) SE Runtime Environment (build 1.6.0_07-b06-153)
Java HotSpot(TM) 64-Bit Server VM (build 1.6.0_07-b06-57, mixed mode)


If you don't have Java installed you can download the JRE (Java SE Runtime Environment) from here.

Further Reading

See installing bemokoLive for details on installing bemokoLive in other environments.