Prerequisites

This document assumes that the reader is comfortable working in a Linux environment. In addition, access to an SSH client and an installation of a Java 5 compatible Java Runtime Environment (JRE) is required. More details on these last two items can be found below.

As a convention, all text to be typed at a command line will be prefixed with PROMPT> . The actual command line prompt on your machine is likely to be different. We also use $ to indicate a Linux specific command and C:\> for a Windows specific command. While we don't currently provide explicit instructions, the tools also work correctly on Mac OSX (the commands will more resemble the Linux commands provided). The example output resulting from the command is shown immediately thereafter without any prefix.

For some of the examples illustrated in this guide you'll need access to an SSH client. Most Linux/Unix installations include an SSH client by default. If yours does not then the OpenSSH project provides a free implementation of the full suite of SSH tools.

Windows users can download and install PuTTY, a free SSH client. The client, along with installation instructions can be found on the PuTTY home page. See Chapter 8, Appendix: PuTTY for details on how to use PuTTY with Amazon EC2.

The command line tools used in this guide require Java version 5 or later to run. Either a JRE or JDK installation is acceptable. Sun Microsystems provides installations for a range of platforms, including Linux and Windows, here. If you don't already have an appropriate Java installation, download and install one now.

The command line tools depend on an environment variable (JAVA_HOME) to locate the Java runtime. This environment variable should be set to the full path of the directory that contains a sub-directory named bin which in turn contains the java (on Linux/Unix) or the java.exe (on Windows) executable. You may want to simplify things by adding this directory to your path before other versions of Java.

On Linux/Unix you can set this environment variable as follows:

$ export JAVA_HOME=<PATH>

On Windows the syntax is slightly different:

C:\> set JAVA_HOME=<PATH>

You can confirm this by running $JAVA_HOME/bin/java -version and checking the output. On Linux/Unix this should produce something like this:

$ $JAVA_HOME/bin/java -version
java version "1.5.0_09"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_09-b03)
Java HotSpot(TM) Client VM (build 1.5.0_09-b03, mixed mode, sharing)

On Windows the syntax is again slightly different, although the output is very similar:

C:\> %JAVA_HOME%\bin\java -version
java version "1.5.0_09"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_09-b03)
Java HotSpot(TM) Client VM (build 1.5.0_09-b03, mixed mode, sharing)