Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3
Table of Contents


Install tools and dependencies

Set up Maven (3.0.4):

Code Block
$ apt-get install maven

Set up Tomcat:

Tomcat 6.0.35 has some known issue with CloudStack, please use Tomcat 6.0.33 from

Code Block
$ cd ~  # or any path
$ wget
$ tar xzf apache-tomcat-6.0.33.tar.gz
$ export CATALINA_HOME=~/apache-tomcat-6.0.33
$ export CATALINA_BASE=~/apache-tomcat-6.0.33

Configure MySQL

Start the MySQL service:

Code Block
$ service mysql start

Configure Java

Verify that OpenJDK is fully installed. E.g. Debian 7.1 does net install does not have it, and Maven does not add it either.

Code Block
$ apt-get install openjdk-6-jdk

NB: at time of writing, version 6 was in use

Maven finds the Java compiler via JAVA_HOME. Find compiler location:

Code Block
$ find / | grep bin/javac

Set JAVA_HOME to root of JDK containing this javac. e.g.

Code Block
$ export JAVA_HOME=/usr/lib/jvm/java-6-openjdk-amd64

NB: If the next step works, add sure JAVA_HOME to your shell's .rc file.

Install Extra Tools


Used by management server to elevate privileges when mounting NFS shares.

Code Block
$ apt-get install sudo

Install uuidgen

Used by script that seeds system VMs

Code Block
$ apt-get install uuid-runtime

Install mkisofs

Used to create ISOs

Code Block
$ apt-get install genisoimage
$ sudo ln -s /usr/bin/genisoimage /usr/bin/mkisofs

Install python setuptools

Code Block
$ apt-get install python-setuptools

Build CloudStack

Go to your repository:

Code Block
$ mvn clean
$ mvn clean install -P developer,systemvm
$ mvn -P developer -pl developer -Ddeploydb     # Set up database (Note: If there is a password set for db then please make sure to update the password in utils/conf/
$ mvn -pl :cloud-client-ui jetty:run            # Run the management server on port 8080


Install tools and dependencies

Code Block
$ yum install git java-1.6.0-openjdk java-1.6.0-openjdk-devel mysql mysql-server tomcat6 mkisofs gcc python MySQL-python openssh-clients wget

Set up Maven (3.0.4):

Code Block
$ wget
$ cd /usr/local/ # or any path
$ tar -zxvf apache-maven-3.0.4-bin.tar.gz
$ echo export M2_HOME=/usr/local/apache-maven-3.0.4 >> ~/.bashrc # or .zshrc or .profile
$ echo export PATH=${M2_HOME}/bin:${PATH} >> ~/.bashrc # or .zshrc or .profile

Note: Tomcat 6.0.35 has some known issue with CloudStack, please use Tomcat
6.0.33 from

Configure Environment

Set CATALINA_HOME to path where you extract/install tomcat, put them in your
.bashrc or .zshrc or .profile:

Code Block
$ echo export CATALINA_HOME=/usr/share/tomcat6/ >> ~/.bashrc

Fix permissions on CATALINA_HOME:

Code Block
$ chown -R <you>:<your-group> $CATALINA_HOME

Generate you ssh keys, useful for ssh-ing to your hosts and vm etc.:

Code Block
$ ssh-keygen -t rsa -q


To determine the correct value for JAVA_HOME. RHEL or CentOS installs OpenJDK 1.6 into either /usr/lib/jvm/java-1.6.0-openjdk- or /usr/lib/jvm/java-1.6.0-openjdk-, depending on whether your system is a 32-bit or 64-bit architecture. The JAVA_HOME should point to the directory containing a bin/java executable.

For the user who will use OpenJDK, open the shell configuration file. For the Bash shell, this file is .bashrc.
At the bottom of the file, type the following line, replacing the hypothetical path with the actual path to use on your own system: export JAVA_HOME="/path/to/java/home". Save the file, and log out of and back into your session. If you have a 64-bit you would have following:

Code Block
export JAVA_HOME=/usr/lib/jvm/java-1.6.0-openjdk-

Configure MySQL

Start the MySQL service:

Code Block
$ service mysqld start

What next?

After you've successfully set up your development environment, get started on how to build CloudStack: