The Cloudstack official has a very detailed installation of the document, but may be slightly scattered. Here is a record of the next installation configuration process, Memo! The entire process refers to the official installation documentation!
Cloudstack is an open-source, highly available and scalable cloud computing platform. Supports the management of most mainstream hypervisor, such as KVM virtual machines, xenserver,vmware,oracle Vm,xen, etc.
First, the basic environment:
Installation is on the Centos6.6 64-bit version of the system, the use of the Cloudstack version of 4.8 is currently the latest official version, compared to the previous 4.3 some changes in the subsequent use or some impact, will be proposed later. In addition there are two pits in use that are also monogram out to avoid further entry into the pit later.
This time, the installation of a minimal scale cloudstack system, using the default shared network, that is, the Cloudstack server in the network environment, does not involve a complex network environment.
Several components required in the installation:
Database: 172.16.10.5:3306 #存储云平台数据
NFS (Secondary storage) 172.16.10.5 #用于辅助存储
Ntp_server 172.16.10.5 #客户端与服务端的时间同步
Management 172.16.10.5 #云平台管理中心
agent:172.16.10.5 #受控端, normal 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
The schema after the installation is complete:
Second, the installation process
Select the virtualization platform component on the operating system installation and configure the following required software on some basis. This installation will be the database, level two storage, Cloudstack server, Cloudstack client (that is, the KVM host) to the centralized installation of the following software (including all software to install the Yum installation):
1. Installing 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 add the following
Innodb_rollback_on_timeout=1
innodb_lock_wait_timeout=600
max_connections=350
Log-bin=mysql-bin
Binlog-format = ' ROW '
Reboot and configure MySQL to boot from:
#service mysqld Restart
#chkconfig mysqld on
Run MySQL security script, according to the prompts to set the MySQL password, the root user remote login, delete the blank password user, etc.
#mysql_secure_installation
3. Install NTP
# yum-y Install NTP
In fact, the requirements that the default configuration entry meets are only enabled for NTP and set to boot, as follows:
# Chkconfig NTPD on
# service NTPD Start
4. Install Cloudstack-management
Here is a problem, that is, several times before and after the installation process to find the official Yum source is very slow, so generally I will download the rpm files to the local after the Yum Localinstall to install. Of course, directly download the RPM package will not be very fast, but can be used in the next installation, not to spend all the time waiting. In addition, Baidu Cloud disk can be downloaded offline, and then from Baidu Cloud disk download to the local, may be faster!
<1> Add the Cloudstack software Warehouse, create the/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 using Yum Localinstall but still requires cloudstack software libraries, dependencies may occur during the installation process.
<2> upload the downloaded RPM package to/opt, generally 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 the installation is complete:
<3> Initializing 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
This step can refer to the Cloudstack package, first download to the local, using the-F system-template. Detailed use of the method reference below usage
USAGE:CLOUD-INSTALL-SYS-TMPLT:-M <secondary storage Mount Point>-F <system VM template file> [-H
Start management when all of the above is complete
#/etc/init.d/cloudstack-management start
5. Install Agent
# yum-y Install cloudstack-agent #这是官方文档的命令
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 Agent configuration command after Setup completes
Cloudstack-setup-agent
According to the prompt input, Management Server IP, listening to the port and other information. adjourned
6. Configure hypervisor
<1> installation of KVM
If the system that minimizes the installation runs the following command
#yum groupinstall-y Virtualization "Virtualization Client"
Or select the Virtualization Host component at System installation.
Verify that the KVM is properly installed
Lsmod | grep KVM
As the picture is correct
<2> Configuring KVM
Edit qemu VNC configuration file/etc/libvirt/qemu.conf and uncomment the following lines.
#vnc_listen =0.0.0.0
In the/etc/libvirt/libvirtd.conf file, configure the following parameters
LISTEN_TLS = 0
LISTEN_TCP = 1
Tcp_port = "16059"
Auth_tcp = "None"
MDNS_ADV = 0
To modify the parameters in/ETC/SYSCONFIG/LIBVIRTD:
Uncomment the following line:
#LIBVIRTD_ARGS = "--listen"
Reboot LIBVIRTD after completion
#/etc/init.d/libvirtd restart
At this point Cloudstack installed, open the browser input 172.16.10.5:8080/client/The following screen is successfully installed completed cloudstack.