1.假设单机hostname为bsa175
2.将greenplum-db-4.3.10.0-build-1-rhel5-x86_64.zip解压缩,可以得到greenplum-db-4.3.10.0-build-1-rhel5-x86_64.bin文件
3.运行./greenplum-db-4.3.10.0-build-1-rhel5-x86_64.bin,将安装路径设置为~/greenplum(视自己想安装的路径情况而定)
4.在~/greenplum中写入文件seg_hosts和hostlist,里面的内容为bsa175
5.使用gpssh-exkeys将所有机器通道打开
~/greenplum/bin/gpssh-exkeys -f ~/greenplum/hostlist
6.新建数据目录
mkdir -p ~/greenplum/gpdata/gpmaster
mkdir -p ~/greenplum/gpdata/gpdatap1
mkdir -p ~/greenplum/gpdata/gpdatap2
mkdir -p ~/greenplum/gpdata/gpdatam1
mkdir -p ~/greenplum/gpdata/gpdatam2
7.将~/greenplum/docs/cli_help/gpconfigs/gpinitsystem_config拷贝为~/greenplum/initgp_config
8.修改~/.bashrc
source ~/greenplum/greenplum_path.sh
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/bsaworker/greenplum/lib
export GPHOME=/home/bsaworker/greenplum
export MASTER_DATA_DIRECTORY=/home/bsaworker/greenplum/gpdata/gpmaster/gpseg-1
然后令其生效,source ~/.bashrc
9.修改~/greenplum/initgp_config
# 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=33000
#### 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=(~/greenplum/gpdata/gpdatap1 ~/greenplum/gpdata/gpdatap2)
#### OS-configured hostname or IP address of the master host.
MASTER_HOSTNAME=bsa175
#### File system location where the master data directory
#### will be created.
MASTER_DIRECTORY=/home/bsaworker/greenplum/gpdata/gpmaster
#### Port number for the master instance.
MASTER_PORT=2345
#### 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=utf-8
################################################
#### OPTIONAL MIRROR PARAMETERS
################################################
#### Base number by which mirror segment port numbers
#### are calculated.
MIRROR_PORT_BASE=43000
#### Base number by which primary file replication port
#### numbers are calculated.
REPLICATION_PORT_BASE=34000
#### Base number by which mirror file replication port
#### numbers are calculated.
MIRROR_REPLICATION_PORT_BASE=44000
#### 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=(~/greenplum/gpdata/gpdatam1 ~/greenplum/gpdata/gpdatam2)
################################################
#### OTHER OPTIONAL PARAMETERS
################################################
#### Create a database of this name after initialization.
DATABASE_NAME=test
#### Specify the location of the host address file here instead of
#### with the the -h option of gpinitsystem.
MACHINE_LIST_FILE=/home/bsaworker/greenplum/seg_hosts
#
MASTER_MAX_CONNECT=20
红字为修改之处。
10.运行
~/greenplum/bin/gpseginstall -f ~/greenplum/hostlsit -u ${user} -p ${pass}
11.运行
~/greenplum/bin/gpinitsystem -c ~/greenplum/initgp_config
当显示的结果中有,“Greenplum Database instance successfully created”即安装成功。
即可以使用psql -p 2345 -d postgres进行访问。