二、软件安装:
(一)管理节点MGM
配置管理节点
首先在合适的位置,创建一个管理节点的配置文件,步骤如下:
[root@localhost ~]# mkdir /var/lib/mysql-cluster
[root@localhost ~]# cd /var/lib/mysql-cluster
[root@localhost mysql-cluster]# vi config.ini
[root@localhost ~]# cd /var/lib/mysql-cluster
[root@localhost mysql-cluster]# vi config.ini
配置文件config.ini内容如下:
[ndbd default]
NoOfReplicas=2
DataMemory=80M
IndexMemory=18M
[tcp default]
portnumber=2202
[ndb_mgmd]
hostname=192.168.20.231
datadir=/var/lib/mysql-cluster
[ndbd]
hostname=192.168.20.232
datadir=/usr/local/mysql/data
[ndbd]
hostname=192.168.20.233
datadir=/usr/local/mysql/data
[mysqld]
hostname=192.168.20.234
[mysqld]
hostname=192.168.20.235
NoOfReplicas=2
DataMemory=80M
IndexMemory=18M
[tcp default]
portnumber=2202
[ndb_mgmd]
hostname=192.168.20.231
datadir=/var/lib/mysql-cluster
[ndbd]
hostname=192.168.20.232
datadir=/usr/local/mysql/data
[ndbd]
hostname=192.168.20.233
datadir=/usr/local/mysql/data
[mysqld]
hostname=192.168.20.234
[mysqld]
hostname=192.168.20.235