DBサーバ設定
・ 4.5.4.2. Installthe Database on a Separate Node
[root@db01 ~]# rpm -qa |grep mysql
mysql-server-5.1.61-4.el6.x86_64
mysql-libs-5.1.61-4.el6.x86_64
mysql-5.1.61-4.el6.x86_64
mysql-serverをインストール
[root@db01 ~]# vi /etc/my.cnf
しておくこと。
[mysqld]セクションに次の行を挿入します
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
innodb_rollback_on_timeout=1 ☆追加
innodb_lock_wait_timeout=600 ☆追加
max_connections=700 ☆追加 管理サーバ2台の場合は 700に
log-bin=mysql-bin ☆追加
binlog-format = 'ROW' ☆追加
bind-address = 0.0.0.0 ☆追加
1管理サーバあたり 350を目安
[root@db01 ~]# service mysqld restart
に
mysqld を停止中: [ OK ]
mysqld を起動中: [ OK ]
9.
DBサーバ設定
[root@db01 ~]# mysql_secure_installation
NOTE:RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
Change the root password? [Y/n] Y
Remove anonymous users? [Y/n] Y
Disallow root login remotely? [Y/n] n
Remove test database and access to it? [Y/n] Y
Reload privilege tables now? [Y/n] Y
... Success!
Cleaning up...
「Disallow root login remotely」
以外は全て「Y」で設定。
All done! If you've completed all of the above steps, your MySQL
• installation should now be secure.
Thanks for using MySQL!
10.
DB設定 ※ManagmenetServerから実施
[root@manager01 ~]# yum install mysql
切り分けのためmysql-client
(省略)
をインストールしておくと
Complete!
便利です。
データベースをセットアップします。
# cloud-setup-databases cloud:DBパスワード@DBサーバのIPアドレス --deploy-as=root:DBサーバの
パスワード
※必要に応じて、-e <encryption_type> -m <management_server_key> -k <database_key>を付けて
セキュリティ設定を行いましょう。
ManagmenetServerインストール
(省略)
Applying /usr/share/cloud/setup/bridge/db/cloudbridge_offering.sql [ OK ]
Applying /usr/share/cloud/setup/bridge/db/cloudbridge_offering_alter.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