X

How To Install Apache Cloud Stack Management Server v4.16 + Mysql 8.0 On Centos 7

Sharing is caring!

In this tutorial how to install Apache Cloud Stack management server v4.16 and mysql 8.0 on centos 7. Apache Cloud Stack is an open source  cloud computing system. You can use as private or public cloud as you want.

My server info:
######################################
IP address  : 10.66.10.16
Operating System: Centos 7
RAM   : 2 GB
Disk   : 25 GB
vCPU   : 2
CPU op-mode(s)  : 64-bit
Service  : Apache Cloud Stack v4.16
Database  : Mysql 8
Java   : 11 jdk
Hostname (FQDN) :  cloud.technologyrss.local
######################################

Step #01: Check your server version and ip.

[root@cloud ~]# cat /etc/redhat-release && ip r

Add all hosts name and ip address on your server hosts file. like below.

[root@cloud ~]# vi /etc/hosts

As like below

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
10.66.10.16 cloud.technologyrss.local       cloud
10.66.10.26 kvm.technologyrss.local         kvm
10.66.10.36 acs-nfs.technologyrss.local         acs-nfs

For save press Esc then type :wq then press Enter.

Step #02: Check ping status and disable firewall.

[root@cloud ~]# hostname --fqdn
[root@cloud ~]# ping cloud.technologyrss.local
[root@cloud ~]# ping cloudstack.apache.org
[root@cloud ~]# systemctl stop firewalld
[root@cloud ~]# systemctl disable firewalld

Disable selinux status

[root@cloud ~]# vi /etc/selinux/config

Then reboot your server using below command.

[root@cloud ~]# reboot

Step #03: Download latest epel release and update your server.

[root@cloud ~]# yum install -y epel-release
[root@cloud ~]# yum update
[root@cloud ~]# yum -y install wget chrony

Add Apache Cloud Stack repo. open this file via any editor.

[root@cloud ~]# vi /etc/yum.repos.d/cloudstack.repo

Add below all text into cloudstack.repo file.

[cloudstack]
name=cloudstack
baseurl=http://cloudstack.apt-get.eu/centos/$releasever/4.16/
enabled=1
gpgcheck=0

Step #04: Install mysql 8.0 on Apache Cloud Stack server 4.16

[root@cloud ~]# yum localinstall https://dev.mysql.com/get/mysql80-community-release-el7-1.noarch.rpm
[root@cloud ~]# vi  /etc/yum.repos.d/mysql-community.repo

Add below line into mysql 8.0 community section

gpgkey=https://repo.mysql.com/RPM-GPG-KEY-mysql-2022

Then run mysql installation command as like below.

[root@cloud ~]# yum -y install mysql-server
[root@cloud ~]# systemctl start mysqld
[root@cloud ~]# systemctl enable mysqld

Find mysql root user temporary password using below command.

[root@cloud ~]# grep 'temporary password' /var/log/mysqld.log

Login mysql terminal using temporary password and then reset root password.

[root@cloud ~]# mysql -u root -p

Reset mysql root password using below command

mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'P@ssw0rd@123'; //mysql 8 reset password command
Query OK, 0 rows affected (0.01 sec)
\q

Step #05: Install mysql connector and Apache Cloud Stack service.

[root@cloud ~]# yum -y install mysql-connector-python
[root@cloud ~]# yum -y install cloudstack-management
[root@cloud ~]# alternatives –config java

Then create cloud database and user using below command.

[root@cloud ~]# cloudstack-setup-databases cloud:Passw0rd@123@localhost --deploy-as=root:P@ssw0rd@123

Output as like below:

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 10.66.10.16, will use as cluster management server node IP[ OK ]
Preparing /etc/cloudstack/management/db.properties                              [ 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 ]

Then run below command for check all status is ok.

[root@cloud ~]# cloudstack-setup-management

Step #06: Add iptables required port into Apache Cloud Stack server.

[root@cloud ~]# vi /etc/sysconfig/iptables

Add below all lines into iptables file.

-A INPUT -p tcp -m state --state NEW -m tcp --dport 8080 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 8250 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 8443 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 9090 -j ACCEPT

iptables service restart using below command.

[root@cloud ~]# service iptables restart

Check ACS log using below command.

[root@cloud ~]# tail -f /var/log/cloudstack/management/management-server.log

Step #07: Add your local domain name into idmapd.conf

[root@cloud ~]# vi /etc/idmapd.conf

Add below line as your domain name

Domain = technologyrss.local

Restart some service from below command.

[root@cloud ~]# service rpcbind restart
[root@cloud ~]# service nfs-utils restart
[root@cloud ~]# systemctl enable nfs-utils
[root@cloud ~]# chkconfig rpcbind on
[root@cloud ~]# rpcinfo -p

Step #08: Download systemvm template into Apache Cloud Stack Server.

Create one folder for mound your storage share for secondary storage.

[root@cloud ~]# mkdir -p /mnt/secondary
[root@cloud ~]# mount -t nfs 10.66.10.36:/mnt/secondary /mnt/secondary

Then run below command for download systemvm template.

[root@cloud ~]# /usr/share/cloudstack-common/scripts/storage/secondary/cloud-install-sys-tmplt -m /mnt/secondary -u http://download.cloudstack.org/systemvm/4.16/systemvmtemplate-4.16.0-kvm.qcow2.bz2 -h kvm -F

When download and installation done then remove created directory.

[root@cloud ~]# umount /mnt/secondary
[root@cloud ~]# rm -rf /mnt/secondary

Note: If you use Apache Cloud Stack management server as storage server so don’t remove this directory.

Default login details:

URL  : http://10.66.10.16:8080/client/#/user/login?redirect=%2F
User name : admin
Password  : password

Step #09: For private cloud computing Global configuration.

system.vm.use.local.storage  [ set false to ->  true
ca.plugin.root.auth.strictness  [ set true to ->  false
secstorage.allowed.internal.sites [set value = >  10.66.10.15  (local server ip using apache web server for download iso, http://10.66.10.15/centos.iso)]

Note : Please restart your management server(s) for your new settings to take effect.

Then restart Apache Cloud Stack management service using below command.

[root@cloud ~]# /bin/systemctl stop cloudstack-management.service
[root@cloud ~]# /bin/systemctl start cloudstack-management.service
[root@cloud ~]# tail -f /var/log/cloudstack/management/management-server.log

Time zone setup

[root@cloud ~]# timedatectl
[root@cloud ~]# ls -l /etc/localtime
[root@cloud ~]# timedatectl set-timezone Asia/Dhaka
[root@cloud ~]# timedatectl

Any error first check server log file and find what is issue.

[root@cloud ~]# tail -f /var/log/cloudstack/management/management-server.log

If needed more help so please check my YouTube channel for more video. Don’t forget subscribe my channel and share to any social media.

0 0 votes
Article Rating
Admin: I am system administrator as Windows and Linux platform. I have 4 years skilled from the professional period. I have to configure Linux based system such as an Asterisk VOIP system, Network monitoring tools (ZABBIX), Virtualization (XEN Server), Cloud computing (Apache CloudStack) etc. Now share my professional skill each interested person. Thanks to all.
Leave a Comment