Cloudstack 4 Manager installation memo
Basic Requirements
1. Hardware supports Virtualization
2. centos 6.3 64-bit System
Preparations
1. Make sure selinux is disabled.
2. Ensure that hostname-f has the correct output. When I run the command "hostname: unknown host", it is found that it is caused by/etc/resolv. conf setting search and killing it. Check the/etc/hosts file.
3. Ensure that the server can access the Internet, because yum installation requires Remote Installation sources.
Start Installation
1. Configure the yum repository reposity
Create the/etc/yum. repo. d/cloudstack. repo file so that the content is:
[Cloudstack]
Name = cloudstack
Base url = http://cloudstack.apt-get.eu/rhel/4.0/
Enabled = 1
Gpgcheck = 0
2. Install the Time Service:
Yum install ntp
3. Install the administrative server
Execute the yum install cloud-client Command in any path, and you will be confused about the installation! After investigation, ant, jdk, and tomcat 6 are installed, which seems to save a lot of trouble. However, maintenance and troubleshooting are difficult.
4. Install mysql
Lazy yum install mysql-server. You need to set the password. Also, they are also lazy and replaced by mysql_secure_install. The official documents indicate that the following content must be added to/etc/my. cnf. Note that the first line should be placed under [mysqld. You can try it if you have time. The content is as follows:
Innodb_rollback_on_timeout = 1
Innodb_lock_wait_timeout = 600
Max_connections = 350
Log-bin = mysql-bin
Binlog-format = 'row'
It is much simpler than the database option file/etc/my. cnf that I install on a daily basis.
5. Create a database and table related to cloudstack
Run cloud-setup-databases cloud: cloudstack @ localhost -- deploy-as = root: cloudstack
Root: The cloudstack is the root password of the database, which is set in mysql_secure_install during initialization); cloud: cloudstack @ localhost -- cloud is the connection username, followed by the connection password of cloud, you can specify a complex example.
File cloud-setup-databases is a tool written in python. It is complicated and I cannot understand it. However, after the execution, I found the database connection configuration file, specifically/etc/cloud/management/db. properties. You can view the username, Database Host Name, and encrypted password.
In fact, to ensure security, you also need to initialize the cloud database to adopt encryption measures, which are simplified here.
6. Start the cloudstack Manager:
Cloud-setup-management
If the output is:
Starting to configure CloudStack Management Server:
Configure sudoers... [OK]
Configure Firewall... [OK]
Configure CloudStack Management Server... [OK]
CloudStack Management Server setup is Done!
It is basically correct. But when you run netstat-an | grep 8080, we didn't expect it at all. I have spent some time here. This is also the key to the problem. services that do not solve the problem will never get up. Run chown-R cloud: cloud/var/log/cloud/management and start it again. Enter http: // manager_ip: 8080/client in the browser. The logon window is displayed. Someone may ask, why do you know the problem is here? I have a habit of finding out if there are any logs before the search engine. I first went to the/var/log page and found that there is a directory named cloud and Its subdirectories are
Rwxrwxr-x. 2 root cloud 4096 Apr 21 agent
Drwxr-xr-x. 2 root 4096 Apr 21 ipallocator
Drwxrwxr-x. 2 cloud 4096 Jul 1 00:04 management
-Rw-r --. 1 root 5667 Jul 1 00:33 setupManagement. log
Take some time to view the files under the directory, and you will get the result. The catalina. out in the management directory is where I found the problem and it prompts that I have no permissions.
This article is from the sery blog, please be sure to keep this source http://sery.blog.51cto.com/10037/1236505