Greenplum安装

一、环境准备

1.修改系统参数
编辑 /etc/sysctl.conf ,以下是最小配置 
kernel.shmmax = 500000000
kernel.shmmni = 4096
kernel.shmall = 4000000000
kernel.sem = 250 512000 100 2048
kernel.sysrq = 1
kernel.core_uses_pid = 1
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.msgmni = 2048
net.ipv4.tcp_syncookies = 1
net.ipv4.ip_forward = 0
net.ipv4.conf.default.accept_source_route = 0
net.ipv4.tcp_tw_recycle = 1
net.ipv4.tcp_max_syn_backlog = 4096
net.ipv4.conf.all.arp_filter = 1
net.ipv4.ip_local_port_range = 1025 65535
net.core.netdev_max_backlog = 10000
net.core.rmem_max = 2097152
net.core.wmem_max = 2097152
vm.overcommit_memory = 2  

2.修改文件打开数等限制
编辑/etc/security/limits.conf
* soft nofile 65536
* hard nofile 65536
* soft nproc 131072
* hard nproc 131072

编辑/etc/security/limits.d/90-nproc.conf
* soft nofile 65536
* hard nofile 65536
* soft nproc 131072
* hard nproc 131072

3.修改scheduler
编辑scheduler,原先默认是cfq
echo deadline > /sys/block/vda/queue/scheduler
[root@bigdata03 ~]# more  /sys/block/vda/queue/scheduler 
noop anticipatory [deadline] cfq 

4.编辑/boot/grub/grub.conf
新增 elevator=deadline
[root @bigdata03 ~]# more /boot/grub/grub.conf
...elevator=deadline crashkernel=auto ...

5.编辑设备块大小
[root@bigdata03 ~]# /sbin/blockdev --setra 16384 /dev/vda
[root@bigdata03 ~]# /sbin/blockdev --getra /dev/vda
16384

6.配置hosts文件
编辑/etc/hosts,添加,选中bigdata01作为master,其他为segment
ip  bigdata01   
ip  bigdata02
ip  bigdata03

7.分别创建各数据节点文件(一个含master,一个不含)
[root@bigdata01 opt]# vi /tmp/hostfile_exkeys
bigdata01
bigdata02
bigdata03

#seg节点
[root@bigdata01 opt]# vi /tmp/hostfile_segments
bigdata02
bigdata03

二、集群安装

1.下载、上传、安装
下载地址:https://network.pivotal.io/products/pivotal-gpdb
上传至/opt目录下
[root@bigdata01 opt]# ll
total 139408
drwxr-xr-x 4 cloudera-scm cloudera-scm      4096 Oct 12 10:57 cloudera
-rw-r--r-- 1 root         root         142741819 Nov 30 14:36 greenplum-db-4.3.17.1-rhel5-x86_64.bin
drwxr-xr-x 8 root         root              4096 Oct 12 10:47 java8
[root@bigdata01 opt]# /bin/bash greenplum-db-4.3.17.1-rhel5-x86_64.bin

********************************************************************************
You must read and accept the Pivotal Database license agreement
before installing
********************************************************************************
********************************************************************************
Do you accept the Pivotal Database license agreement? [yes|no]
********************************************************************************

yes

********************************************************************************
Provide the installation path for Greenplum Database or press ENTER to 
accept the default installation path: /usr/local/greenplum-db-4.3.17.1
********************************************************************************

/opt/greenplum-db-4.3.17.1

********************************************************************************
Install Greenplum Database into /opt/greenplum-db-4.3.17.1? [yes|no]
********************************************************************************

yes

********************************************************************************
/opt/greenplum-db-4.3.17.1 does not exist.
Create /opt/greenplum-db-4.3.17.1 ? [yes|no]
(Selecting no will exit the installer)
********************************************************************************

yes

Extracting product to /opt/greenplum-db-4.3.17.1

********************************************************************************
Installation complete.
Greenplum Database is installed in /opt/greenplum-db-4.3.17.1

Pivotal Greenplum documentation is available
for download at http://gpdb.docs.pivotal.io
********************************************************************************
[root@bigdata01 opt]# 

2.建立master与各节点的信任关系(root用户)
[root@bigdata01 opt]# ll
total 139412
drwxr-xr-x  4 cloudera-scm cloudera-scm      4096 Oct 12 10:57 cloudera
lrwxrwxrwx  1 root         root                23 Nov 30 14:59 greenplum-db -> ./greenplum-db-4.3.17.1
drwxr-xr-x 11 root         root              4096 Nov 30 14:59 greenplum-db-4.3.17.1
-rw-r--r--  1 root         root         142741819 Nov 30 14:36 greenplum-db-4.3.17.1-rhel5-x86_64.bin
drwxr-xr-x  8 root         root              4096 Oct 12 10:47 java8
[root@bigdata01 opt]# source /opt/greenplum-db/greenplum_path.sh       

#建立ssh信任关系,如果端口不是默认的22,需要更改/etc/ssh/sshd_config(三台机器都要改)
[root@bigdata01 opt]#  vi /etc/ssh/sshd_config
#在原有端口上多加一个22
Port 22
Port 11111
[root@bigdata01 opt]# service sshd restart
Stopping sshd:                                             [  OK  ]
Starting sshd:                                             [  OK  ]

[root@bigdata01 opt]# source /opt/greenplum-db/greenplum_path.sh 
[root@bigdata01 ~]# gpssh-exkeys -f /tmp/hostfile_exkeys 
[STEP 1 of 5] create local ID and authorize on local host
  ... /root/.ssh/id_rsa file exists ... key generation skipped

[STEP 2 of 5] keyscan all hosts and update known_hosts file

[STEP 3 of 5] authorize current user on remote hosts
  ... send to bigdata02
  ... send to bigdata03

[STEP 4 of 5] determine common authentication file content

[STEP 5 of 5] copy authentication files to all remote hosts
  ... finished key exchange with bigdata02
  ... finished key exchange with bigdata03

[INFO] completed successfully

#实质就是master与各个节点创建了个ssh的信任关系,信任的key存放在/root/.ssh/authorized_keys里
--测试是否无需密码登陆,ok

3.使用GP自带脚本把包传送到各个节点上,并解压缩以及创建用户,组等
[root@bigdata01 opt]# gpseginstall -f /tmp/hostfile_exkeys -u gpadmin -p xxxxxxxx
20171201:15:37:45:011284 gpseginstall:bigdata01:root-[INFO]:-Installation Info:
link_name greenplum-db
binary_path /opt/greenplum-db-4.3.17.1
binary_dir_location /opt
binary_dir_name greenplum-db-4.3.17.1
20171201:15:37:45:011284 gpseginstall:bigdata01:root-[INFO]:-check cluster password access
20171201:15:37:45:011284 gpseginstall:bigdata01:root-[INFO]:-de-duplicate hostnames
20171201:15:37:45:011284 gpseginstall:bigdata01:root-[INFO]:-master hostname: bigdata01
20171201:15:37:45:011284 gpseginstall:bigdata01:root-[INFO]:-check for user gpadmin on cluster
20171201:15:37:46:011284 gpseginstall:bigdata01:root-[INFO]:-add user gpadmin on master
20171201:15:37:46:011284 gpseginstall:bigdata01:root-[INFO]:-add user gpadmin on cluster
20171201:15:37:46:011284 gpseginstall:bigdata01:root-[INFO]:-chown -R gpadmin:gpadmin /opt/greenplum-db
20171201:15:37:46:011284 gpseginstall:bigdata01:root-[INFO]:-chown -R gpadmin:gpadmin /opt/greenplum-db-4.3.17.1
20171201:15:37:46:011284 gpseginstall:bigdata01:root-[INFO]:-rm -f /opt/greenplum-db-4.3.17.1.tar; rm -f /opt/greenplum-db-4.3.17.1.tar.gz
20171201:15:37:46:011284 gpseginstall:bigdata01:root-[INFO]:-cd /opt; tar cf greenplum-db-4.3.17.1.tar greenplum-db-4.3.17.1
20171201:15:37:48:011284 gpseginstall:bigdata01:root-[INFO]:-gzip /opt/greenplum-db-4.3.17.1.tar
20171201:15:38:11:011284 gpseginstall:bigdata01:root-[INFO]:-remote command: mkdir -p /opt
20171201:15:38:11:011284 gpseginstall:bigdata01:root-[INFO]:-remote command: rm -rf /opt/greenplum-db-4.3.17.1
20171201:15:38:11:011284 gpseginstall:bigdata01:root-[INFO]:-scp software to remote location
20171201:15:38:12:011284 gpseginstall:bigdata01:root-[INFO]:-remote command: gzip -f -d /opt/greenplum-db-4.3.17.1.tar.gz
20171201:15:38:16:011284 gpseginstall:bigdata01:root-[INFO]:-md5 check on remote location
20171201:15:38:17:011284 gpseginstall:bigdata01:root-[INFO]:-remote command: cd /opt; tar xf greenplum-db-4.3.17.1.tar
20171201:15:38:18:011284 gpseginstall:bigdata01:root-[INFO]:-remote command: rm -f /opt/greenplum-db-4.3.17.1.tar
20171201:15:38:18:011284 gpseginstall:bigdata01:root-[INFO]:-remote command: cd /opt; rm -f greenplum-db; ln -fs greenplum-db-4.3.17.1 greenplum-db
20171201:15:38:18:011284 gpseginstall:bigdata01:root-[INFO]:-remote command: chown -R gpadmin:gpadmin /opt/greenplum-db
20171201:15:38:18:011284 gpseginstall:bigdata01:root-[INFO]:-remote command: chown -R gpadmin:gpadmin /opt/greenplum-db-4.3.17.1
20171201:15:38:19:011284 gpseginstall:bigdata01:root-[INFO]:-rm -f /opt/greenplum-db-4.3.17.1.tar.gz
20171201:15:38:19:011284 gpseginstall:bigdata01:root-[INFO]:-Changing system passwords ...
20171201:15:38:19:011284 gpseginstall:bigdata01:root-[INFO]:-exchange ssh keys for user root
20171201:15:38:20:011284 gpseginstall:bigdata01:root-[INFO]:-exchange ssh keys for user gpadmin
20171201:15:38:22:011284 gpseginstall:bigdata01:root-[INFO]:-/opt/greenplum-db/./sbin/gpfixuserlimts -f /etc/security/limits.conf -u gpadmin
20171201:15:38:22:011284 gpseginstall:bigdata01:root-[INFO]:-remote command: . /opt/greenplum-db/./greenplum_path.sh; /opt/greenplum-db/./sbin/gpfixuserlimts -f /etc/security/limits.conf -u gpadmin
20171201:15:38:22:011284 gpseginstall:bigdata01:root-[INFO]:-version string on master: gpssh version 4.3.17.1 build 1
20171201:15:38:22:011284 gpseginstall:bigdata01:root-[INFO]:-remote command: . /opt/greenplum-db/./greenplum_path.sh; /opt/greenplum-db/./bin/gpssh --version
20171201:15:38:22:011284 gpseginstall:bigdata01:root-[INFO]:-remote command: . /opt/greenplum-db-4.3.17.1/greenplum_path.sh; /opt/greenplum-db-4.3.17.1/bin/gpssh --version
20171201:15:38:27:011284 gpseginstall:bigdata01:root-[INFO]:-SUCCESS -- Requested commands completed

4.创建各个节点的数据文件夹,并授权
[root@bigdata01 opt]# gpssh -f /tmp/hostfile_segments -e 'mkdir -p /data01/primary'
[bigdata02] mkdir -p /data01/primary
[bigdata03] mkdir -p /data01/primary
[root@bigdata01 opt]#  gpssh -f /tmp/hostfile_segments -e 'chown gpadmin /data01/primary'
[bigdata02] chown gpadmin.gpadmin /data01/primary
[bigdata03] chown gpadmin.gpadmin  /data01/primary
[root@bigdata01 opt]# mkdir /data01/master
[root@bigdata01 data01]# chown gpadmin.gpadmin /data01/master

5.时钟同步
因为我用的阿里云,所以不用考虑此问题

三、集群初始化

在master上以gpadmin用户登陆
[root@bigdata01 opt]# su - gpadmin
[gpadmin@bigdata01 ~]$ 
[gpadmin@bigdata01 ~]$ source /opt/greenplum-db/greenplum_path.sh 
[gpadmin@bigdata01 ~]$ pwd
/home/gpadmin
[gpadmin@bigdata01 ~]$ mkdir gpconfigs
[gpadmin@bigdata01 ~]$ ll
total 4
drwxr-xr-x 2 gpadmin gpadmin 4096 Dec  1 15:52 gpconfigs
[gpadmin@bigdata01 ~]$  cp $GPHOME/docs/cli_help/gpconfigs/gpinitsystem_config /home/gpadmin/gpconfigs/gpinitsystem_config
[gpadmin@bigdata01 ~]$ cd gpconfigs/
[gpadmin@bigdata01 gpconfigs]$ ll
total 4
-rwxr-xr-x 1 gpadmin gpadmin 2660 Dec  1 15:53 gpinitsystem_config
[gpadmin@bigdata01 gpconfigs]$ cd ..


#配置gpinitsystem_config文件
[gpadmin@bigdata01 ~]$ vi gpconfigs/gpinitsystem_config 
#### 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=(/data01/primary)

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

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

#### 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=64

#### Default server-side character set encoding.
ENCODING=UTF-8

开始初始化
[gpadmin@bigdata01 ~]$ gpinitsystem -c gpconfigs/gpinitsystem_config -h /tmp/hostfile_segments
20171201:16:11:53:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-Checking configuration parameters, please wait...
20171201:16:11:54:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-Reading Greenplum configuration file gpconfigs/gpinitsystem_config
20171201:16:11:54:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-Locale has not been set in gpconfigs/gpinitsystem_config, will set to default value
20171201:16:11:54:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-Locale set to en_US.utf8
20171201:16:11:54:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-No DATABASE_NAME set, will exit following template1 updates
20171201:16:11:54:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-MASTER_MAX_CONNECT not set, will set to default value 250
20171201:16:11:54:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-Master IP address array = xxx.xxx.xxx.xxx
20171201:16:11:54:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-Checking configuration parameters, Completed
20171201:16:11:54:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-Commencing multi-home checks, please wait...
..
20171201:16:11:54:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-Configuring build for standard array
20171201:16:11:54:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-Commencing multi-home checks, Completed
20171201:16:11:54:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-Building primary segment instance array, please wait...
..
20171201:16:11:55:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-Checking Master host
20171201:16:11:55:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-Checking new segment hosts, please wait...
..
20171201:16:11:57:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-Checking new segment hosts, Completed
20171201:16:11:57:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-Greenplum Database Creation Parameters
20171201:16:11:57:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:---------------------------------------
20171201:16:11:57:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-Master Configuration
20171201:16:11:57:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:---------------------------------------
20171201:16:11:57:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-Master instance name       = EMC Greenplum DW
20171201:16:11:57:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-Master hostname            = bigdata01
20171201:16:11:57:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-Master port                = 5432
20171201:16:11:57:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-Master instance dir        = /data01/master/gpseg-1
20171201:16:11:57:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-Master LOCALE              = en_US.utf8
20171201:16:11:57:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-Greenplum segment prefix   = gpseg
20171201:16:11:57:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-Master Database            = 
20171201:16:11:57:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-Master connections         = 250
20171201:16:11:57:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-Master buffers             = 128000kB
20171201:16:11:57:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-Segment connections        = 750
20171201:16:11:57:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-Segment buffers            = 128000kB
20171201:16:11:57:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-Checkpoint segments        = 64
20171201:16:11:57:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-Encoding                   = UTF-8
20171201:16:11:57:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-Postgres param file        = Off
20171201:16:11:57:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-Initdb to be used          = /opt/greenplum-db/./bin/initdb
20171201:16:11:57:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-GP_LIBRARY_PATH is         = /opt/greenplum-db/./lib
20171201:16:11:57:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-Ulimit check               = Passed
20171201:16:11:57:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-Array host connect type    = Single hostname per node
20171201:16:11:57:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-Master IP address [1]      = xxx.xxx.xxx.xxx
20171201:16:11:57:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-Master IP address [2]      = xxx.xxx.xxx.xxx
20171201:16:11:57:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-Standby Master             = Not Configured
20171201:16:11:57:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-Primary segment #          = 1
20171201:16:11:57:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-Total Database segments    = 2
20171201:16:11:57:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-Trusted shell              = ssh
20171201:16:11:57:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-Number segment hosts       = 2
20171201:16:11:57:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-Mirroring config           = OFF
20171201:16:11:57:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:----------------------------------------
20171201:16:11:57:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-Greenplum Primary Segment Configuration
20171201:16:11:57:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:----------------------------------------
20171201:16:11:57:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-bigdata02   /data01/primary/gpseg0  40000   2   0
20171201:16:11:57:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-bigdata03   /data01/primary/gpseg1  40000   3   1
Continue with Greenplum creation Yy/Nn>
y
20171201:16:12:01:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-Building the Master instance database, please wait...
20171201:16:12:07:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-Starting the Master in admin mode
20171201:16:12:27:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-Commencing parallel build of primary segment instances
20171201:16:12:27:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-Spawning parallel processes    batch [1], please wait...
..
20171201:16:12:27:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-Waiting for parallel processes batch [1], please wait...
...........
20171201:16:12:38:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:------------------------------------------------
20171201:16:12:38:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-Parallel process exit status
20171201:16:12:38:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:------------------------------------------------
20171201:16:12:38:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-Total processes marked as completed           = 2
20171201:16:12:38:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-Total processes marked as killed              = 0
20171201:16:12:38:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-Total processes marked as failed              = 0
20171201:16:12:38:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:------------------------------------------------
20171201:16:12:38:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-Deleting distributed backout files
20171201:16:12:38:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-Removing back out file
20171201:16:12:38:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-No errors generated from parallel processes
20171201:16:12:38:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-Restarting the Greenplum instance in production mode
20171201:16:12:38:015963 gpstop:bigdata01:gpadmin-[INFO]:-Starting gpstop with args: -a -l /home/gpadmin/gpAdminLogs -i -m -d /data01/master/gpseg-1
20171201:16:12:38:015963 gpstop:bigdata01:gpadmin-[INFO]:-Gathering information and validating the environment...
20171201:16:12:38:015963 gpstop:bigdata01:gpadmin-[INFO]:-Obtaining Greenplum Master catalog information
20171201:16:12:38:015963 gpstop:bigdata01:gpadmin-[INFO]:-Obtaining Segment details from master...
20171201:16:12:38:015963 gpstop:bigdata01:gpadmin-[INFO]:-Greenplum Version: 'postgres (Greenplum Database) 4.3.17.1 build 1'
20171201:16:12:38:015963 gpstop:bigdata01:gpadmin-[INFO]:-There are 0 connections to the database
20171201:16:12:38:015963 gpstop:bigdata01:gpadmin-[INFO]:-Commencing Master instance shutdown with mode='immediate'
20171201:16:12:38:015963 gpstop:bigdata01:gpadmin-[INFO]:-Master host=bigdata01
20171201:16:12:38:015963 gpstop:bigdata01:gpadmin-[INFO]:-Commencing Master instance shutdown with mode=immediate
20171201:16:12:38:015963 gpstop:bigdata01:gpadmin-[INFO]:-Master segment instance directory=/data01/master/gpseg-1
20171201:16:12:39:015963 gpstop:bigdata01:gpadmin-[INFO]:-Attempting forceful termination of any leftover master process
20171201:16:12:39:015963 gpstop:bigdata01:gpadmin-[INFO]:-Terminating processes for segment /data01/master/gpseg-1
20171201:16:12:40:016076 gpstart:bigdata01:gpadmin-[INFO]:-Starting gpstart with args: -a -l /home/gpadmin/gpAdminLogs -d /data01/master/gpseg-1
20171201:16:12:40:016076 gpstart:bigdata01:gpadmin-[INFO]:-Gathering information and validating the environment...
20171201:16:12:40:016076 gpstart:bigdata01:gpadmin-[INFO]:-Greenplum Binary Version: 'postgres (Greenplum Database) 4.3.17.1 build 1'
20171201:16:12:40:016076 gpstart:bigdata01:gpadmin-[INFO]:-Greenplum Catalog Version: '201310150'
20171201:16:12:40:016076 gpstart:bigdata01:gpadmin-[INFO]:-Starting Master instance in admin mode
20171201:16:12:41:016076 gpstart:bigdata01:gpadmin-[INFO]:-Obtaining Greenplum Master catalog information
20171201:16:12:41:016076 gpstart:bigdata01:gpadmin-[INFO]:-Obtaining Segment details from master...
20171201:16:12:41:016076 gpstart:bigdata01:gpadmin-[INFO]:-Setting new master era
20171201:16:12:41:016076 gpstart:bigdata01:gpadmin-[INFO]:-Master Started...
20171201:16:12:41:016076 gpstart:bigdata01:gpadmin-[INFO]:-Shutting down master
20171201:16:12:42:016076 gpstart:bigdata01:gpadmin-[INFO]:-Commencing parallel segment instance startup, please wait...
....... 
20171201:16:12:49:016076 gpstart:bigdata01:gpadmin-[INFO]:-Process results...
20171201:16:12:49:016076 gpstart:bigdata01:gpadmin-[INFO]:-----------------------------------------------------
20171201:16:12:49:016076 gpstart:bigdata01:gpadmin-[INFO]:-   Successful segment starts                                            = 2
20171201:16:12:49:016076 gpstart:bigdata01:gpadmin-[INFO]:-   Failed segment starts                                                = 0
20171201:16:12:49:016076 gpstart:bigdata01:gpadmin-[INFO]:-   Skipped segment starts (segments are marked down in configuration)   = 0
20171201:16:12:49:016076 gpstart:bigdata01:gpadmin-[INFO]:-----------------------------------------------------
20171201:16:12:49:016076 gpstart:bigdata01:gpadmin-[INFO]:-
20171201:16:12:49:016076 gpstart:bigdata01:gpadmin-[INFO]:-Successfully started 2 of 2 segment instances 
20171201:16:12:49:016076 gpstart:bigdata01:gpadmin-[INFO]:-----------------------------------------------------
20171201:16:12:49:016076 gpstart:bigdata01:gpadmin-[INFO]:-Starting Master instance bigdata01 directory /data01/master/gpseg-1 
20171201:16:12:50:016076 gpstart:bigdata01:gpadmin-[INFO]:-Command pg_ctl reports Master bigdata01 instance active
20171201:16:12:50:016076 gpstart:bigdata01:gpadmin-[INFO]:-No standby master configured.  skipping...
20171201:16:12:50:016076 gpstart:bigdata01:gpadmin-[INFO]:-Database successfully started
20171201:16:12:53:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-Completed restart of Greenplum instance in production mode
20171201:16:12:53:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-Loading gp_toolkit...
20171201:16:12:54:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-Scanning utility log file for any warning messages
20171201:16:12:54:003888 gpinitsystem:bigdata01:gpadmin-[WARN]:-*******************************************************
20171201:16:12:54:003888 gpinitsystem:bigdata01:gpadmin-[WARN]:-Scan of log file indicates that some warnings or errors
20171201:16:12:54:003888 gpinitsystem:bigdata01:gpadmin-[WARN]:-were generated during the array creation
20171201:16:12:54:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-Please review contents of log file
20171201:16:12:54:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-/home/gpadmin/gpAdminLogs/gpinitsystem_20171201.log
20171201:16:12:54:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-To determine level of criticality
20171201:16:12:54:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-These messages could be from a previous run of the utility
20171201:16:12:54:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-that was called today!
20171201:16:12:54:003888 gpinitsystem:bigdata01:gpadmin-[WARN]:-*******************************************************
20171201:16:12:54:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-Greenplum Database instance successfully created
20171201:16:12:54:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-------------------------------------------------------
20171201:16:12:54:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-To complete the environment configuration, please 
20171201:16:12:54:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-update gpadmin .bashrc file with the following
20171201:16:12:54:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-1. Ensure that the greenplum_path.sh file is sourced
20171201:16:12:54:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-2. Add "export MASTER_DATA_DIRECTORY=/data01/master/gpseg-1"
20171201:16:12:54:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-   to access the Greenplum scripts for this instance:
20171201:16:12:54:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-   or, use -d /data01/master/gpseg-1 option for the Greenplum scripts
20171201:16:12:54:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-   Example gpstate -d /data01/master/gpseg-1
20171201:16:12:54:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-Script log file = /home/gpadmin/gpAdminLogs/gpinitsystem_20171201.log
20171201:16:12:54:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-To remove instance, run gpdeletesystem utility
20171201:16:12:54:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-To initialize a Standby Master Segment for this Greenplum instance
20171201:16:12:54:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-Review options for gpinitstandby
20171201:16:12:54:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-------------------------------------------------------
20171201:16:12:54:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-The Master /data01/master/gpseg-1/pg_hba.conf post gpinitsystem
20171201:16:12:54:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-has been configured to allow all hosts within this new
20171201:16:12:54:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-array to intercommunicate. Any hosts external to this
20171201:16:12:54:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-new array must be explicitly added to this file
20171201:16:12:54:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-Refer to the Greenplum Admin support guide which is
20171201:16:12:54:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-located in the /opt/greenplum-db/./docs directory
20171201:16:12:54:003888 gpinitsystem:bigdata01:gpadmin-[INFO]:-------------------------------------------------------
[gpadmin@bigdata01 ~]$ 

四、简单测试

[gpadmin@bigdata01 ~]$  psql -p 5432 -d postgres
psql (8.2.15)
Type "help" for help.

postgres=# \l
                  List of databases
   Name    |  Owner  | Encoding |  Access privileges  
-----------+---------+----------+---------------------
 postgres  | gpadmin | UTF8     | 
 template0 | gpadmin | UTF8     | =c/gpadmin          
                                : gpadmin=CTc/gpadmin
 template1 | gpadmin | UTF8     | =c/gpadmin          
                                : gpadmin=CTc/gpadmin
(3 rows)

postgres=# \q
[gpadmin@bigdata01 ~]$ 
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 213,928评论 6 493
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 91,192评论 3 387
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 159,468评论 0 349
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 57,186评论 1 286
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 66,295评论 6 386
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 50,374评论 1 292
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 39,403评论 3 412
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 38,186评论 0 269
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 44,610评论 1 306
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 36,906评论 2 328
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 39,075评论 1 341
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 34,755评论 4 337
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 40,393评论 3 320
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 31,079评论 0 21
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 32,313评论 1 267
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 46,934评论 2 365
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 43,963评论 2 351

推荐阅读更多精彩内容

  • Android 自定义View的各种姿势1 Activity的显示之ViewRootImpl详解 Activity...
    passiontim阅读 171,926评论 25 707
  • Spring Cloud为开发人员提供了快速构建分布式系统中一些常见模式的工具(例如配置管理,服务发现,断路器,智...
    卡卡罗2017阅读 134,644评论 18 139
  • C讀經: - 以賽亞書61:1 主耶和華的靈在我身上.因為耶和華用膏膏我、叫我傳好信息給謙卑的人、〔或作傳福音給貧...
    NCNeverland阅读 116评论 0 0
  • 通过优势识别器2.0版本的测试,我的优势主题排列:成就、统筹、行动、前瞻、专注。从技术上讲,排在首位的是我最强的天...
    茶舍花开阅读 273评论 0 0
  • 析:世爻巳火,变出寅木子孙原神,子孙是解忧之神,又值旬空,故出空之甲寅日,患解事结。变卦六冲,灾患一冲即散,所以结...
    易如人生阅读 784评论 0 0