$ apt-get install maven
Tomcat 6.0.35 has some known issue with CloudStack, please use Tomcat 6.0.33 from http://archive.apache.org/dist/tomcat/tomcat-6/v6.0.33/bin
$ cd ~ # or any path $ wget http://archive.apache.org/dist/tomcat/tomcat-6/v6.0.33/bin/apache-tomcat-6.0.33.tar.gz $ 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
Start the MySQL service:
$ service mysql start
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.
$ 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:
$ find / | grep bin/javac
Set JAVA_HOME to root of JDK containing this javac. e.g.
$ 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.
Used by management server to elevate privileges when mounting NFS shares.
$ apt-get install sudo
Used by script that seeds system VMs
$ apt-get install uuid-runtime
Used to create ISOs
$ apt-get install genisoimage ... $ sudo ln -s /usr/bin/genisoimage /usr/bin/mkisofs
$ apt-get install python-setuptools
Go to your repository:
$ 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/db.properties) $ mvn -pl :cloud-client-ui jetty:run # Run the management server on port 8080
$ 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
$ wget http://www.us.apache.org/dist/maven/maven-3/3.0.4/binaries/apache-maven-3.0.4-bin.tar.gz $ 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 http://archive.apache.org/dist/tomcat/tomcat-6/v6.0.33/bin
Set CATALINA_HOME to path where you extract/install tomcat, put them in your
.bashrc or .zshrc or .profile:
$ echo export CATALINA_HOME=/usr/share/tomcat6/ >> ~/.bashrc
Fix permissions on CATALINA_HOME:
$ chown -R <you>:<your-group> $CATALINA_HOME
Generate you ssh keys, useful for ssh-ing to your hosts and vm etc.:
$ ssh-keygen -t rsa -q
Set JAVA_HOME
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-1.6.0.0/ or /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/, 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:
export JAVA_HOME=/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64
Start the MySQL service:
$ service mysqld start
After you've successfully set up your development environment, get started on how to build CloudStack:
https://cwiki.apache.org/confluence/display/CLOUDSTACK/How+to+build+on+master+branch