网创优客建站品牌官网
为成都网站建设公司企业提供高品质网站建设
热线:028-86922220
成都专业网站建设公司

定制建站费用3500元

符合中小企业对网站设计、功能常规化式的企业展示型网站建设

成都品牌网站建设

品牌网站建设费用6000元

本套餐主要针对企业品牌型网站、中高端设计、前端互动体验...

成都商城网站建设

商城网站建设费用8000元

商城网站建设因基本功能的需求不同费用上面也有很大的差别...

成都微信网站建设

手机微信网站建站3000元

手机微信网站开发、微信官网、微信商城网站...

建站知识

当前位置:首页 > 建站知识

怎么快速搭建gp集群-创新互联

本篇内容介绍了“怎么快速搭建gp集群”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!

成都创新互联成都网站建设按需网站设计,是成都网站开发公司,为搬家公司提供网站建设服务,有成熟的网站定制合作流程,提供网站定制设计服务:原型图制作、网站创意设计、前端HTML5制作、后台程序开发等。成都网站制作热线:18982081108

1上传已编译完的包至/data/目录

2.解压

3 修改gpadmin的环境变量

  1. [gpadmin@DB-01 ~]$ more .bash_profile

  2. # .bash_profile

  3. # Get the aliases and functions

  4. if [ -f ~/.bashrc ]; then

  5.         . ~/.bashrc

  6. fi

  7. # User specific environment and startup programs

  8. PATH=$PATH:$HOME/bin

  9. export PATH

  10. source /data/gpdb/greenplum_path.sh    ---bin目录

  11. export MASTER_DATA_DIRECTORY=/data/gpdb/gpdata2/gpmaster/gpseg-1  --数据目录

  12. export PGPORT=5432

  13. export PGDATABASE=ecejdatainfo


4 修改初始化配置文件

  1. [gpadmin@DB-01 conf]$  pwd
    /home/gpadmin/conf

  2. [gpadmin@DB-01 conf]$ ll

  3. total 16

  4. -rw-rw-r-- 1 gpadmin gpadmin 2910 May 26 14:04 gpinitsystem_config

  5. -rw-rw-r-- 1 gpadmin gpadmin 2703 Jul  6 20:58 gpinitsystem_config2

  6. -rw-rw-r-- 1 gpadmin gpadmin   62 May 26 10:17 hostlist

  7. -rw-rw-r-- 1 gpadmin gpadmin   51 May 26 10:17 seg_hosts

  8. [gpadmin@DB-01 conf]$ more gpinitsystem_config2   ---修改对应的数据目录 /data/gpdb/gpdata2
    # FILE NAME: gpinitsystem_config


    # Configuration file needed by the gpinitsystem


    ################################################
    #### REQUIRED PARAMETERS
    ################################################


    #### Name of this Greenplum system enclosed in quotes.
    ARRAY_NAME="EMC Greenplum DW"


    #### Naming convention for utility-generated data directories.
    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).
    declare -a DATA_DIRECTORY=(/data/gpdb/gpdata2/gpdatap1 /data/gpdb/gpdata2/gpdatap2 /data/gpdb/gpdata2/gpdatap3 /data/gpdb/gpdata2/gpdatap4)


    #### OS-configured hostname or IP address of the master host.
    MASTER_HOSTNAME=mdw


    #### File system location where the master data directory 
    #### will be created.
    MASTER_DIRECTORY=/data/gpdb/gpdata2/gpmaster


    #### Port number for the master instance. 
    MASTER_PORT=5432


    #### Shell utility used to connect to remote hosts.
    TRUSTED_SHELL=ssh


    #### Maximum log file segments between automatic WAL checkpoints.
    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_PORT_BASE=50000


    #### Base number by which primary file replication port 
    #### numbers are calculated.
    REPLICATION_PORT_BASE=41000


    #### Base number by which mirror file replication port 
    #### numbers are calculated. 
    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.
    declare -a MIRROR_DATA_DIRECTORY=(/data/gpdb/gpdata2/gpdatam1 /data/gpdb/gpdata2/gpdatam2 /data/gpdb/gpdata2/gpdatam3 /data/gpdb/gpdata2/gpdatam4)


    ################################################
    #### 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/conf/seg_hosts

5 每个segment建立对应的节点目录

  1. [gpadmin@DB-01 conf]$ cd /data/gpdb/gpdata2/

  2. [gpadmin@DB-01 gpdata2]$ ll

  3. total 36

  4. drwxrwxr-x 2 gpadmin gpadmin 4096 Jul  6 20:57 gpdatam1

  5. drwxrwxr-x 2 gpadmin gpadmin 4096 Jul  6 20:57 gpdatam2

  6. drwxrwxr-x 2 gpadmin gpadmin 4096 Jul  6 20:57 gpdatam3

  7. drwxrwxr-x 2 gpadmin gpadmin 4096 Jul  6 20:57 gpdatam4

  8. drwxrwxr-x 2 gpadmin gpadmin 4096 Jul  6 20:57 gpdatap1

  9. drwxrwxr-x 2 gpadmin gpadmin 4096 Jul  6 20:57 gpdatap2

  10. drwxrwxr-x 2 gpadmin gpadmin 4096 Jul  6 20:57 gpdatap3

  11. drwxrwxr-x 2 gpadmin gpadmin 4096 Jul  6 20:57 gpdatap4

  12. drwxrwxr-x 3 gpadmin gpadmin 4096 Jul  6 20:59 gpmaster


6 初始化

  1. gpinitsystem -c /home/gpadmin/conf/gpinitsystem_config2 -s mdw-s

“怎么快速搭建gp集群”的内容就介绍到这里了,感谢大家的阅读。如果想了解更多行业相关的知识可以关注创新互联-成都网站建设公司网站,小编将为大家输出更多高质量的实用文章!


分享标题:怎么快速搭建gp集群-创新互联
分享URL:http://bjjierui.cn/article/epdcp.html

其他资讯