Installing The Galera-Iworx Cluster - Page 2

Configure MySQL

We are ready to go a step further and start with the configuration of MySQL.

First inititate MySQL for the first run:

mkdir /var/log/mysql
chown -R mysql:mysql /var/log/mysql

Now we can start mysql for the first time:

chkconfig mysqld on && service mysqld start


Create a MySQL restore set

To make it later on possible to install configure Interworx without messing up the Galera installation we have to copy some file to a secure location (on all nodes):

service mysqld stop
mkdir /tmp/interworx /tmp/interworx/etc/
cp /etc/my.cnf /tmp/interworx/etc/my.cnf
mkdir /tmp/interworx/etc/init.d
cp /etc/init.d/mysqld /tmp/interworx/etc/init.d/mysqld
mkdir /tmp/interworx/usr /tmp/interworx/usr/bin
cp /usr/bin/mysqld_safe /tmp/interworx/usr/bin/mysqld_safe
mkdir /tmp/interworx/usr/libexec
cp /usr/libexec/mysqld /tmp/interworx/usr/libexec/mysqld
mkdir /tmp/interworx/var/ /tmp/interworx/var/lib
cp -r /var/lib/mysql /tmp/interworx/var/lib



To configure the Galera Cluster we go to the website. We picked the following settings, but change according to your requirements:

Vendor:                      Codership (based on MySQL 5.5)
Infrastructure:              Other
Operating  System:           RHEL6 - Redhat 6.3/Fedora/Centos 6.3/OLN 6.3/Amazon AMI Platform:Linux  64-bit (x86_64)
Number of Galera  Servers:   3+1
MySQL PortNumber:            3333    (haproxy, interworx on 3306)
Galera PortNumber:           4567
Galera SST  PortNumber:      4444
SSH PortNumber:              22
OS User:                     root
MySQL Server  password:      pw4mydatabase
CMON DB password:            pw4myCMON
Firewall  (IPTables):        Disable
System Memory:               16 Gb
WAN:                         no
Skip DNS Resolve:            no
Database Size:               < 8GB
MySQL Usage:                 High write/High read
Number of cores:             16
Max connections per  server: 1500
Innodb_buffer_pool_size:     11319
Innodb_file_per_tabel: 	  yes
ClusterControl  Server:
Apache user:                 apache
WWWROOT:                     /var/www/html/
Config  directory:           /etc/
Server-ID 1:       
Datadir:                     /var/lib/mysql 
Server-ID 2:       
Server-ID  3:      
Email address:               [email protected]

Click on Generate Deployment Scripts and retrieve them from your mailbox shortly after.


Install Galera Cluster

Now we are ready to install the Galera cluster software

cd /usr/local/src/
tar xvfz s9s-galera-2.2.0-rpm.tar.gz
cd s9s-galera-2.2.0-rpm/mysql/scripts/install

Before running the installer change the following:

echo "local_mysql_port=3333" >> ../../config/cmon.cnf.agent
echo "local_mysql_port=3333" >> ../../config/cmon.cnf.controller
echo "local_mysql_port=3333" >> ../../config/cmon_rrd.cnf

and add the bold line to the files ../../config/my.cnf and ../../config/my.cnf.cmon

Share this page:

0 Comment(s)