Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install cloudstack-management in CloudStack 4.4

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

Editor to share with you how to install cloudstack-management in CloudStack 4.4, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!

1. Cloudstack-management installation steps (CloudStack 3.0 and 4.4 packages)

The commands and directories of version 3. 0 and 4. 4 of CloudStack are very different.

The following command, the callout section is the difference between 3.0 and 4.4, and the rest remains the same.

①, log in as root, and set the hostname:

Hostname: [cloud-server.perofu.com]

Ip: [172.22.2.76]

Hostname cloud-server.perofu.com

Vi / etc/sysconfig/network

HOSTNAME=cloud-server.perofu.com

Vi / etc/hosts

127.0.0.1 cloud-server.perofu.com

172.22.2.76 cloud-server.perofu.com

172.22.2.87 cloud-agent-1.perofu.com

172.22.2.100 cloud-agent-2.perofu.com

②, set SELinux and synchronize time:

Vi / etc/sysconfig/selinux

SELINUX=disabled

Setenforce 0

Yum install ntpdate-y

Echo'# ntpd' > > / var/spool/cron/root

Echo "10 5 * / usr/sbin/ntpdate ntp.api.bz & > / dev/null" > > / var/spool/cron/root

Echo'> / var/spool/cron/root

Service ntpd stop

Chkconfig ntpd off

/ usr/sbin/ntpdate ntp.api.bz & > / dev/null

③, install MySQL:

Here the mysql is installed separately, using the yum source of the CD, which can save resources, of course, you can use the installation script of Cloudstack to install, the same effect.

Yum install openssl-devel mysql-server mysql-devel-y

Cp-a / usr/share/doc/mysql-server-5.1.66/my-medium.cnf / etc/my.cnf

Vi / etc/my.cnf

[mysqld]

Innodb_rollback_on_timeout=1

Innodb_lock_wait_timeout=600

Max_connections=350

Log-bin=mysql-bin

Binlog-format=ROW

/ etc/init.d/mysqld start

Chkconfig mysqld on

/ usr/bin/mysql_secure_installation # configure mysql security, you can select all Y directly

④, install cloudstack-management:

V4.4

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

[cloudstack]

Name=cloudstack

Baseurl= http://cloudstack.apt-get.eu/rhel/4.4/

Enabled=1

Gpgcheck=0

Yum-y install cloudstack-management httpd

V3.0

Tar-axf CloudStack-oss-3.0.2-1-rhel6.2.tar.gz-C / usr/local/src/

Cd / usr/local/src/CloudStack-oss-3.0.2-1-rhel6.2/

. / install.sh

M

"M"-> install Management Server software.

"D"-> install MySQL.

⑤, the database that initializes CloudStack:

V4.4

Cloudstack-setup-databases cloud:dbpassword@localhost-deploy-as=root:password

[root@cloud-server] # cloudstack-setup-databases cloud:123456@localhost-- deploy-as=root:123456

V3.0

Cloud-setup-databases cloud:dbpassword@localhost-deploy-as=root:password

Note: it means to generate the database as root user, which belongs to the newly created cloud user (password dbpassword can be left blank).

[root@cloud-server] # cloud-setup-databases cloud:123456@localhost-- deploy-as=root:123456

Mysql user name:cloud [OK]

Mysql user password:123456 [OK]

Mysql server ip:localhost [OK]

Mysql server port:3306 [OK]

Mysql root user name:root [OK]

Mysql root user password:123456 [OK]

Checking Cloud database files... [OK]

Checking local machine hostname... [OK]

Checking SELinux setup... WARNING: We detected that your SELinux is not configured in permissive. To make sure cloudstack won't block by SELinux after system reboot, we strongly suggest you setting it in permissive in / etc/selinux/config, then reboot the machine.

[OK]

Detected local IP address as 172.22.2.76, will use as cluster management server node IP [OK]

Preparing / etc/cloud/management/db.properties [OK]

Applying / usr/share/cloud/setup/create-database.sql [OK]

Applying / usr/share/cloud/setup/create-schema.sql [OK]

Applying / usr/share/cloud/setup/create-database-premium.sql [OK]

Applying / usr/share/cloud/setup/create-schema-premium.sql [OK]

Applying / usr/share/cloud/setup/server-setup.sql [OK]

Applying / usr/share/cloud/setup/templates.sql [OK]

Applying / usr/share/cloud/setup/create-index-fk.sql [OK]

Processing encryption... [OK]

Finalizing setup... [OK]

CloudStack has successfully initialized database, you can check your database configuration in / etc/cloud/management/db.properties

/ etc/cloud/management/db.properties stores information about the CloudStack database.

⑥, initialize cloudstack-management, and start:

The settings of the operating system iptables and sudoers (CloudStack itself has security requirements, not infinitely exposed to the network, but also requires some administrative rights to run its own services, so it is necessary to do these two settings).

V4.4

/ etc/init.d/httpd start

Chkconfig httpd on ‍

Cloudstack-setup-management

/ etc/init.d/cloudstack-management start

Chkconfig cloudstack-management on

V3.0

Cloud-setup-management

/ etc/init.d/cloud-management start

Chkconfig cloud-management on

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

Starting to configure CloudStack Management Server:

Configure sudoers... [OK]

Configure Firewall... [OK]

Configure CloudStack Management Server... [OK]

CloudStack Management Server setup is Done!

Log file for manager: / var/log/cloud/management/management-server.log

⑦, configure NFS:

As mentioned earlier, CloudStack needs two types of storage (primary storage and secondary storage) to support its cluster and host, which are provided by NFS in this section, so start the NFS service in the previous steps. At the same time, for convenience's sake, NFS Server is also served by cloud-server.perofu.com.

Yum install nfs-utils-y

Mkdir-p / data/ {primary,secondary} # create two directories as primary and secondary storage respectively

Chmod 777 / data/*

Vi / etc/exports

/ data/primary * (rw,fsid=1,async,no_root_squash,no_subtree_check)

/ data/secondary * (rw,fsid=2,async,no_root_squash,no_subtree_check)

Exportfs-a # Export / data directory

Cp / etc/sysconfig/nfs / etc/sysconfig/nfs.bak

> / etc/sysconfig/nfs

Vi / etc/sysconfig/nfs # for iptables

LOCKD_TCPPORT=32803

LOCKD_UDPPORT=32769

MOUNTD_PORT=892

RQUOTAD_PORT=875

STATD_PORT=662

STATD_OUTGOING_PORT=2020

Vi / etc/sysconfig/iptables # can also close iptables before joining all INPUT

-An INPUT-m state-- state NEW-p udp-- dport 111j ACCEPT

-An INPUT-m state-- state NEW-p tcp-- dport 111j ACCEPT

-An INPUT-m state-- state NEW-p tcp-- dport 2049-j ACCEPT

-An INPUT-m state-- state NEW-p tcp-- dport 32803-j ACCEPT

-An INPUT-m state-- state NEW-p udp-- dport 32769-j ACCEPT

-An INPUT-m state-- state NEW-p tcp-- dport 892-j ACCEPT

-An INPUT-m state-- state NEW-p udp-- dport 892-j ACCEPT

-An INPUT-m state-- state NEW-p tcp-- dport 875-j ACCEPT

-An INPUT-m state-- state NEW-p udp-- dport 875-j ACCEPT

-An INPUT-m state-- state NEW-p tcp-- dport 662-j ACCEPT

-An INPUT-m state-- state NEW-p udp-- dport 662-j ACCEPT

Service iptables restart

Service iptables save

Vi / etc/idmapd.conf # Management Server (cloud-server.perofu.com) and hypervisor

Domain = perofu.com

Service rpcbind restart

Service nfs restart

Mkdir / tmp/primarymount

Mount-t nfs 172.22.2.76:/data/primary / tmp/primarymount # test whether it can be mounted, iptables

Umount / tmp/primarymount/

Service rpcbind restart

Service nfs restart

Chkconfig nfs on

Chkconfig rpcbind on

[root@cloud-server] # df-h

Filesystem Size Used Avail Use% Mounted on

/ dev/mapper/VolGroup-lv_root

19G 1.7g 16G 10% /

Tmpfs 116M 0 116M 0% / dev/shm

/ dev/sda1 485M 32m 428M 7% / boot

/ dev/sr0 4.1G 4.1G 0100% / mnt

172.22.2.76:/data/primary 19G 1.7G 16G 10% / tmp/primarymount

⑧, import virtual machine template:

If the system virtual machine template is to be stored on the secondary storage as required, we can manually mount the nfs secondary storage, and then download the 290m KVM virtualization template to the secondary storage directory, and then import the system virtual machine template step is a necessary configuration. This example uses KVM virtualization to download and import the KVM virtual machine template.

1) Mount the secondary storage on the management

2) download the kvm template and upload it to the secondary storage

3), import.

Systemvm64template-4.4.0-6-kvm.qcow2.bz2 template file is a bit large, it is best to download through other download tools, such as Baidu network disk offline download, and then upload to use.

Operate on management.

V4.4

/ usr/share/cloudstack-common/scripts/storage/secondary/cloud-install-sys-tmplt-m / tmp/secondarymount-f systemvm64template-4.4.0-6-kvm.qcow2.bz2-h kvm-F

V3.0

Mkdir / tmp/secondarymount

Mount-t nfs 172.22.2.76:/data/secondary / tmp/secondarymount

Cd / tmp/secondarymount

Wget http://cloudstack.apt-get.eu/systemvm/4.4/systemvm64template-4.4.0-6-kvm.qcow2.bz2

/ usr/lib64/cloud/agent/scripts/storage/secondary/cloud-install-sys-tmplt-m / tmp/secondarymount-f systemvm64template-4.4.0-6-kvm.qcow2.bz2-h kvm-F

System virtual machine default username password: root/6m1ll10n

[root@cloud-server ~] # mkdir / tmp/secondarymount

[root@cloud-server] # mount-t nfs 172.22.2.76:/data/secondary / tmp/secondarymount

[root@cloud-server ~] # cd / tmp/secondarymount

[root@cloud-server secondarymount] # rz

Rz waiting to receive.

Starting zmodem transfer. Press Ctrl+C to cancel.

296844 KB 6184 KB/s 00:00:48 0 Errorss2...

[root@cloud-server secondarymount] # pwd

/ tmp/secondarymount

[root@cloud-server secondarymount] #

[root@cloud-server secondarymount] # ll

Total 296848

-rw-r--r--. 1 root root 303968528 Sep 29 03:17 systemvm64template-4.4.0-6-kvm.qcow2.bz2

[root@cloud-server secondarymount] # / usr/lib64/cloud/agent/scripts/storage/secondary/cloud-install-sys-tmplt-m / tmp/secondarymount-f systemvm64template-4.4.0-6-kvm.qcow2.bz2-h kvm-F

Uncompressing to / usr/lib64/cloud/agent/scripts/storage/secondary/6e1d6d0d-8768-48b9-87af-44a182427c8c.qcow2.tmp (type bz2)... could take a long time

Moving to / tmp/secondarymount/template/tmpl/1/3///6e1d6d0d-8768-48b9-87af-44a182427c8c.qcow2...could take a while

Successfully installed system VM template systemvm64template-4.4.0-6-kvm.qcow2.bz2 to / tmp/secondarymount/template/tmpl/1/3/

[root@cloud-server secondarymount] #

⑨, visit web:

Http://172.22.2.76:8080/client/

The default username and password are admin, password

V4.4

V3.0

How to reinstall ⑩ and CloudStack: 1) stop the CloudStack service:

Service cloudstack-management stop

2) Delete the database:

Mysql > drop database cloud

Mysql > drop database cloud_usage

Mysql > drop database cloudbridge

Mysql >\ Q

3) initialize the CloudStack database:

For details, see the initialization CloudStack database section.

4) re-import the virtual machine of the system:

For details, see the import virtual machine template section.

5) start the cloudstack service:

Service cloudstack-management start

At this point, you will find a brand new CloudStack when you log in again.

These are all the contents of the article "how to install cloudstack-management in CloudStack 4.4.4.Thank you for reading!" I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report