硬件配置
普通PC server * 2 (最小集群環境需要4台服務器)
模擬環境
red hat Linux9 for x86 (or red hat AS 2以上版本),glibc-2.2, static, gcc
MySQL版本4.1.12 binares
MySQL-max binary版本目前只支持Linux、max os x和solaris
本方案不涉及從源代碼編譯安裝
主機 IP地址 用途
ndb1_mgmd_sqld 1192.168.1.100 Ndb node1+mgmd node1+sqld node1
ndb2_sqld2 192.168.1.200 Ndb node2+sqld node2
Mgmd:management server
sqld:mySQL Server
ndb:storaged node (share-nothing,base in memory)
安裝
從http://dev.mysql.com/downloads/MySQL/4.1.Html下載MySQL-max-4.1.12-pc-Linux-gnu-i686.tar.gz到/var/tmp
Storage and SQL Node Installation
在兩台主機上執行如下過程
shell>groupadd MySQL
shell>useradd -g mysql MySQL
shell>tar zxfv MySQL-max-4.1.12-pc-Linux-gnu-i686.tar.gz
shell>cp -vr mysql-max-4.1.12-pc-Linux-gnu-i686 /usr/local/MySQL-max-4.1.12-pc-Linux-gnu-i686
shell>cd /usr/local
shell>ln -s mysql-max-4.1.12-pc-Linux-gnu-i686 MySQL
shell>cd mysql;scripts/mysql_install_db –user=MySQL
shell>chown -R root .;chown -R mysql data;chgrp -R MySQL .
shell>cp support-files/MySQL.server /etc/rc.d/init.d/
shell>chmod +x /etc/rc.d/init.d/MySQL.server
shell>chkconfig --add MySQL.server