【GP】快速搭建gp叢集
1上傳已編譯完的包至/data/目錄
2.解壓
3 修改gpadmin的環境變數
4 修改初始化配置檔案
5 每個segment建立對應的節點目錄
6 初始化
附件:
gpdb.tar.gz與conf.tar.gz
2.解壓
3 修改gpadmin的環境變數
-
[gpadmin@DB-01 ~]$ more .bash_profile
-
# .bash_profile
-
-
# Get the aliases and functions
-
if [ -f ~/.bashrc ]; then
-
. ~/.bashrc
-
fi
-
-
# User specific environment and startup programs
-
-
PATH=$PATH:$HOME/bin
-
-
export PATH
-
source /data/gpdb/greenplum_path.sh ---bin目錄
-
export MASTER_DATA_DIRECTORY=/data/gpdb/gpdata2/gpmaster/gpseg-1 --資料目錄
-
export PGPORT=5432
- export PGDATABASE=ecejdatainfo
4 修改初始化配置檔案
-
[gpadmin@DB-01 conf]$ pwd
/home/gpadmin/conf
-
[gpadmin@DB-01 conf]$ ll
-
total 16
-
-rw-rw-r-- 1 gpadmin gpadmin 2910 May 26 14:04 gpinitsystem_config
-
-rw-rw-r-- 1 gpadmin gpadmin 2703 Jul 6 20:58 gpinitsystem_config2
-
-rw-rw-r-- 1 gpadmin gpadmin 62 May 26 10:17 hostlist
- -rw-rw-r-- 1 gpadmin gpadmin 51 May 26 10:17 seg_hosts
-
[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建立對應的節點目錄
-
[gpadmin@DB-01 conf]$ cd /data/gpdb/gpdata2/
-
[gpadmin@DB-01 gpdata2]$ ll
-
total 36
-
drwxrwxr-x 2 gpadmin gpadmin 4096 Jul 6 20:57 gpdatam1
-
drwxrwxr-x 2 gpadmin gpadmin 4096 Jul 6 20:57 gpdatam2
-
drwxrwxr-x 2 gpadmin gpadmin 4096 Jul 6 20:57 gpdatam3
-
drwxrwxr-x 2 gpadmin gpadmin 4096 Jul 6 20:57 gpdatam4
-
drwxrwxr-x 2 gpadmin gpadmin 4096 Jul 6 20:57 gpdatap1
-
drwxrwxr-x 2 gpadmin gpadmin 4096 Jul 6 20:57 gpdatap2
-
drwxrwxr-x 2 gpadmin gpadmin 4096 Jul 6 20:57 gpdatap3
-
drwxrwxr-x 2 gpadmin gpadmin 4096 Jul 6 20:57 gpdatap4
- drwxrwxr-x 3 gpadmin gpadmin 4096 Jul 6 20:59 gpmaster
6 初始化
- gpinitsystem -c /home/gpadmin/conf/gpinitsystem_config2 -s mdw-s
附件:
gpdb.tar.gz與conf.tar.gz
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29096438/viewspace-2141818/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 快速搭建Jenkins叢集Jenkins
- PARI/GP 簡介
- 用 Docker 快速搭建 Kafka 叢集DockerKafka
- 學Java,觀GP (轉)Java
- CMMI入門 – 通用實踐的實施GP 2.1-GP 2.5薦
- linux shell快速搭建NSQ叢集Linux
- Hadoop-2.7.4 叢集快速搭建Hadoop
- CMMI入門 – 通用實踐的實施GP 2.8-GP 2.10薦
- GP增加計算節點
- GP standby切換成masterAST
- GP完整安裝手冊
- Docker快速搭建Kafka 1.x叢集DockerKafka
- 1.4 基礎知識——GP2.2 計劃 與 GP2.8 計劃跟蹤
- GP查詢外部表報錯
- 1.10 基礎知識——GP3.1 制度化 & GP3.2 收集改進資訊
- ArcGIS API for Silverlight 呼叫GP服務準備---GP模型建立、釋出、測試API模型
- 搭建zookeeper叢集(偽叢集)
- 叢集搭建
- 1.5 基礎知識——GP2.3 提供資源(Resources) 與 GP2.4 分配職責(Responisbility)
- GP詭異的查詢轉換
- 【GP】postgrepsql許可權管理SQL
- Greenplum gp_vmem_protect_limit 出錯MIT
- zookeeper叢集及kafka叢集搭建Kafka
- 快速掌握RabbitMQ(五)——搭建高可用的RabbitMQ叢集MQ
- 使用kind快速搭建本地k8s叢集K8S
- Redis系列:搭建Redis叢集(叢集模式)Redis模式
- redis叢集搭建Redis
- nacos 叢集搭建
- kafka叢集搭建Kafka
- Ambari叢集搭建
- 搭建ELK叢集
- RabbitMQ叢集搭建MQ
- HBASE叢集搭建
- zookeeper 叢集搭建
- mysql叢集搭建MySql
- Zookeeper叢集搭建
- 搭建 Redis 叢集Redis
- 搭建 zookeeper 叢集