CentOS6. 6 installation CloudStack4. 8

  • 2020-05-12 06:38:19
  • OfStack

The CloudStack official has very detailed installation and usage documentation, but it may be a bit messy. Here record 1 installation configuration process, note! Refer to the official installation documentation for the entire process!

CloudStack is an open source cloud computing platform with high availability and scalability. Support management of most of the mainstream hypervisor, such as KVM virtual machine, XenServer, VMware, Oracle VM, Xen, Xen and so on.

1. Basic environment:

The installation is carried out on the system of Centos6.6 64-bit version, and the cloudstack version used is the latest official version of 4.8, which is somewhat different from the previous version of 4.3. It still has some influence on the subsequent use, which will be mentioned later. Two other pits are also marked during use to prevent future pitting.

This time, a minimum cloudstack system is installed, using the default Shared network, that is, the network environment where the cloudstack server is located. No complex network environment is involved.

Several components required for installation:

Database: 172.16.10.5:3306 # storage of cloud platform data
nfs(secondary storage) 172.16.10.5 # for secondary storage
ntp_server 172.16.10.5 # client and server time synchronization
management 172.16.10.5 # cloud platform management center
agent: 172.16.10.5 # controlled end, normally should be the host in virtualization (can be kvm, xen,vsphere, etc.)

Network parameters:

gateway 172.16.0.1
netmask 255.255.0.0
systemip 172.16.10.10-172.16.10.20
guest-gateway 172.16.0.1
netmask: 255.255.0.0
guest ips: 172.16.10.30--172.16.10.100

Architecture after installation:

2. Installation process

When the operating system is installed, choose the virtualization platform component and configure the following software based on it. In this installation, the database, level-2 storage, cloudstack server and cloudstack client (KVM host) are all installed on one server, and the following software is installed successively as required (all software additions are installed with yum) :

1. Install nfs

As secondary storage

#yum install -y nfs-utils
#chkconfig nfs on
#mkdir -p /export/primary
#mkdir -p /export/secondary
#vi /etc/exports
/export 172.16.10.*(rw,async,no_root_squash,no_subtree_check)
#service nfs restart

2. Install mysql

#yum -y install mysql-server

Modify the configuration file my.cnf to add the following

innodb_rollback_on_timeout=1
innodb_lock_wait_timeout=600
max_connections=350
log-bin=mysql-bin
binlog-format = 'ROW'

Restart and configure mysql to boot automatically:

#service mysqld restart
#chkconfig mysqld on

Run mysql security script, set mysql password, disable Root user remote login, delete empty password user, etc

#mysql_secure_installation

3. Install ntp

# yum -y install ntp

In fact, the default configuration item can satisfy the requirements, just enable NTP and set it to boot as shown below:

# chkconfig ntpd on
# service ntpd start

4. Install cloudstack - management

There is a problem here, which is that the official yum source was very slow in the previous and subsequent installation process, so I will download all the rpm files to the local place and install them with yum localinstall. Of course, downloading the rpm package directly won't be quick, but you can use it the next time you install it without spending all your time waiting. In addition, you can use baidu cloud disk offline download, and then download from baidu cloud disk to the local, may be faster 1!

< 1 > Add cloudstack repositories, create/etc/yum repos. d/cloudstack repo file, and add the following information.

[cloudstack]
name=cloudstack
baseurl=http://cloudstack.apt-get.eu/centos/6/4.8/
enabled=1
gpgcheck=0

Although yum localinstall is used, the cloudstack software library is still required, otherwise the dependencies may not be found during the installation process.

< 2 > Upload and download the Rpm package to /opt, and there will be only 4 more important packages:

cloudstack-agent-4.8.0-1.el6.x86_64.rpm
cloudstack-common-4.8.0-1.el6.x86_64.rpm
cloudstack-management-4.8.0-1.el6.x86_64.rpm
cloudstack-usage-4.8.0-1.el6.x86_64.rpm
#cd /opt
#yum localinstall cloudstack-*

After installation:

< 3 > Initialize the database

#cloudstack-setup-databases cloud:123456@localhost --deploy-as root:123456

< 4 > Configuration management server:

#cloudstack-setup-management

< 5 > Upload system template

#/usr/share/cloudstack-common/scripts/storage/secondary/cloud-install-sys-tmplt \
-m /export/secondary \
-u http://cloudstack.apt-get.eu/systemvm/4.6/systemvm64template-4.6.0-kvm.qcow2.bz2 -h kvm -F

For this step, please refer to the cloudstack package. Download it locally and use -f system-template. For details, please refer to usage below

Usage: cloud-install-sys-tmplt: -m < secondary storage mount point > -f < system vm template file > [-h < hypervisor name: kvm|vmware|xenserver|hyperv|ovm3 > ] [ -s < mgmt server secret key, if you specified any when running cloudstack-setup-database, default is password > ][-u < Url to system vm template > ] [-F < clean up system templates of specified hypervisor > ] [-e < Template suffix, e.g vhd, ova, qcow2 > ] [-o < Database server hostname or ip, e.g localhost > ] [-r < Database user name, e.g root > ] [-p < mysql database port > ] [-d < Database password. Fllowed by nothing if the password is empty > ]

Start management when all is done

#/etc/init.d/cloudstack-management start

5. Install agent

This is the command in the official documentation

I still use it when I install it

#yum localinstall cloudstack-agent-4.8.0-1.el6.x86_64.rpm cloudstack-common-4.8.0-1.el6.x86_64.rpm

Run the agent configuration command when the installation is complete

cloudstack-setup-agent

According to the prompt input, manage the server's IP, listening port and other information. (to be continued)

6. The configuration hypervisor

< 1 > Install kvm

To minimize the installed system run the following command

#yum groupinstall -y Virtualization " Virtualization Client"

Or choose to virtualize the host component at system installation time.

Verify that kvm is installed correctly

lsmod | grep kvm

That's right

< 2 > Configuration kvm

Edit QEMU VNC configuration file/etc libvirt/qemu conf and cancel the following lines.

#vnc_listen=0.0.0.0

In/etc libvirt/libvirtd conf file, configure the following parameters

listen_tls = 0
listen_tcp = 1
tcp_port = "16059"
auth_tcp = "none"
mdns_adv = 0

Modify the parameters in /etc/sysconfig/libvirtd:

Uncomment the following line:

#LIBVIRTD_ARGS="--listen"

Restart libvirtd after completion

#/etc/init.d/libvirtd restart

So far cloudstack installed, open the browser input 172.16.10.5:8080 / client/finished cloudstack appear below the picture is successfully installed.


Related articles: