欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  数据库

MySQL Cluster 安装

程序员文章站 2022-05-30 18:47:05
...

下载软件包: [root@mysql1 paul]# wget http://cdn.mysql.com/Downloads/MySQL-Cluster-7.2/mysql-cluster-gpl-7.2.10.tar.gz 配

下载软件包:

[root@mysql1 paul]# wget

配置前的规划
管理节点IP: 172.1.2.10 节点ID: id=1 Management Node
NDB数据节点1: 172.1.2.9 节点ID: id=2 Data Node
NDB数据节点2: 172.1.2.8 节点ID: id=3 Data Node
mysql节点2: 172.1.2.7 节点ID: id=4 SQL Node

所有机器关闭防火墙:

[root@mysql1 mysql-cluster-gpl-7.2.10]# /etc/init.d/iptables stop
Flushing firewall rules: [ OK ]
Setting chains to policy ACCEPT: mangle filter [ OK ]
Unloading iptables modules: [ OK ]
You have new mail in /var/spool/mail/root
[root@mysql1 mysql-cluster-gpl-7.2.10]#

系统版本:

[root@mysql1 paul]# uname -a
Linux mysql1.qyer.com 2.6.18-308.el5.028stab099.3 #1 SMP Wed Mar 7 15:56:00 MSK 2012 x86_64 x86_64 x86_64 GNU/Linux
You have new mail in /var/spool/mail/root
[root@mysql1 paul]#

安装管理节点与其它节点安装是一样的

[root@mysql1 paul]# tar -zxvf mysql-cluster-gpl-7.2.10.tar.gz

[root@mysql1 paul]# cd mysql-cluster-gpl-7.2.10

[root@mysql1 mysql-cluster-gpl-7.2.10]# cmake -DCMAKE_INSTALL_PREFIX=/Data/apps/mysql-5.5.12 -DWITH_INNOBASE_STORAGE_ENGINE=ON -DWITH_MYISAM_STORAGE_ENGINE=1 -DEXTRA_CHARSETS=all -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci

出错:

CMake Error at storage/ndb/cmake/ndb_require_variable.cmake:24 (MESSAGE):
The variable JAVA_RUNTIME is required to build NDB
Call Stack (most recent call first):
storage/ndb/CMakeLists.txt:247 (NDB_REQUIRE_VARIABLE)

解决:

[root@mysql1 mysql-cluster-gpl-7.2.10]# yum install java

[root@mysql1 mysql-cluster-gpl-7.2.10]# rm CMakeCache.txt

[root@mysql1 mysql-cluster-gpl-7.2.10]# java -version
java version "1.6.0_24"
OpenJDK Runtime Environment (IcedTea6 1.11.8) (rhel-1.35.1.11.8.el5_9-x86_64)
OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)
[root@mysql1 mysql-cluster-gpl-7.2.10]#

又一个错:

– Looking for MySQL include file my_default.h – not found
– Java_VERSION:
– Java_VERSION_STRING:
– JAVA_RUNTIME: /usr/bin/java
– JAVA_COMPILE: JAVA_COMPILE-NOTFOUND
– JAVA_ARCHIVE: JAVA_ARCHIVE-NOTFOUND
CMake Error at storage/ndb/cmake/ndb_require_variable.cmake:24 (MESSAGE):
The variable JAVA_COMPILE is required to build NDB
Call Stack (most recent call first):
storage/ndb/CMakeLists.txt:248 (NDB_REQUIRE_VARIABLE)

尝试解决:

下载一个jre:

出错:[root@mysql1 paul]# rpm -ivh jre-7u15-linux-i586.rpm
Preparing… ########################################### [100%]
1:jre ########################################### [100%]
Unpacking JAR files…
rt.jar…
Error: Could not open input file: /usr/java/jre1.7.0_15/lib/rt.pack
jsse.jar…
Error: Could not open input file: /usr/java/jre1.7.0_15/lib/jsse.pack
charsets.jar…
Error: Could not open input file: /usr/java/jre1.7.0_15/lib/charsets.pack
localedata.jar…
Error: Could not open input file: /usr/java/jre1.7.0_15/lib/ext/localedata.pack
plugin.jar…
Error: Could not open input file: /usr/java/jre1.7.0_15/lib/plugin.pack
javaws.jar…
Error: Could not open input file: /usr/java/jre1.7.0_15/lib/javaws.pack
deploy.jar…
Error: Could not open input file: /usr/java/jre1.7.0_15/lib/deploy.pack
[root@mysql1 paul]#

尝试下载JDK

[root@mysql1 paul]# chmod +x jdk-6u13-linux-i586.bin

[root@mysql1 paul]# ./jdk-6u13-linux-i586.bin

[root@mysql1 paul]# mv jdk1.6.0_13 /usr/local/

[root@mysql1 paul]# cd /etc/profile.d/

[root@mysql1 profile.d]# vim java.sh

#set java environment
JAVA_HOME=/usr/local/jdk1.6.0_13
CLASSPATH=.:$JAVA_HOME/lib/tools.jar
PATH=$JAVA_HOME/bin:$PATH
export JAVA_HOME CLASSPATH PATH

[root@mysql1 profile.d]# source java.sh

[root@mysql1 profile.d]# java -version
java version "1.6.0_13"
Java(TM) SE Runtime Environment (build 1.6.0_13-b03)
Java HotSpot(TM) Server VM (build 11.3-b02, mixed mode)
[root@mysql1 profile.d]#

成功:

– Using gcc atomic builtins
– Looking for mach/mach_time.h
– Looking for mach/mach_time.h – not found
– Looking for srandomdev
– Looking for srandomdev – not found
– Looking for gethrvtime
– Looking for gethrvtime – not found
– Looking for memset
– Looking for memset – found
– Performing Test HAVE_FUNC_IN_CXX
– Performing Test HAVE_FUNC_IN_CXX – Success
– Performing Test HAVE_PEERCRED
– Performing Test HAVE_PEERCRED – Success
– Configuring done
– Generating done
– Build files have been written to: /home/paul/mysql-cluster-gpl-7.2.10
[root@mysql1 mysql-cluster-gpl-7.2.10]#

[root@mysql1 mysql-cluster-gpl-7.2.10]# make

[root@mysql1 mysql-cluster-gpl-7.2.10]# make install