Installing Cloudstack on CentOS 7.

Experimenting with cloud solution for On-demand visualization. I got a tip from a colleague. Apache CLOUDSTACK can manage VMware environment. So why not test it!

First of all I need to install the management server. So I have chosen CentOS 7. Cloudstack has no manual for CentOS 7 (Only has one for CentOS 6), so I have started building a manual for CentOS 7.

How to implement this on CentOS 7?

CentOS 7 – Starting installation of Cloudstack.

I have already created a Centos server with the minimal software installation. I will use the package of Shape Blue for VMware. This is the link for the latest version:

NOTE: Currently the is a problem with the Shapeblue repo. Please use these links:

So we will create first the REPO on the CentOS server.

vi /etc/yum.repos.d/cloudstack.repo

Add following line to cloudstack.repo


Import the gpg release key


--2016-05-21 09:39:05--
Resolving (
Connecting to (||:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1735 (1.7K) [text/plain]
Saving to: ‘release.asc’

100%[====================================================================>] 1,735 --.-K/s in 0s

2016-05-21 09:39:05 (21.9 MB/s) - ‘release.asc’ saved [1735/1735]

sudo rpm --import release.asc

And our repository is ready to use. We may now install any of the available     packages, for example:

yum install cloudstack-management cloudstack-usage cloudstack-agent

Installing maria-DB

yum install mariadb-server mariadb -y

After the installation edit the following file and add the lines in black.

vi /etc/my.cnf


systemctl restart mariadb
systemctl enable mariadb

MariaDB security 

/bin/mysql_secure_installation: line 379: find_mysql_client: command not found


In order to log into MariaDB to secure it, we'll need the current
password for the root user. If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none):
OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.

Set root password? [Y/n] y
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
 ... Success!

By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n] y
 ... Success!

Normally, root should only be allowed to connect from 'localhost'. This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] y
 ... Success!

By default, MariaDB comes with a database named 'test' that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n] y
 - Dropping test database...
 ... Success!
 - Removing privileges on test database...
 ... Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n] y
 ... Success!

Cleaning up...

All done! If you've completed all of the above steps, your MariaDB
installation should now be secure.

Thanks for using MariaDB!

Create the cloudstack database on the mariaDB

cloudstack-setup-databases cloud:secret --deploy-as=root:<password>

Mysql user name:cloud [ OK ]
Mysql user password:****** [ OK ]
Mysql server ip:localhost [ OK ]
Mysql server port:3306 [ OK ]
Mysql root user name:root [ OK ]
Mysql root user password:****** [ OK ]
Checking Cloud database files ... [ OK ]
Checking local machine hostname ... [ OK ]
Checking SELinux setup ... [ OK ]
Detected local IP address as, will use as cluster management server node IP[ OK ]
Preparing /etc/cloudstack/management/ [ OK ]
Applying /usr/share/cloudstack-management/setup/create-database.sql [ OK ]
Applying /usr/share/cloudstack-management/setup/create-schema.sql [ OK ]
Applying /usr/share/cloudstack-management/setup/create-database-premium.sql [ OK ]
Applying /usr/share/cloudstack-management/setup/create-schema-premium.sql [ OK ]
Applying /usr/share/cloudstack-management/setup/server-setup.sql [ OK ]
Applying /usr/share/cloudstack-management/setup/templates.sql [ OK ]
Processing encryption ... [ OK ]
Finalizing setup ... [ OK ]

CloudStack has successfully initialized database, you can check your database   configuration in /etc/cloudstack/management/

cloudstack-setup-management --tomcat7
Starting to configure CloudStack Management Server:
Configure Firewall ... [OK]
Configure CloudStack Management Server ...[Failed]
Cannot find /etc/cloudstack/management/server-nonssl.xml or /etc/cloudstack/management/tomcat6-nonssl.conf, https enable failed
Try to restore your system:
Restore Firewall ... [OK]
Restore CloudStack Management Server ...[OK]

To solve the failed error, copy the file server7-nonssl.xml to server.xml
cp -p server7-nonssl.xml server.xml

systemctl stop cloudstack-management.service
systemctl start cloudstack-management.service

systemctl status cloudstack-management.service
● cloudstack-management.service - CloudStack Management Server
 Loaded: loaded (/usr/lib/systemd/system/cloudstack-management.service; enabled; vendor preset: disabled)
 Active: active (running) since Sat 2016-05-21 17:16:50 CEST; 6s ago
 Main PID: 5702 (java)
 CGroup: /system.slice/cloudstack-management.service
 └─5702 /usr/lib/jvm/jre/bin/java -Djava.awt.headless=true -...

systemctl enable cloudstack-management.service Created symlink from /etc/systemd/system/ to /usr/lib/systemd/system/cloudstack-management.service. 

Open your webbrowser and go to the following webspage:


http://<ip address>:8080/client.

This will show your the login page of CloudStack (Use the default admin password: admin/password)



16 thoughts on “Installing Cloudstack on CentOS 7.

    1. I had that too. It was because cloudstack-management package was not actually installing, giving a message like “Package cloudstack-common- is not signed”
      You can solve this by adding “–nogpgcheck” flag to the yum command.


  1. when I run the command cloudstack-setup-management –tomcat7, I get the error -bash: cloudstack-setup-management: command not found. Can you please help me with this. I am installing cloudstack on Centos-7. The cloudstak version installed is 4.11


  2. when i run mysql_secure_installation command iam facing an error .the cloud stack version installed is 4.11
    Error: Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.