Prerequisites for compiling Apache CloudStack¶
There are many prerequisites for compiling CloudStack. This article is compiled on Linux CentOS7 system, using RPM package management.
The following are the minimum requirements for compiling CloudStack:
- Maven (version 3)
- Java (Java 8/OpenJDK 1.8)
- Apache web server common tools (ws-commons-util)
- MySQL
- MySQLdb (provides python database API)
- Tomcat 7
- genisoimage
- rpmbuild
-
Download source package
wget http://www.apache.org/dyn/closer.lua/cloudstack/releases/4.10.0.0/apache-cloudstack-4.10.0.0-src.tar.bz2
Or clone the source code on github, and then switch to the 4.10.0 branch
-
Extracted source code
tar -xvf apache-cloudstack-4.10.0.0-src.tar.bz2
-
Configure the Yum source for MySQL
cat << eof > /etc/yum.repos.d/mysql.repo [mysql-community] name=MySQL Community connectors baseurl=http://repo.mysql.com/yum/mysql-connectors-community/el/$releasever/$basearch/ enabled=1 gpgcheck=1 eof
-
Import GPG public key from MySQL
rpm --import http://repo.mysql.com/RPM-GPG-KEY-mysql
-
Install mysql-connector
yum install mysql-connector-python
-
Install openjdk, mysql, maven, etc.
yum install java-1.8.0-openjdk-devel.x86_64 genisoimage mysql mysql-server ws-commons-util MySQL-python tomcat maven
-
Install netscaler, vmware and other jars to the local maven repository
#进入deps目录 [root@czfbsdb500h01 cloudstack]# cd deps #执行如下wget下载jar包 wget http://zooi.widodh.nl/cloudstack/build-dep/cloud-manageontap.jar wget http://zooi.widodh.nl/cloudstack/build-dep/cloud-iControl.jar wget http://zooi.widodh.nl/cloudstack/build-dep/vmware-vim.jar wget http://zooi.widodh.nl/cloudstack/build-dep/vmware-vim25.jar wget http://zooi.widodh.nl/cloudstack/build-dep/vmware-apputils.jar wget http://zooi.widodh.nl/cloudstack/build-dep/cloud-netscaler.jar #下载成功后执行安装到本地maven仓库 [root@czfbsdb500h01 deps]# ./install-non-oss.sh
-
Generate RPM package
cd packaging/ ./package.sh -d centos7
Note: The initial packaging execution time is very long
-
Generate RPM package directory as follows
[root@czfbsdb500h01 x86_64]# pwd /root/apache-cloudstack-4.10.0.0-src/dist/rpmbuild/RPMS/x86_64
-
List of RPM packages