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 ~]$ 

你可能感兴趣的:(Greenplum安装)