I want to share open source cloud computing Apache Cloud Stack v4.15 installation process. This is latest release v4.15 including 250+ features with new UI. So lets start this installation process using centos 7.9 from my local server.
★ Private Cloud Setup Step By Step Using Apache Cloud Stack
★ How To Upgrade Zabbix Server 4.0 To 4.4 On CentOS 8
My server info :
IP address : 10.66.100.60
Operating System : Centos 7.9
RAM : 2 GB
Disk : 25 GB
vCPU : 2
CPU op-mode(s) : 64-bit
Service : Apache Cloud Stack v4.15
Database : Mysql 5.6
Java : 11 jdk
Step #01 : Check server version, hostname and ip address.
[root@cloud ~#] cat /etc/redhat-release
Output like below:
CentOS Linux release 7.9.2009 (Core)
See hostname setup correctly.
[root@cloud ~#] cat /etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 10.66.100.60 cloud.technologyrss.local cloud [root@cloud ~#] cat /etc/hostname cloud
Network interface is static setup.
[root@cloud ~#] cat /etc/sysconfig/network-scripts/ifcfg-enp0s3
PROXY_METHOD="none"
BROWSER_ONLY="no"
BOOTPROTO="none"
DEFROUTE="yes"
IPV4_FAILURE_FATAL="no"
IPV6INIT="yes"
IPV6_AUTOCONF="yes"
IPV6_DEFROUTE="yes"
IPV6_FAILURE_FATAL="no"
IPV6_ADDR_GEN_MODE="stable-privacy"
NAME="enp0s3"
UUID="2a40b8b9-8d93-467b-bf9a-d302b7c83e07"
DEVICE="enp0s3"
ONBOOT="yes"
IPADDR="10.66.100.60"
PREFIX="16"
GATEWAY="10.66.100.10"
DNS1="8.8.8.8"
IPV6_PRIVACY="no"
Step #02 : Restart network, check internet is ok and selinux is disabled.
[root@cloud ~#] service network restart [root@cloud ~#] ping cloudstack.apache.org
PING cloudstack.apache.org (40.79.78.1) 56(84) bytes of data.
64 bytes from 40.79.78.1 (40.79.78.1): icmp_seq=1 ttl=43 time=272 ms
64 bytes from 40.79.78.1 (40.79.78.1): icmp_seq=2 ttl=43 time=276 ms
64 bytes from 40.79.78.1 (40.79.78.1): icmp_seq=3 ttl=43 time=275 ms
64 bytes from 40.79.78.1 (40.79.78.1): icmp_seq=4 ttl=43 time=273 ms
64 bytes from 40.79.78.1 (40.79.78.1): icmp_seq=5 ttl=43 time=272 ms
64 bytes from 40.79.78.1 (40.79.78.1): icmp_seq=6 ttl=43 time=274 ms
— cloudstack.apache.org ping statistics —
6 packets transmitted, 6 received, 0% packet loss, time 15ms
rtt min/avg/max/mdev = 272.246/273.711/275.778/1.382 ms
[root@cloud ~#] cat /etc/selinux/config # This file controls the state of SELinux on the system. # SELINUX= can take one of these three values: # enforcing - SELinux security policy is enforced. # permissive - SELinux prints warnings instead of enforcing. # disabled - No SELinux policy is loaded. SELINUX=disabled # SELINUXTYPE= can take one of three values: # targeted - Targeted processes are protected, # minimum - Modification of targeted policy. Only selected processes are protected. # mls - Multi Level Security protection. SELINUXTYPE=targeted
After server reboot and the connect again.
[root@cloud ~#] reboot
For connect server via ssh using Putty or Mobaxterm.
[root@cloud ~#] ssh -l 10.66.100.60
Then press Enter and type your user password.
Step #03 : Install NTP and save Cloud Stack repo for version 4.15.
[root@cloud ~#] yum -y install ntp chrony wget [root@cloud ~#] vi /etc/yum.repos.d/cloudstack.repo
Insert below all lines into cloudstack.repo file then save and exit.
[cloudstack]
name=cloudstack
baseurl=http://cloudstack.apt-get.eu/centos/$releasever/4.15/
enabled=1
gpgcheck=0
Step #04 : Install mysql connector, mysql server and configure mysql server.
[root@cloud ~#] rpm -Uvh https://dev.mysql.com/get/Downloads/Connector-Python/mysql-connector-python-8.0.22-1.el7.x86_64.rpm --nodeps [root@cloud ~#] wget http://repo.mysql.com/mysql-community-release-el7-7.noarch.rpm [root@cloud ~#] rpm -ivh mysql-community-release-el7-7.noarch.rpm [root@cloud ~#] yum -y install mysql-server [root@cloud ~#] vi /etc/my.cnf
Insert below all lines into my.cnf file then save and exit.
innodb_rollback_on_timeout=1
innodb_lock_wait_timeout=600
max_connections=350
log-bin=mysql-bin
binlog-format = 'ROW'
Also create cloudstack.cnf file.
[root@cloud ~#] vi /etc/my.cnf.d/cloudstack.cnf
Insert below line into cloudstack.cnf file then save and exit.
[mysqld]
Start mysql service and reset mysql root password then install Cloud Stack management service.
[root@cloud ~#] systemctl start mysql [root@cloud ~#] mysql -u root -p // default password is blank. Mysql > UPDATE mysql.user SET Password=PASSWORD('passw0rd') WHERE User='root'; // [for 5.6 mysql version] Mysql > \q [root@cloud ~#] systemctl restart mysql [root@cloud ~#] yum -y install cloudstack-management
If see any error so please check properly installed Java 11.
[root@cloud ~#] alternatives --config java // press enter for keep it
Now run Cloud Stack setup database command.
[root@cloud ~#] cloudstack-setup-databases cloud:cloud@localhost --deploy-as=root:passw0rd
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.100.60, 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 ] CloudStack has successfully initialized database, you can check your database configuration in /etc/cloudstack/management/db.properties
Then check setup management using below command.
[root@cloud ~#] cloudstack-setup-management
Starting to configure CloudStack Management Server: Configure Firewall ... [OK] Configure CloudStack Management Server ...[OK] CloudStack Management Server setup is Done!
Apache Cloud Stack installation done!!!
Step #05 : Configure iptables and nfs service for Cloud Stack version 4.15.
[root@cloud ~#] vi /etc/sysconfig/iptables
Insert below line into iptables file then save and exit.
-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
Insert below line into iptables file then save and exit. Then restart iptables service using below command.
[root@cloud ~#] service iptables restart
You can check Cloud Stack log file using below.
[root@cloud ~#] tail -f /var/log/cloudstack/management/management-server.log
Now wait at least 5 minutes for up and running web UI, then go to next steps.
NFS4 communication using network domain name, so must be add your network domain name into /etc/idmapd.conf file. Open this file via any editor.
[root@cloud ~#] vi /etc/idmapd.conf
Insert below line into idmapd.conf file then save and exit.
Domain = technologyrss.local // Must be change my domain name and replace your domain name.
Then restart nfs and rpcbind services using below command.
[root@cloud ~#] service rpcbind start [root@cloud ~#] service nfs start [root@cloud ~#] chkconfig nfs on [root@cloud ~#] systemctl enable nfs.service [root@cloud ~#] chkconfig rpcbind on [root@cloud ~#] rpcinfo -p
Step #06 : Mount secondary storage and downlaod systemvm template for ready storage server.
[root@cloud ~#] mkdir -p /mnt/secondary [root@cloud ~#] mount -t nfs 10.66.100.30:/mnt/share/ct_secondary /mnt/secondary [root@cloud ~#] /usr/share/cloudstack-common/scripts/storage/secondary/cloud-install-sys-tmplt -m /mnt/secondary -u http://download.cloudstack.org/systemvm/4.15/systemvmtemplate-4.15.0-kvm.qcow2.bz2 -h kvm -F
It will take to download at least 30 minutes. Then unmount secondary storage folder and remove created directory. (Note : This steps for seperate nfs server. If you use Cloud Stack Management server as nfs server so don’t remove this directory).
[root@cloud ~#] umount /mnt/secondary [root@cloud ~#] rm -rf /mnt/secondary
Step #07 : This step for global configuration using local storage and allow internal site.
Access web UI using new UI or old UI.
http://10.66.100.60:8080/client/#/user/login?redirect=%2F
http://10.66.100.60:8080/client/legacy/
Then Go to Global configuration find and save this option.
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.11.9 (local server ip using apache web server for download iso, http://10.66.11.9/centos.iso)]
Remember it : Must be restart Cloud Stack Management server before access.
[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
Setup time zone if not setting when install operating system.
[root@cloud ~#] timedatectl [root@cloud ~#] ls -l /etc/localtime [root@cloud ~#] timedatectl set-timezone Asia/Dhaka [root@cloud ~#] timedatectl
If needed any help so please go to YouTube channel for more details. Please submit your valuable comments and share to others.
- How To Install Zabbix Server 6.4 On AlmaLinux 8 Server - August 9, 2024
- How To Clear RAM Memory Cache Buffer Linux Server - February 29, 2024
- How To Install Apache Cloud Stack Management Server 4.17 On Ubuntu 22.04 - February 1, 2024
Leave a Comment