■作業概要
仮想化対応及び64bit対応CPUを搭載したハードウェアで構築
cloudstackを一台のハードウェアで構築した際のメモ
■ハードウェア情報
CPU :Intel Core i5-3470S
MEMORY:16GB
HDD :1TB
■作業内容
centos6.4 64bit デスクトップが利用出来るよう構成する
ソフトウェア更新を行ってOSやミドルウェアを最新にする
端末を開いてVNCサーバをインストール
(仮想マネージャを確認できるようにするため)
# yum install -y vnc-server
# chkconfig vncserver on
# whoami
======================================================
root
======================================================
# vncpasswd
<vncpassword>
<vncpassword>
# vi /etc/sysconfig/vncservers
------------------------------------------------------
VNCSERVERS="1:root"
VNCSERVERARGS[1]="-geometry 1024x768 -nolisten tcp"
------------------------------------------------------
# iptables -I INPUT -p tcp -m tcp --dport 5901 -j ACCEPT
# /etc/init.d/iptables save
# yum install bridge-utils
# cd /etc/sysconfig/network-utils
# cp -p ifcfg-eth0 ifcfg-cloudbr0
# vi ifcfg-eth0
------------------------------------------------------
DEVICE=eth0
TYPE=Ethernet
UUID=7c892fd8-29a7-4f1d-9add-ec067b8cf201
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=none
HWADDR=D8:50:E6:C4:14:FE
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME=eth0
BRIDGE=cloudbr0
------------------------------------------------------
# vi ifcfg-cloudbr0
------------------------------------------------------
DEVICE=cloudbr0
TYPE=Bridge
UUID=7c892fd8-29a7-4f1d-9add-ec067b8cf201
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=static
IPADDR=10.48.100.152
PREFIX=24
GATEWAY=10.48.100.254
DNS1=10.48.100.254
------------------------------------------------------
# /etc/init.d/NetworkManager stop
# chkconfig NetworkManager off
# /etc/init.d/network restart
# hostname --fqdn
======================================================
※正しく表示されない場合hostsに追記する
======================================================
# vi /etc/hosts
------------------------------------------------------
10.48.100.152 <hostname>
------------------------------------------------------
# hostname --fqdn
======================================================
<hostname>
======================================================
# vi /etc/selinux/config
------------------------------------------------------
SELINUX=enforcing
↓書き換える↓
SELINUX=disabled
------------------------------------------------------
# reboot
# vi /etc/yum.repos.d/cloudstack.repo
------------------------------------------------------
[cloudstack]
name=cloudstack
baseurl=http://cloudstack.apt-get.eu/rhel/4.0/
enabled=1
gpgcheck=0
------------------------------------------------------
# yum install cloud-client
# yum install mysql-server
# 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
# mysql_secure_installation
# cloud-setup-databases cloud:<dbpassword>@localhost --deploy-as=root:<root_dbpassword>
# cloud-setup-management
# mkdir -p /export/primary
# mkdir -p /export/secondary
# vi /etc/exports
------------------------------------------------------
/export *(rw,async,no_root_squash)
------------------------------------------------------
# exportfs -a
# chkconfig nfs on
# vi /etc/sysconfig/nfs
------------------------------------------------------
RQUOTAD_PORT=875
LOCKD_TCPPORT=32803
LOCKD_UDPPORT=32769
MOUNTD_PORT=892
STATD_PORT=662
STATD_OUTGOING_PORT=2020
------------------------------------------------------
# iptables -I INPUT -p udp --dport 111 -j ACCEPT
# iptables -I INPUT -p tcp --dport 111 -j ACCEPT
# iptables -I INPUT -p tcp --dport 2049 -j ACCEPT
# iptables -I INPUT -p tcp --dport 32803 -j ACCEPT
# iptables -I INPUT -p udp --dport 32769 -j ACCEPT
# iptables -I INPUT -p udp --dport 892 -j ACCEPT
# iptables -I INPUT -p tcp --dport 892 -j ACCEPT
# iptables -I INPUT -p tcp --dport 875 -j ACCEPT
# iptables -I INPUT -p udp --dport 875 -j ACCEPT
# iptables -I INPUT -p udp --dport 662 -j ACCEPT
# iptables -I INPUT -p tcp --dport 662 -j ACCEPT
# /etc/init.d/iptables save
# /usr/lib64/cloud/common/scripts/storage/secondary/cloud-install-sys-tmplt -m /export/secondary -u
http://download.cloud.com/templates/acton/acton-systemvm-02062012.qcow2.bz2 -h kvm
# yum install cloud-agent
# vi /etc/libvirt/libvirtd.conf
------------------------------------------------------
listen_tls = 0
listen_tcp = 1
tcp_port = "16509"
mdns_adv = 0
auth_tcp = "none"
------------------------------------------------------
# vi /etc/sysconfig/libvirtd
------------------------------------------------------
LIBVIRTD_ARGS="--listen"
------------------------------------------------------
# vi /etc/libvirt/qemu.conf
------------------------------------------------------
vnc_listen = "0.0.0.0"
------------------------------------------------------
# /etc/init.d/libvirtd restart
# chkconfig libvirtd on
# iptables -I INPUT -p tcp -m tcp --dport 22 -j ACCEPT
# iptables -I INPUT -p tcp -m tcp --dport 1798 -j ACCEPT
# iptables -I INPUT -p tcp -m tcp --dport 16509 -j ACCEPT
# iptables -I INPUT -p tcp -m tcp --dport 5900:6100 -j ACCEPT
# iptables -I INPUT -p tcp -m tcp --dport 49152:49216 -j ACCEPT
# iptables -I INPUT -s 10.48.100.152 -j ACCEPT
# /etc/init.d/iptables save
# chmod 777 /var/log/cloud/management/catalina.out
# /etc/init.d/cloud-management restart
# /etc/init.d/cloud-agent restart
# reboot
# 別のPCからhttp://10.48.100.152:8080/client/にアクセスして
ウィザードに従って構築する
secstorage.allowed.internal.sitesを0.0.0.0/0にする
hostを10.48.100.152にする
内部DNSを127.0.0.1にする