Mysql实验群集
2009-05-13 04:57:26来源:未知 阅读 ()
普通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
shell>chkconfig –level 3 mysql.server off
Management Node Installation
在主机ndb1_mgmd_sqld1上执行如下过程
shell>cd /var/tmp
shell>tar -zxvf mysql-max-4.1.12a-pc-linux-gnu-i686.tar.gz /usr/local/bin '*/bin/ndb_mgm*'
Configuration
Configuring the Storage and SQL Nodes
在两台主机上执行如下过程:
shell>vi /etc/my.cnf
[MYSQLD] # Options for mysqld process:
ndbcluster # run NDB engine
ndb-connectstring=192.168.1.100 # location of MGM node
[MYSQL_CLUSTER] # Options for ndbd process:
ndb-connectstring=192.168.1.100 # location of MGM node
Configuring the Management Node
在主机ndb1_mgmd_sqld1上执行如下过程
shell>mkdir /var/lib/mysql-cluster
shell>cd /var/lib/mysql-cluster
shell>vi config.ini
[NDBD DEFAULT] # Options affecting ndbd processes on all data nodes:
NoOfReplicas=2 # Number of replicas
DataMemory=80M # How much memory to allocate for data storage
IndexMemory=52M # How much memory to allocate for index storage
# For DataMemory and IndexMemory, we have used the
# default values. Since the "world" database takes up
# only about 500KB, this should be more than enough for
标签:
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有
上一篇:Ports和Packages详解
下一篇:MySQL Cluster
- virtualbox for freeBSD 2009-05-13
- 安装'User manager for PureFTPd'无法建表? 2009-05-13
- Flash 9 for FreeBSD 7.1 2009-05-13
- [FreeBSD] 挂载Linux分区一成一败 2009-05-13
- Tips for Running Linux Binaries on FreeBSD 2009-05-13
IDC资讯: 主机资讯 注册资讯 托管资讯 vps资讯 网站建设
网站运营: 建站经验 策划盈利 搜索优化 网站推广 免费资源
网络编程: Asp.Net编程 Asp编程 Php编程 Xml编程 Access Mssql Mysql 其它
服务器技术: Web服务器 Ftp服务器 Mail服务器 Dns服务器 安全防护
软件技巧: 其它软件 Word Excel Powerpoint Ghost Vista QQ空间 QQ FlashGet 迅雷
网页制作: FrontPages Dreamweaver Javascript css photoshop fireworks Flash
