你的位置:首页 > 软件开发 > 数据库 > 『GreenPlum系列』GreenPlum 4节点集群安装(图文教程)

『GreenPlum系列』GreenPlum 4节点集群安装(图文教程)

发布时间:2015-03-21 19:01:14
目标架构如上图 一、硬件评估cpu主频,核数推荐CPU核数与磁盘数的比例在12:12以上Instance上执行时只能利用一个CPU核资源进行计算,推荐高主频内存容量网络带宽重分布操作Raid性能条带宽度设置回写特性二、操作系统 1、在SUSE或者RedHat上使用xfs( ...
『GreenPlum系列』GreenPlum 4节点集群安装(图文教程)
二、操作系统
『GreenPlum系列』GreenPlum 4节点集群安装(图文教程)
2、系统包
出现如下界面,按照下面的说明进行勾选,之后一直【Next】到开始安装。   
9、每个磁盘设备文件需要配置read-ahead(blockdev)值为65536
官方文档的推荐值为16384,但译者认为应该为65536更合理,该值设置的是预读扇区数, reboot一下创建一个hostfile_segonly,包含了所有的Segment Host的主机名,内容如下:创建一个hostfile_exkeys,包含了所有的Greenplum主机的网口对应的主机名(因为有可能是双网卡的服务器),内如如下:  
3、安装 Oracle  兼容函数
作为可选项,许多的Oracle兼容函数在GPDb中是可用的。[root@gp_test1 Server]# chown -R gpadmin:gpadmin /data/[root@gp_test1 data]# gpssh -h smdw1 -e 'mkdir /data/'[root@gp_test1 data]# gpssh -h smdw1 -e 'chown -R gpadmin:gpadmin /data/' # chkconfig --level 35 ntpd on
5、检查系统环境
用gpadmin登录master主机创建一个名为hostfile_gpcheck的文件,包含所有GP主机的主机名,确保无多余空格可以用以下命令来check一下文件是否准确这里会返回所有主机的hostname
四、检查硬件性能
1、检查网络性能
网络测试选项包括:并行测试(-r N)、串行测试(-r n)、矩阵测试(-r M)。测试时运行一个网络测试程序从当前主机向远程主机传输5秒钟的数据流。缺省时,数据并行传输到每个远程主机,报告出传输的最小、最大、平均和中值速率,单位为MB/S。如果主体的传输速率低于预期(小于100MB/S),可以使用-r n参数运行串行的网络测试以得到每个主机的结果。要运行矩阵测试,指定-r M参数,使得每个主机发送接收指定的所有其他主机的数据,这个测试可以验证网络层能否承受全矩阵工作负载。[gpadmin@gp_test1 gp_files]$ vi subnet1.out   
  # FILE NAME: gpinitsystem_config  # Configuration file needed by the gpinitsystem  ################################################  #### REQUIRED PARAMETERS  ################################################  #### Name of this Greenplum system enclosed in quotes. 数据库的代号  ARRAY_NAME="Greenplum DW4P 2M2S(2m2p)"  #### Naming convention for utility-generated data directories. Segment的名称前缀  SEG_PREFIX=gpseg  #### Base number by which primary segment port numbers 起始的端口号  #### are calculated.  PORT_BASE=40000  #### File system location(s) where primary segment data directories  #### will be created. The number of locations in the list dictate  #### the number of primary segments that will get created per  #### physical host (if multiple addresses for a host are listed in  #### the hostfile, the number of segments will be spread evenly across  #### the specified interface addresses).  #### 指定Primary Segment的数据目录, DATA_DIRECTORY参数指定每个Segment主机配置多少个Instance。如果  #### 在host文件中为每个Segment主机列出了多个网口,这些Instance将平均分布到所有列出的网口上。  #### 这里的案例,hosts里有2个segment,sdw1,sdw2俩主机,都是单网卡  declare -a DATA_DIRECTORY=(/data1/primary /data1/primary)  #### OS-configured hostname or IP address of the master host.  #### Master所在机器的Hostname  MASTER_HOSTNAME=mdw1  #### File system location where the master data directory  #### will be created.  #### 指定Master的数据目录  MASTER_DIRECTORY=/data/master  #### Port number for the master instance.  #### Master的端口  MASTER_PORT=5432  #### Shell utility used to connect to remote hosts.  #### bash的版本  TRUSTED_SHELL=ssh  #### Maximum log file segments between automatic WAL checkpoints.  #### CHECK_POINT_SEGMENT  #### 设置的是检查点段的大小,较大的检查点段可以改善大数据量装载的性能,同时会加长灾难事务恢复的时间。更多信息可参考相关文档。缺省值为8,  #### 若为保守起见,建议配置为缺省值,本次测试环境为单台IBM3650M3,呃,可能要改叫联想3650了。  #### 如果多台服务器级的主机,有足够的内存>16G >16核,那么可以考虑设置为CHECK_POINT_SEGMENTS=256  CHECK_POINT_SEGMENTS=8  #### Default server-side character set encoding.  #### 字符集  ENCODING=UNICODE  ################################################  #### OPTIONAL MIRROR PARAMETERS  ################################################  #### Base number by which mirror segment port numbers  #### are calculated.  #### Mirror Segment起始的端口号  #MIRROR_PORT_BASE=50000  #### Base number by which primary file replication port  #### numbers are calculated.  #### Primary Segment主备同步的起始端口号  #REPLICATION_PORT_BASE=41000  #### Base number by which mirror file replication port  #### numbers are calculated.  #### Mirror Segment主备同步的起始端口号  #MIRROR_REPLICATION_PORT_BASE=51000  #### File system location(s) where mirror segment data directories  #### will be created. The number of mirror locations must equal the  #### number of primary locations as specified in the  #### DATA_DIRECTORY parameter.  #### Mirror Segment的数据目录  #declare -a MIRROR_DATA_DIRECTORY=(/data1/mirror /data1/mirror /data1/mirror /data2/mirror /data2/mirror /data2/mirror)  ################################################  #### OTHER OPTIONAL PARAMETERS  ################################################  #### Create a database of this name after initialization.  #DATABASE_NAME=name_of_database  #### Specify the location of the host address file here instead of  #### with the the -h option of gpinitsystem.  #MACHINE_LIST_FILE=/home/gpadmin/gpconfigs/hostfile_gpinitsystem
接着我们开始初始化GP集群了。   也可以用gpstat来查看当前的状态,此命令也是排错时的必备工具用gpadmin登录$ source ~/.bashrc[gpadmin@gp_test1 /]$ psql -d daapDBdaapDB=#  


原标题:『GreenPlum系列』GreenPlum 4节点集群安装(图文教程)

关键词:

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。

可能感兴趣文章

我的浏览记录