CloudStack 4.2 RPM build how to

CloudStack 4.2 is ready for release but the site has not updated so that you can just update your repo and install or upgrade so in this post I’ll go thru the process I use to compile from source. You can use this process for other versions but some things may change. You could also follow the process on the Apache Cloudstack documentation website but this is a slim down version to get you quickly moving with 4.2.

First things first and that mean setting up a system with all the things needed to get that final result which is usable Apache Cloudstack RPMS for CentOS6 or RHEL6. I have only tested this process and RPMS with CentOS 6.4. Follow the steps below:

yum groupinstall "Development Tools" -y

More packages are needed:

yum install git ant ant-devel java-1.6.0-openjdk java-1.6.0-openjdk-devel mysql mysql-server tomcat6 mkisofs gcc python MySQL-python openssh-clients wget rpm-build ws-commons-util net-snmp genisoimage -y

Install Apache Maven:

cd /usr/local/
tar -zxvf apache-maven-3.0.5-bin.tar.gz

Set the environment variables for maven:

echo export M2_HOME=/usr/local/apache-maven-3.0.5 >> /etc/profile.d/
echo export PATH=/usr/local/apache-maven-3.0.5/bin:${PATH} >> /etc/profile.d/

Now reboot!! Log back in when the system is back up.

Download the Apache CloudStack 4.2 source zip file from Github. This can be done in a few different ways but in this post I’ll just go to the page.

Once there change from the “master” branch to the “4.2” branch or follow this URL ( then in the bottom right hand corner click the “Download Zip” button.

When the file is downloaded, unzip it and copy it to the system we setup for building the RPMs from source.

cd packaging/centos63

All the rpm packages will be create in dist/rpmbuild/RPMS/x86_64

cloudstack 4.2 rpm build

cloudstack 4.2 rpm build

If you want to create a repository that you can access from a web server use “createrepo”.

yum install createrepo

If you want to do a local installation using the packages you can run the command below.

yum --nogpgcheck localinstall cloudstack*.rpm

I have not tested an upgrade scenario but if you do try it yourself make sure the put hosts in “maintenance mode” before upgrading them. But the command below should work, just pick the right RPMs to upgrade instead of using the wildcard method.

yum --nogpgcheck localupgrade cloudstack*.rpm


Add yours
  1. arunisgood

    tar: ./ time stamp 2014-01-22 05:41:59 is 120891.632097539 s in the future

    error: Macro %_ver has empty body

    error: Macro %_ver has empty body

    error: File /usr/local/cloudstack-4.2/dist/rpmbuild/SOURCES/cloudstack-%{_ver}.tgz: No such file or directory


  2. ikke

    >error: File /usr/local/cloudstack-4.2/dist/rpmbuild/SOURCES/cloudstack-%{_ver}.tgz: No such file or directory
    If you receive above error –>
    echo $MAVEN_OPTS
    set MAVEN_OPTS=
    run again without MAVEN_OPTS set

Comments are closed.