文黑网_logo   设为首页   |  加入收藏夹
  提供最新的毕业论文免费下载,本站收录了大量优秀的简历模板、解决方案、案例课件、演示文稿、报告总结、范文范例、模版样本、企划方案等文档免费下载
首页

LINUX集群部署

文档格式: Adobe Acrobat PDF文档
文档大小:418.37k
引用网址:http://www.wenhei.com/docment/851093
 



LINUX集群部署






























邱波
2005-6-24








第一部部分 公共部分
一 系统环境
1 Linux OS
系统版本 RHEL AS3 UPDATES 4
安装方式 最小安装
系统内核 2.4.21-27.0.4
二 服务组件
1 LVS套件
主机名 master slaver
服务包 piranha-0.7.10-2
ipvsadm-1.21-9
依赖包 httpd-2.0.46-46
php-4.3.2-23
curl-7.10.6-6
2 GFS套件
主机名 node01 node02 node03 node04 node05 node06 data01 data02
服务包 GFS
GFS-modules-smp
依赖包 perl-Net-Telnet-3.03-1.1
3 MySQL CLUSTER 套件
主机名 master slaver node01 node02 node03 node04 node05 node06 data01 data02
服务包 MySQL-bench-4.1.12-0
MySQL-ndb-management-4.1.12-0
MySQL-server-4.1.12-0
MySQL-client-4.1.12-0
MySQL-embedded-4.1.12-0
MySQL-ndb-extra-4.1.12-0
MySQL-ndb-storage-4.1.12-0
MySQL-shared-4.1.12-0
MySQL-devel-4.1.12-0
MySQL-Max-4.1.12-0
MySQL-ndb-tools-4.1.12-0
依赖包 perl-DBI-1.32-9
4 WWW套件
主机名 node01 node02 node03 node04 node05 node06
服务包 httpd-2.0.46-46
php-4.3.2-23
php-mysql-4.3.2-23
依赖包 curl-7.10.6-6
三 基本配置
1 主机名 master slaver node01 node02 node03 node04 node05 node06 data01 data02
2 配置文件 /etc/hosts
3 脚本内容
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
192.168.70.1 node01
192.168.70.2 node02
192.168.70.3 node03
192.168.70.4 node04
192.168.70.5 node05
192.168.70.6 node06
192.168.70.100 data01
192.168.70.200 data02
192.168.70.254 master
192.168.70.253 slaver






























1'F… /96/LQX[9LUWXDO6HUYHU BóEQ>5L 5x
/96/LQX[9LUWXDO6HUYHU VE~
X
V
bS*ü o,XAEu,X + *ü~V5%0 DBg/ c 9A¨¨/LQX[<. AE
u<~/96 5xL " AEu<~_r ¨A *üS*ü,X k-/96C^+<
,X AEu<,X5xL ~
/965xL 7 ~1 + G!5B, ,X/LQX[< 5xL ,
~FOXVWHUPHPEHUV 4 ~E o< '/96C^+<~/96URXWHU ¨W*ü9^
97 f6(5%,XA "E@5xL ~1' .,órAEu<~UHDOVHUYHUV ,X<
5xL ~
T(MU
P ^*ü 5xL ~+LJKDYDLODELOLW\FOXVWHULQJ S*ü 55xL ~/RDGEDODQFHFOXVWHULQJ S*ü(M!^,XE C^T94 4 AEu<
G!ˇu~
/96 A×z1k
~) A×z
^! NMA " NNcü,ó!7AEu<~) #~
t~) A×z
! NMA " NNcü,ó!7AEu<~) #¨4 6 oEW ,XAEu< #EW ,X0 ~
t E y"'~T Ax
6 o, !¤oe EW #C E y,XAEu< #EW ,XA "~
b,X E yA×z
, ,3, !¤oe EW #C E y,XAEu< #EW ,XA "~
oe AEA×z,X b,X E yA×z
, ,3, !¤oe EW #C E y,XAEu< , , ,394 ,ó!7AEu< , $d,394 ,ó!7AEu /96L 5x~
/96 0
/965xL ,XF…
SXOVH
E |'/96C^+ SXOVHA×*ü ü#C /96C^+ ~LSYVDGP
A AEuE Y,X,396C^+> ü#C /96C^+< ,X\xE / ~
'G!5B /96
3LUDQKDG!5B KA'5B
SLUDQKDSDVVZG
|3LUDQKDG!5B KAEu
VHUYLFHSLUDQKDJXLVWDUW
L$ 3LUDQKDG!5B K,XS*ü
HWFV\VFRQILJKDZHEVHFXUHKWDFFHVV
2UGHUGHQ\DOORZ
Deny from all
Allow from 127.0.0.1
4启用分组转发
/etc/sysctl.conf 中的 net.ipv4.ip_forward = 0 这一行改为:
net.ipv4.ip_forward = 1
5 分配防火墙标记
iptables -t mangle -A PREROUTING -p tcp -d n.n.n.n/32 --dport 80 -j MARK --set-mark 80
三 Piranha 配置工具
1 登陆 打开 http://localhost:3636
2 GLOBAL SETTINGS
Primary server public IP
主 LVS 节点的可公开选路的真正IP地址
Primary server private IP
主 LVS 节点上的另一个网络接口的真正 IP 地址
NAT Router IP
浮动 IP 地址
NAT Router netmask
子网掩码
NAT Router device
浮动 IP 地址的网络接口的设备名称
3 REDUNDANCY 备份 LVS 路由器节点
Redundant server public IP
备份 LVS 路由器节点的公共真正 IP 地址.
Redundant server private IP
备份节点的专用真正 IP 地址.
Heartbeat Interval (seconds)
设置为心跳之间的时间
Assume dead after (seconds)
备份 LVS 路由器节点失效转移的时间.
Heartbeat runs on port
主 LVS 节点的心跳通信端口
4 VIRTUAL SERVERS
Name虚拟服务器名称.
Application port
监听端口号
Protocol
UDP 或 TCP
Virtual IP Address
虚拟服务器的浮动 IP 地址.
Virtual IP Network Mask
虚拟服务器子网掩码.
Firewall Mark
防火墙标记
Device
浮动 IP 地址绑定的网络设备
Re-entry Time
失效重新加载真正服务器的时间
Service Timeout
失效剔除真正服务器的时间
Quiesce server
防止了新服务器在进入群集的大量连接
Load monitoring tool
监视各个真正服务器的载量
Scheduling
调度算式
Persistence
连接超时前所允许经过的不活跃期间的秒数
Persistence Network Mask
限制某个特定子网的持续性的子网掩码.
5 REAL SERVER
Name
真正服务器
Address
真正服务器的 IP
Weight
主机权值
6同步配置文件
scp /etc/sysconfig/ha/lvs.cf n.n.n.n:/etc/sysconfig/ha/lvs.cf
scp /etc/sysconfig/iptables n.n.n.n:/etc/sysconfig/
四 LVS部署
1 路由转发
vi /etc/sysctl.conf
net.ipv4.ip_forward = 1
sysctl 0p
2 iptables标记
iptables -t mangle -A PREROUTING -p tcp -d 211.144.137.131/32 --dport 80 -j MARK --set-mark 81
iptables -t mangle -A PREROUTING -p tcp -d 211.144.137.232/32 --dport 80 -j MARK --set-mark 82
iptables -t mangle -A PREROUTING -p tcp -d 211.144.137.233/32 --dport 80 -j MARK --set-mark 83
iptables -t mangle -A PREROUTING -p tcp -d 211.144.137.234/32 --dport 80 -j MARK --set-mark 84
iptables -t mangle -A PREROUTING -p tcp -d 211.144.137.235/32 --dport 80 -j MARK --set-mark 85
3 配置 lvs.cf
serial_no = 40
primary = 211.144.137.130
primary_private = 211.144.137.130
service = lvs
backup_active = 0
backup = 0.0.0.0
heartbeat = 1
heartbeat_port = 539
keepalive = 6
deadtime = 18
network = nat
nat_router = 192.168.70.254 eth1
debug_level = NONE
virtual [server_coolh] {
active = 1
address = 211.144.137.131 eth0:1
vip_nmask = 255.255.255.224
fwmark = 81
port = 80
send = "GET / HTTP/1.0\r\n\r\n"
expect = "HTTP"
use_regex = 0
load_monitor = none
scheduler = wlc
protocol = tcp
timeout = 12
reentry = 30
quiesce_server = 0
server [node01] {
address = 192.168.70.11
active = 1
weight = 1
}
server [node02] {
address = 192.168.70.21
active = 1
weight = 1
}
server [node03] {
address = 192.168.70.31
active = 1
weight = 1
}
server [node04] {
address = 192.168.70.41
active = 1
weight = 1
}
server [node05] {
address = 192.168.70.51
active = 1
weight = 1
}
server [node06] {
address = 192.168.70.61
active = 1
weight = 1
}
}
virtual [server_ccg] {
active = 1
address = 211.144.137.132 eth0:2
vip_nmask = 255.255.255.224
fwmark = 82
port = 80
send = "GET / HTTP/1.0\r\n\r\n"
expect = "HTTP"
use_regex = 0
load_monitor = none
scheduler = wlc
protocol = tcp
timeout = 12
reentry = 30
quiesce_server = 0
server [node01] {
address = 192.168.70.12
active = 1
weight = 1
}
server [node02] {
address = 192.168.70.22
active = 1
weight = 1
}
server [node03] {
address = 192.168.70.32
active = 1
weight = 1
}
server [node04] {
address = 192.168.70.42
active = 1
weight = 1
}
server [node05] {
address = 192.168.70.52
active = 1
weight = 1
}
server [node06] {
address = 192.168.70.62
active = 1
weight = 1
}
}
virtual [server_bbs] {
active = 1
address = 211.144.137.133 eth0:3
vip_nmask = 255.255.255.224
fwmark = 83
port = 80
send = "GET / HTTP/1.0\r\n\r\n"
expect = "HTTP"
use_regex = 0
load_monitor = none
scheduler = wlc
protocol = tcp
timeout = 12
reentry = 30
quiesce_server = 0
server [node01] {
address = 192.168.70.13
active = 1
weight = 1
}
server [node02] {
address = 192.168.70.23
active = 1
weight = 1
}
server [node03] {
address = 192.168.70.33
active = 1
weight = 1
}
server [node04] {
address = 192.168.70.43
active = 1
weight = 1
}
server [node05] {
address = 192.168.70.53
active = 1
weight = 1
}
server [node06] {
address = 192.168.70.63
active = 1
weight = 1
}
}
virtual [server_download] {
active = 1
address = 211.144.137.134 eth0:4
vip_nmask = 255.255.255.224
fwmark = 84
port = 80
send = "GET / HTTP/1.0\r\n\r\n"
expect = "HTTP"
use_regex = 0
load_monitor = none
scheduler = wlc
protocol = tcp
timeout = 12
reentry = 30
quiesce_server = 0
server [node01] {
address = 192.168.70.14
active = 1
weight = 1
}
server [node02] {
address = 192.168.70.24
active = 1
weight = 1
}
server [node03] {
address = 192.168.70.34
active = 1
weight = 1
}
server [node04] {
address = 192.168.70.44
active = 1
weight = 1
}
server [node05] {
address = 192.168.70.54
active = 1
weight = 1
}
server [node06] {
address = 192.168.70.64
active = 1
weight = 1
}
}
virtual [server_wlife] {
active = 1
address = 211.144.137.135 eth0:5
vip_nmask = 255.255.255.224
fwmark = 85
port = 80
send = "GET / HTTP/1.0\r\n\r\n"
expect = "HTTP"
use_regex = 0
load_monitor = none
scheduler = wlc
protocol = tcp
timeout = 12
reentry = 30
quiesce_server = 0
server [node01] {
address = 192.168.70.15
active = 1
weight = 1
}
server [node02] {
address = 192.168.70.25
active = 1
weight = 1
}
server [node03] {
address = 192.168.70.35
active = 1
weight = 1
}
server [node04] {
address = 192.168.70.45
active = 1
weight = 1
}
server [node05] {
address = 192.168.70.55
active = 1
weight = 1
}
server [node06] {
address = 192.168.70.65
active = 1
weight = 1
}
}
4 启动 lvs 服务
lvs
5 状态查看
ipvsadm
























1 F… *)6*)6*OREDO)LOH6\VWHP DB,|
*)6 VE~
,|¨V
*)6ZLWKD6$1
*)6DQG*1%'ZLWKD6$1
*)6DQG*1%'ZLWK'LUHFW$WWDFKHG6WRUDJH
'*)6 2ˇ4 ) W U2
2ˇ4 L "
5HG+DW(QWHUSULVH/LQX[$6(6RU:69HUVLRQ8SGDWHRU ¨P
LD[[603VXSSRUWHG
RAM 最低256M
2 网络需求
所有GFS节点必须接入TCP/IP网络,以便于支持GFS集群和lockgulm系统
3 设备支持
HBA (Host Bus Adapter)
Fibre Channel switch
FC RAID array or JBOD
Size 最大2 TB
三 GFS安装
1 软件需求
perl-Net-Telnet Module
时间同步软件
Stunnel
2 GFS组件
GFS
GFS-modules-smp
3 模块加载
depmod 0a #在RPM安装后运行
modprobe pool #盘区池模块
modprobe lock_gulm # lock_gulm系统
modprobe gfs #GFS模块
lsmod #检查加载
四 POOL的操作
1 创建
pool_tool -c [ConfigFile]
poolname name
minor number
subpools number
subpool id stripe devices [type]
pooldevice subpool id device
2 激活
pool_assemble 0a [poolname] # Activating
pool_assemble 0r [poolname] # Deactivating
3 显示
pool_tool -p [pool]
4 更新配置
pool_tool -g [NewConfigFile]
5 删除
pool_tool -e [PoolName]
6 改名
pool_tool -r [PoolName] [NewPoolName]
7 镜像
pool_tool -m [Number] [PoolName]
8 显示信息
pool_info -v [PoolName]
9设备检索
pool_info -s [PoolName]
10 多路
pool_mp -m {none | failover | n} [PoolName]
五 GFS集群系统配置文件
1 cluster.ccs配置文件
cluster {
name = "集群名"
lock_gulm {
servers = ["节点名",..., "节点名"]
heartbeat_rate = 心跳时间 <-- 选项
allowed_misses = 允许失效数 <-- 选项
}
}
2 fence.ccs配置文件 fence_devices, fence_gnbd
fence_devices{
DeviceName {
agent = "fence_gnbd"
server = "ServerName"
.
.
server = "ServerName"
}
DeviceName {
.
.
}
}
3 nodes.ccs配置文件GNBD Fencing Device Named gnbd
fence_devices {
gnbd {
agent = "fence_gnbd"
server = "nodea"
server = "nodeb"
}
}
六 集群系统配置
1 创建
ccs_tool create [Directory] [CCADevice]
2 运行
ccsd -d [CCADevice]
3 导出
ccs_tool extract [CCADevice] [Directory]
4 显示
ccs_tool list [CCADevice]
5 比较
ccs_tool diff [CCADevice] [Directory]
七 GFS集群锁定系统
1 模式
LOCK_GULM RLM and SLM 集群模式
LOCK_NOLOCK 单用户模式
2 启动
lock_gulmd #没有参数
3 停止
gulm_tool shutdown [IPAddress]
八 GFS操作
1 格式化
gfs_mkfs -p [LockProtoName] -t [LockTableName] -j [Number] [BlockDevice]
2 挂载
mount -t gfs [BlockDevice] [MountPoint]
3 卸载
umount [MountPoint]
4 配额
gfs_quota limit -u [User] -l [Size] -f [MountPoint]
gfs_quota limit -u [Group] -l [Size] -f [MountPoint]
gfs_quota warn -u [User] -l [Size] -f [MountPoint]
gfs_quota warn -g [Group] -l [Size] -f [MountPoint]
5 显示
gfs_quota get -u [User] -f [MountPoint]
gfs_quota get -g [Group] -f [MountPoint]
gfs_quota list -f [MountPoint]
6 同步
gfs_quota sync -f [MountPoint]
gfs_tool settune [MountPoint] quota_quantum [Seconds]
7 配额开关
gfs_tool settune [MountPoin]t quota_enforce {0|1}
8 更新
gfs_grow [Options] {MountPoint | Device} [MountPoint | Device]
9 增加加载点数量
gfs_jadd -j [Number] [MountPoint]
10 I/O标记
gfs_tool setflag inherit_directio [Directory]
gfs_tool clearflag inherit_jdata [Directory]
gfs_tool setflag jdata [File]
gfs_tool clearflag jdata [File]
11 更新选项
ctime ― 最后改变时间状态
mtime ― 最后调整文件或目录时间
atime ― 最后访问文件或目录时间
notime ― 没有时间选项
12 设置noatime
mount -t gfs [BlockDevice] [MountPoin]t -o noatime
13 显示状态
gfs_tool gettune [MountPoint]
14 设置atime
gfs_tool settune [MountPoint] atime_quantum [Seconds]
15 动态挂起
gfs_tool freeze [MountPoint]
gfs_tool unfreeze [MountPoint]
16 容量大小
gfs_tool counters [MountPoint]
gfs_tool df [MountPoint]
gfs_tool stat [File]
18 修复
gfs_fsck -y [BlockDevice]
19 连接
ln -s [Target] [LinkName]
ln -s [Variable] [LinkName]
九 Fencing 系统
1 工作方式
Removal ― 从存储器中移除GFS节点
Recovery ― GFS节点安全恢复与存储器的连接
2 模块列表
Fending Method Fencing Agent
APC Network Power Switch fence_apc
WTI Network Power Switch fence_wti
Brocade FC Switch fence_brocade
McData FC Switch fence_mcdata
Vixel FC Switch fence_vixel
HP RILOE fence_rib
GNBD fence_gnbd
xCAT fence_xcat
Fending Method Fencing Agent
Manual fence_manual
十 GNBD (Global Network Block Device)
1 模块
gnbd.o ― 在终端上GNBD设备工具,被用作在节点
gnbd_serv.o ― 在服务端上GNBD设备工具,被用作存储设备
2 GNBD服务端
gnbd_export -d [PathName] -e [GnbdName]
3 GNBD 终端
gnbd_import -i [Server]
十一 init.d控制
1 配置文件
/etc/sysconfig/gfs
2 启动
service pool start
service ccsd start
service lock_gulmd start #节点同步启动
service gfs start #设置/etc/fstab
3 停止
service gfs stop
service lock_gulmd stop
service ccsd stop
service pool stop
十二 GFS部署
1 系统版本
RHEL AS3 Updates 4
2 内核版本
kernel-smp-2.4.21-27.0.4.EL.i686
3 GFS版本
GFS-6.0.2-26.i686
GFS-modules-smp-6.0.2-26.i686
4 组件
perl-Net-Telnet-3.03-1.1.el3.dag.noarch
5 GFS集群方式
LOCK_GULM, RLM Embedded, and GNBD
6 拓扑结构图(GFS部分)
AEu 1
( 0*0 1u) 'G!5BJW8V& ,X,Xˇu¨ NOü 8V& !|
|QGEBPJPG
DB8V& ~'%
ˇu,| 0\64/&/867(5 ,XDB¨
( ü P\VTOG |!|A AEu
|QGEG
64/ 8V& ~$3,
ˇu64/ E yh*ü¨E E 1'%&/867(5 ,| E yDB8V&
( |
|P\VTOG
二 基本配置
1 数据节点和SQL节点
vi /etc/my.cnf
[MYSQLD]
ndbcluster
ndb-connectstring=n.n.n.n # 管理节点 IP
[MYSQL_CLUSTER]
ndb-connectstring=n.n.n.n # 管理节点 IP
2 管理节点
vi /etc/config.ini
[NDBD DEFAULT]
NoOfReplicas=2
DataMemory=80M
IndexMemory=52M
[TCP DEFAULT]
portnumber=PORT #端口
[NDB_MGMD]
hostname=MGM #管理节点
[NDBD]
hostname=DBA #存储节点
[NDBD]
hostname=DBB #存储节点
[MYSQLD]
hostname=SQL #SQL节点
三 定义MySQL CLUSTER
1 管理节点
[NDB_MGMD]Id
1到63之间
[NDB_MGMD]ExecuteOnComputer
主机名
[NDB_MGMD]PortNumber
监听端口
[NDB_MGMD]LogDestination
日志类型: CONSOLE, SYSLOG, and FILE:
[NDB_MGMD]ArbitrationRank
仲裁节点
[NDB_MGMD]ArbitrationDelay
0 一般没必要改变
[NDB_MGMD]DataDir
日志目录
2 数据节点
[NBDB]Id
整数 代替主机名
[NDBD]ExecuteOnComputer
主机名
[NDBD]HostName
自定义主机名
[NDBD]ServerPort
监听端口
[NDBD]NoOfReplicas
拷贝数
默认2 最大4
[NDBD]DataDir
日志目录
[NDBD]FileSystemPath
数据和UNDOLOG目录
[NDBD]BackupDataDir
备份目录
[NDBD]DataMemory
数据库容量
默认80MB 最小1MB 最大等于RAM
[NDBD]IndexMemory
索引容量
默认18MB 最小1MB
The default value for IndexMemory is 18MB. The minimum is 1MB.
[NDBD]MaxNoOfConcurrentTransactions
并发事物数
默认 4096
[NDBD]MaxNoOfConcurrentOperations
最大并发操作数
默认 32768
[NDBD]MaxNoOfLocalOperations
最大本地操作数
没有具体限定
[NDBD]MaxNoOfConcurrentIndexOperations
最大索引并发操作数
默认 8192
[NDBD]MaxNoOfFiredTriggers
最大触发数
默认4000
[NDBD]TransactionBufferMemory
事物缓存存储器
默认1MB
[NDBD]MaxNoOfConcurrentScans
最大并发检索数
默认256最大500
[NDBD]MaxNoOfLocalScans
最大本地检索数
[NDBD]BatchSizePerLocalScan
本地检索批量
默认64
[NDBD]LongMessageBuffer
消息缓存器
默认1MB
[NDBD]NoOfFragmentLogFiles
REDO log 片段数
默认8
[NDBD]MaxNoOfSavedMessages
最大被保存消息数
默认25
[NDBD]MaxNoOfAttributes
最大属性数
默认1000
[NDBD]MaxNoOfTables
最大所有表数
默认128 最小8 最大1600
[NDBD]MaxNoOfOrderedIndexes
最大请求索引数
默认128
[NDBD]MaxNoOfUniqueHashIndexes
最大独立索引数
默认64
[NDBD]MaxNoOfTriggers
最大触发数
默认 768
[NDBD]MaxNoOfIndexes
最大索引数
默认128
[NDBD]LockPagesInMainMemory
锁定内存中进程
默认 0
[NDBD]StopOnError
错误停止
默认 1
[NDBD]Diskless
无盘
默认 0
[NDBD]RestartOnErrorInsert
查入错误重起
默认 0
[NDBD]TimeBetweenWatchDogCheck
间隔检测时间
默认 4000 毫秒
[NDBD]StartPartialTimeout
启动间隔时间
默认30000毫秒
[NDBD]StartPartitionedTimeout
启动间隔后时间
默认 60000毫秒
[NDBD]StartFailureTimeout
启动失败时间
默认 60000毫秒
[NDBD]HeartbeatIntervalDbDb
心跳间隔 DB节点
默认1500毫秒
[NDBD]HeartbeatIntervalDbApi
心跳间隔 SQL节点
默认1500毫秒
[NDBD]TimeBetweenLocalCheckpoints
本地检测点间隔时间
默认20 最大 31
[NDBD]TimeBetweenGlobalCheckpoints
全局检测点间隔时间
默认 2000毫秒
[NDBD]TimeBetweenInactiveTransactionAbortCheck
检测不活跃事物退出间隔
默认1000毫秒
[NDBD]TransactionInactiveTimeout
不活跃事物超时时间
默认 0
[NDBD]TransactionDeadlockDetectionTimeout
事物锁死侦测超时时间
默认 1200毫秒
[NDBD]NoOfDiskPagesToDiskAfterRestartTUP
默认 40
[NDBD]NoOfDiskPagesToDiskAfterRestartACC
默认 20
[NDBD]NoOfDiskPagesToDiskDuringRestartTUP
默认 40
[NDBD]NoOfDiskPagesToDiskDuringRestartACC
默认 20
[NDBD]ArbitrationTimeout
默认 1000毫秒
[NDBD]UndoIndexBuffer
默认 2M 最小1M
[NDBD]UndoDataBuffer
默认 16M 最小1M
[NDBD]RedoBuffer
默认 8M 最小1M
[NDBD]LogLevelStartup
默认 1
[NDBD]LogLevelShutdown
默认 0
[NDBD]LogLevelStatistic
默认 0
[NDBD]LogLevelCheckpoint
默认 0
[NDBD]LogLevelNodeRestart
默认 0
[NDBD]LogLevelConnection
默认 0
[NDBD]LogLevelError
默认 0
[NDBD]LogLevelInfo
默认0
[NDBD]BackupDataBufferSize
默认 2M
[NDBD]BackupLogBufferSize
默认2M
[NDBD]BackupMemory
默认4M
[NDBD]BackupWriteSize
默认32K
3 SQL节点
[MYSQLD]Id
1 到 63
[MYSQLD]ExecuteOnComputer
hostname
[MYSQLD]ArbitrationRank
默认0
[MYSQLD]ArbitrationDelay
默认 0
[MYSQLD]BatchByteSize
默认 32K
[MYSQLD]BatchSize
默认64
最大992
[MYSQLD]MaxScanBatchSize
默认256K
最大16M
四 MySQL Cluster部署
1配置文件
MGM
my.cnf
[ndb_mgm]
connect-string=master
[ndb_mgmd]
config-file=/etc/config.ini
config.ini
[ndbd default]
NoOfReplicas= 2
MaxNoOfConcurrentOperations= 500000
MaxNoOfLocalOperations= 100000
MaxNoOfTables= 1600
MaxNoOfAttributes= 5000
MaxNoOfConcurrentIndexOperations= 100000
MaxNoOfFiredTriggers= 100000
DataMemory= 1024M
IndexMemory= 512M
TimeBetweenWatchDogCheck= 30000
DataDir= /var/lib/mysql-cluster
MaxNoOfOrderedIndexes= 1024

[ndb_mgmd default]
DataDir= /var/lib/mysql-cluster

[ndb_mgmd]
Id=1
HostName= master

[ndbd]
Id= 2
HostName= data01

[ndbd]
Id= 3
HostName= data02

[mysqld]
Id= 4

[mysqld]
Id= 5

[mysqld]
Id= 6

[mysqld]
Id= 7

[mysqld]
Id= 8

[mysqld]
Id= 9
[tcp default]
PortNumber= 63132
NDB
[mysqld]
ndbcluster
ndb-connectstring=master
[mysql_cluster]
ndb-connectstring=master
SQL
[mysqld]
ndbcluster
ndb-connectstring = master
default_table_type = NDBCLUSTER
[mysql_cluster]
ndb-connectstring = master
2 启动
MGM
mdb_mgmd
NDB
ndbd
SQL
service mysql start
3 状态
ndb_mgm> show
Connected to Management Server at: master:1186
Cluster Configuration
---------------------
[ndbd(NDB)] 2 node(s)
id=2 @192.168.70.100 (Version: 4.1.12, Nodegroup: 0)
id=3 @192.168.70.200 (Version: 4.1.12, Nodegroup: 0, Master)

[ndb_mgmd(MGM)] 1 node(s)
id=1 @192.168.70.254 (Version: 4.1.12)

[mysqld(API)] 6 node(s)
id=4 @192.168.70.1 (Version: 4.1.12)
id=5 @192.168.70.3 (Version: 4.1.12)
id=6 @192.168.70.5 (Version: 4.1.12)
id=7 @192.168.70.2 (Version: 4.1.12)
id=8 @192.168.70.6 (Version: 4.1.12)
id=9 @192.168.70.4 (Version: 4.1.12)
4 关闭
ndb_mgm --shutdow


































第五部分 集群优化和其它组件
一 网络
二 APACHE
三 PHP
四 MYSQL
五 NTP
六 LINUX
七 备份
八 安全
九 aws apache日志分析

关键字:
 
下载提示:
·如果您发现该文档不能下载,请通知管理员
·所有文档均为网友上传,仅供学习参考,用作其它用途时请征得相关权益人许可.
·提供文档下载、论文下载、Word文档、Excel表格、PDF文档、PowerPointPPT演示文稿.
 
特别推荐
获取下载文档GO>>
 
推荐文档

软件工程基础教学大纲

东北大学2007年软件工程硕...

软件工程课程设计大纲

软件工程课程

软件工程专业课程教学改革...

软件工程课程设计要求软件...

Symbian手机软件工程师培训班

"无学位考生攻读软件工程...

软件工程系04年学生就业工...

软件工程实践者的研究方法

"2005年3月软件工程课程设计...

软件工程系教学管理制度

2005年攻读软件工程硕士专...

长春中联软件工程有限公司

软件工程课程设计任务书

 

 

 

热门关键字

 
本站所收录所有毕业论文、实习报告、开题报告、商业计划书、策划案例、工作总结等均属其个人行为,与本站立场无关.
文黑网只提供文档下载和共享平台,不对文档内容的正确性及相关内容所引发的后果负责.
Copyright ©2006-2008 文黑网(优秀的免费文档下载网站)wenHei.com . All rights reserved.