GreenPlum 大数据平台--安装
1. 环境准备
01, 安装包准备:
Greenplum : >>>>链接地址
Pgadmin客户端 : >>>链接地址
greenplum-cc-web监控: >>>>链接地址
02,节点说明
服务器ip | 主机名 | 角色 | 系统版本 |
192.168.0.221 | greenplum01 | master | centos7 |
192.168.0.222 | greenplum02 | Segment/standby | centos7 |
192.168.0.223 | greenplum03 | Segment | centos7 |
03,host文件配置(All)
echo -e "192.168.0.221 greenplum01\n192.168.0.222 greenplum02\n192.168.0.223 greenplum03" >>/etc/hosts scp /etc/hosts 192.168.0.222:/etc/hosts scp /etc/hosts 192.168.0.223:/etc/hosts
04,创建用户(ALL)
[root@greenplum01 ~]# groupadd -g 530 gpadmin [root@greenplum01 ~]# useradd -g 530 -m -d /home/gpadmin -s /bin/bash gpadmin [root@greenplum01 ~]# passwd gpadmin Changing password for user gpadmin. New password: BAD PASSWORD: The password is shorter than 8 characters Retype new password: passwd: all authentication tokens updated successfully. [root@greenplum02 ~]# groupadd -g 530 gpadmin [root@greenplum02 ~]# useradd -g 530 -m -d /home/gpadmin -s /bin/bash gpadmin [root@greenplum02 ~]# passwd gpadmin Changing password for user gpadmin. New password: BAD PASSWORD: The password is shorter than 8 characters Retype new password: passwd: all authentication tokens updated successfully. [root@greenplum03 ~]# groupadd -g 530 gpadmin [root@greenplum03 ~]# useradd -g 530 -m -d /home/gpadmin -s /bin/bash gpadmin [root@greenplum03 ~]# passwd gpadmin Changing password for user gpadmin. New password: BAD PASSWORD: The password is shorter than 8 characters Retype new password: passwd: all authentication tokens updated successfully.
05,内核参数修改(ALL)
echo ' 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 '>>/etc/sysctl.conf
sysctl -
06.打开数限制(ALL)
echo ' * soft nofile 65536 * hard nofile 65536 * soft nproc 131072 * hard nproc 131072 '>>/etc/security/limits.conf
07,关闭防火墙,selinux(ALL)
systemctl disable firewalld.service systemctl stop firewalld.service setenforce 0
08,创建需要的目录(ALL)
mkdir /greenplum
chown -R gpadmin:gpadmin /greenplum
二,安装greenplum(master节点)
01,安装
[root@greenplum01 ~]# ls anaconda-ks.cfg greenplum-cc-web-4.6.1-LINUX-x86_64 initial-setup-ks.cfg Templates Desktop greenplum-cc-web-4.6.1-LINUX-x86_64.zip Music Videos Documents greenplum-db-5.16.0-rhel7-x86_64.rpm Pictures Downloads Public [root@greenplum01 ~]# rpm -ivh greenplum-db-5.16.0-rhel7-x86_64.rpm Preparing... ################################# [100%] Updating / installing... 1:greenplum-db-5.16.0-1 ################################# [100%]
02,配置greeplum
chown -R gpadmin:gpadmin /usr/local/ su - gpadmin mkdir -p /home/gpadmin/conf vi /home/gpadmin/conf/hostlist greenplum01 greenplum02 greenplum03
再创建一个seg_hosts ,包含所有的Segment Host的主机名:
vi /home/gpadmin/conf/seg_hosts
greenplum02
greenplum03
03,配置链接
[gpadmin@greenplum01 ~]$ source /usr/local/greenplum-db/greenplum_path.sh [gpadmin@greenplum01 ~]$ gpssh-exkeys -f /home/gpadmin/conf/hostlist [STEP 1 of 5] create local ID and authorize on local host [STEP 2 of 5] keyscan all hosts and update known_hosts file [STEP 3 of 5] authorize current user on remote hosts ... send to greenplum02 *** *** Enter password for greenplum02: ... send to greenplum03 [STEP 4 of 5] determine common authentication file content [STEP 5 of 5] copy authentication files to all remote hosts ... finished key exchange with greenplum02 ... finished key exchange with greenplum03 [INFO] completed successfully
验证链接:
[gpadmin@greenplum01 ~]$ ssh greenplum02 [gpadmin@greenplum02 ~]$ exit logout Connection to greenplum02 clsed. [gpadmin@greenplum01 ~]$ ssh greenplum03 [gpadmin@greenplum02 ~]$ exit logout Connection to greenplum03 clsed.
三,安装其他节点的DB
01,权限授予
chown -R gpadmin:gpadmin /usr/local chown -R gpadmin:gpadmin /greenplum
02,数据打包
cd /usr/local
tar zcvf gp.tar greenplum-db-5.16.0/ gpscp -f /home/gpadmin/conf/seg_hosts gp.tar =:/usr/local/
03,解压缩
[gpadmin@greenplum01 ~]$ source /usr/local/greenplum-db/greenplum_path.sh [gpadmin@greenplum01 ~]$ gpssh -f /home/gpadmin/conf/seg_hosts => cd /usr/local [greenplum03] [greenplum02] => tar -xf gp.tar [greenplum03] [greenplum02] => ln -s ./greenplum-db-5.16.0/ greenplum-db [greenplum03] [greenplum02] => ll [greenplum03] total 271720 [greenplum03] drwxr-xr-x. 2 gpadmin gpadmin 6 Nov 5 2016 bin [greenplum03] drwxr-xr-x. 2 gpadmin gpadmin 6 Nov 5 2016 etc [greenplum03] drwxr-xr-x. 2 gpadmin gpadmin 6 Nov 5 2016 games [greenplum03] -rw-rw-r-- 1 gpadmin gpadmin 278239886 Mar 12 23:18 gp.tar [greenplum03] lrwxrwxrwx 1 gpadmin gpadmin 22 Mar 12 23:21 greenplum-db -> ./greenplum-db-5.16.0/ [greenplum03] drwxr-xr-x 11 gpadmin gpadmin 138 Mar 12 23:03 greenplum-db-5.16.0 [greenplum03] drwxr-xr-x. 2 gpadmin gpadmin 6 Nov 5 2016 include [greenplum03] drwxr-xr-x. 2 gpadmin gpadmin 6 Nov 5 2016 lib [greenplum03] drwxr-xr-x. 2 gpadmin gpadmin 6 Nov 5 2016 lib64 [greenplum03] drwxr-xr-x. 2 gpadmin gpadmin 6 Nov 5 2016 libexec [greenplum03] drwxr-xr-x. 2 gpadmin gpadmin 6 Nov 5 2016 sbin [greenplum03] drwxr-xr-x. 5 gpadmin gpadmin 49 Feb 18 22:35 share [greenplum03] drwxr-xr-x. 2 gpadmin gpadmin 6 Nov 5 2016 src [greenplum03] drwxrwxr-x 3 gpadmin gpadmin 19 Mar 12 23:21 usr [greenplum02] total 271720 [greenplum02] drwxr-xr-x. 2 gpadmin gpadmin 6 Nov 5 2016 bin [greenplum02] drwxr-xr-x. 2 gpadmin gpadmin 6 Nov 5 2016 etc [greenplum02] drwxr-xr-x. 2 gpadmin gpadmin 6 Nov 5 2016 games [greenplum02] -rw-rw-r-- 1 gpadmin gpadmin 278239886 Mar 12 23:18 gp.tar [greenplum02] lrwxrwxrwx 1 gpadmin gpadmin 22 Mar 12 23:21 greenplum-db -> ./greenplum-db-5.16.0/ [greenplum02] drwxr-xr-x 11 gpadmin gpadmin 138 Mar 12 23:03 greenplum-db-5.16.0 [greenplum02] drwxr-xr-x. 2 gpadmin gpadmin 6 Nov 5 2016 include [greenplum02] drwxr-xr-x. 2 gpadmin gpadmin 6 Nov 5 2016 lib [greenplum02] drwxr-xr-x. 2 gpadmin gpadmin 6 Nov 5 2016 lib64 [greenplum02] drwxr-xr-x. 2 gpadmin gpadmin 6 Nov 5 2016 libexec [greenplum02] drwxr-xr-x. 2 gpadmin gpadmin 6 Nov 5 2016 sbin [greenplum02] drwxr-xr-x. 5 gpadmin gpadmin 49 Feb 18 22:35 share [greenplum02] drwxr-xr-x. 2 gpadmin gpadmin 6 Nov 5 2016 src [greenplum02] drwxrwxr-x 3 gpadmin gpadmin 19 Mar 12 23:21 usr
四,初始化数据库
01,创建需要的资源目录
[gpadmin@greenplum01 ~]$ source /usr/local/greenplum-db/greenplum_path.sh [gpadmin@greenplum01 ~]$ gpssh -f /home/gpadmin/conf/hostlist => mkdir -p /greenplum/data/master [greenplum01] [greenplum02] [greenplum03] => mkdir -p /greenplum/data/primary [greenplum01] [greenplum02] [greenplum03] => mkdir -p /greenplum/data/mirror [greenplum01] [greenplum02] [greenplum03] => mkdir -p /greenplum/data2/primary [greenplum01] [greenplum02] [greenplum03] => mkdir -p /greenplum/data2/mirror [greenplum01] [greenplum02] [greenplum03] =>
02,节点配置环境(all)
[gpadmin@greenplum01 ~]$ vim .bash_profile source /usr/local/greenplum-db/greenplum_path.sh export MASTER_DATA_DIRECTORY=/greenplum/data/master/gpseg-1 export GPPORT=5432 export PGDATABASE=gp_db [gpadmin@greenplum01 ~]$ scp .bash_profile greenplum02:/home/gpadmin/ .bash_profile 100% 344 738.4KB/s 00:00 [gpadmin@greenplum01 ~]$ scp .bash_profile greenplum03:/home/gpadmin/ .bash_profile 100% 344 828.8KB/s 00:00 [gpadmin@greenplum01 ~]$ source .bash_profile
[gpadmin@greenplum02 ~]$ source .bash_profile
[gpadmin@greenplum03 ~]$ source .bash_profile
03,初始化检查
[gpadmin@greenplum01 ~]$ cd /usr/local/greenplum-db/bin/ [gpadmin@greenplum01 bin]$ gpcheckperf -f /home/gpadmin/conf/hostlist -r N -d /tmp /usr/local/greenplum-db/./bin/gpcheckperf -f /home/gpadmin/conf/hostlist -r N -d /tmp ------------------- -- NETPERF TEST ------------------- ==================== == RESULT ==================== Netperf bisection bandwidth test greenplum01 -> greenplum02 = 1654.370000 greenplum03 -> greenplum01 = 1156.950000 greenplum02 -> greenplum01 = 1183.980000 greenplum01 -> greenplum03 = 1363.620000 Summary: sum = 5358.92 MB/sec min = 1156.95 MB/sec max = 1654.37 MB/sec avg = 1339.73 MB/sec median = 1363.62 MB/sec
04,创建初始化文件
[gpadmin@greenplum01 conf]$ cp /usr/local/greenplum-db/docs/cli_help/gpconfigs/gpinitsystem_config ./initgp_config [gpadmin@greenplum01 conf]$ vim initgp_config [gpadmin@greenplum01 conf]$ grep -Ev '^#|^$' initgp_config ARRAY_NAME="Greenplum" SEG_PREFIX=gpseg PORT_BASE=6000 declare -a DATA_DIRECTORY=(/greenplum/data/primary /greenplum/data/primary /greenplum/data/primary /greenplum/data2/primary /greenplum/data2/primary /greenplum/data2/primary) declare -a MIRROR_DATA_DIRECTORY=(/greenplum/data/mirror /greenplum/data/mirror /greenplum/data/mirror /greenplum/data2/mirror /greenplum/data2/mirror /greenplum/data2/mirror) MASTER_HOSTNAME=greenplum01 MASTER_DIRECTORY=/greenplum/data/master MASTER_PORT=5432 TRUSTED_SHELL=ssh CHECK_POINT_SEGMENTS=8 ENCODING=UNICODE MIRROR_PORT_BASE=43000 REPLICATION_PORT_BASE=34000 MIRROR_REPLICATION_PORT_BASE=44000 MACHINE_LIST_FILE=/home/gpadmin/conf/seg_hosts
05,初始化
gpinitsystem -c /home/gpadmin/conf/initgp_config -s greenplum02
附上过程
1 [gpadmin@greenplum01 conf]$ gpinitsystem -c /home/gpadmin/conf/initgp_config -s greenplum02 2 20190313:01:49:23:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Checking configuration parameters, please wait... 3 20190313:01:49:23:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Reading Greenplum configuration file /home/gpadmin/conf/initgp_config 4 20190313:01:49:23:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Locale has not been set in /home/gpadmin/conf/initgp_config, will set to default value 5 20190313:01:49:23:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Locale set to en_US.utf8 6 20190313:01:49:23:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-No DATABASE_NAME set, will exit following template1 updates 7 20190313:01:49:23:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-MASTER_MAX_CONNECT not set, will set to default value 250 8 20190313:01:49:23:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Checking configuration parameters, Completed 9 20190313:01:49:23:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Commencing multi-home checks, please wait... 10 .. 11 20190313:01:49:24:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Configuring build for standard array 12 20190313:01:49:24:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Commencing multi-home checks, Completed 13 20190313:01:49:24:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Building primary segment instance array, please wait... 14 ............ 15 20190313:01:49:28:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Building group mirror array type , please wait... 16 ............ 17 20190313:01:49:32:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Checking Master host 18 20190313:01:49:32:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Checking new segment hosts, please wait... 19 ........................ 20 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Checking new segment hosts, Completed 21 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Greenplum Database Creation Parameters 22 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:--------------------------------------- 23 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Master Configuration 24 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:--------------------------------------- 25 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Master instance name = Greenplum 26 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Master hostname = greenplum01 27 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Master port = 5432 28 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Master instance dir = /greenplum/data/master/gpseg-1 29 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Master LOCALE = en_US.utf8 30 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Greenplum segment prefix = gpseg 31 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Master Database = 32 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Master connections = 250 33 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Master buffers = 128000kB 34 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Segment connections = 750 35 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Segment buffers = 128000kB 36 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Checkpoint segments = 8 37 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Encoding = UNICODE 38 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Postgres param file = Off 39 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Initdb to be used = /usr/local/greenplum-db/./bin/initdb 40 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-GP_LIBRARY_PATH is = /usr/local/greenplum-db/./lib 41 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-HEAP_CHECKSUM is = on 42 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-HBA_HOSTNAMES is = 0 43 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Ulimit check = Passed 44 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Array host connect type = Single hostname per node 45 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Master IP address [1] = ::1 46 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Master IP address [2] = 172.168.0.221 47 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Master IP address [3] = 192.168.0.221 48 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Master IP address [4] = fe80::58d2:b017:6803:188 49 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Master IP address [5] = fe80::5b46:68af:2341:babe 50 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Master IP address [6] = fe80::6b83:cde0:ac33:87bf 51 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Master IP address [7] = fe80::b210:3bd4:b0c0:2e17 52 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Master IP address [8] = fe80::c0ae:2a2:82a5:5f12 53 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Master IP address [9] = fe80::f144:3513:68ac:3356 54 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Standby Master = greenplum02 55 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Primary segment # = 6 56 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Standby IP address = ::1 57 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Standby IP address = 172.168.0.222 58 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Standby IP address = 192.168.0.222 59 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Standby IP address = fe80::58d2:b017:6803:188 60 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Standby IP address = fe80::5b46:68af:2341:babe 61 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Standby IP address = fe80::6b83:cde0:ac33:87bf 62 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Standby IP address = fe80::b210:3bd4:b0c0:2e17 63 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Standby IP address = fe80::c0ae:2a2:82a5:5f12 64 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Standby IP address = fe80::f144:3513:68ac:3356 65 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Total Database segments = 12 66 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Trusted shell = ssh 67 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Number segment hosts = 2 68 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Mirror port base = 43000 69 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Replicaton port base = 34000 70 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Mirror replicaton port base= 44000 71 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Mirror segment # = 6 72 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Mirroring config = ON 73 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Mirroring type = Group 74 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:---------------------------------------- 75 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Greenplum Primary Segment Configuration 76 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:---------------------------------------- 77 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-greenplum02 /greenplum/data/primary/gpseg0 6000 2 0 34000 78 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-greenplum02 /greenplum/data/primary/gpseg1 6001 3 1 34001 79 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-greenplum02 /greenplum/data/primary/gpseg2 6002 4 2 34002 80 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-greenplum02 /greenplum/data2/primary/gpseg3 6003 5 3 34003 81 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-greenplum02 /greenplum/data2/primary/gpseg4 6004 6 4 34004 82 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-greenplum02 /greenplum/data2/primary/gpseg5 6005 7 5 34005 83 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-greenplum03 /greenplum/data/primary/gpseg6 6000 8 6 34000 84 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-greenplum03 /greenplum/data/primary/gpseg7 6001 9 7 34001 85 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-greenplum03 /greenplum/data/primary/gpseg8 6002 10 8 34002 86 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-greenplum03 /greenplum/data2/primary/gpseg9 6003 11 9 34003 87 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-greenplum03 /greenplum/data2/primary/gpseg10 6004 12 10 34004 88 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-greenplum03 /greenplum/data2/primary/gpseg11 6005 13 11 34005 89 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:--------------------------------------- 90 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Greenplum Mirror Segment Configuration 91 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:--------------------------------------- 92 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-greenplum03 /greenplum/data/mirror/gpseg0 43000 14 0 44000 93 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-greenplum03 /greenplum/data/mirror/gpseg1 43001 15 1 44001 94 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-greenplum03 /greenplum/data/mirror/gpseg2 43002 16 2 44002 95 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-greenplum03 /greenplum/data2/mirror/gpseg3 43003 17 3 44003 96 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-greenplum03 /greenplum/data2/mirror/gpseg4 43004 18 4 44004 97 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-greenplum03 /greenplum/data2/mirror/gpseg5 43005 19 5 44005 98 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-greenplum02 /greenplum/data/mirror/gpseg6 43000 20 6 44000 99 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-greenplum02 /greenplum/data/mirror/gpseg7 43001 21 7 44001 100 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-greenplum02 /greenplum/data/mirror/gpseg8 43002 22 8 44002 101 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-greenplum02 /greenplum/data2/mirror/gpseg9 43003 23 9 44003 102 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-greenplum02 /greenplum/data2/mirror/gpseg10 43004 24 10 44004 103 20190313:01:49:48:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-greenplum02 /greenplum/data2/mirror/gpseg11 43005 25 11 44005 104 105 Continue with Greenplum creation Yy|Nn (default=N): 106 > y 107 20190313:01:51:01:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Building the Master instance database, please wait... 108 20190313:01:51:06:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Starting the Master in admin mode 109 20190313:01:51:16:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Commencing parallel build of primary segment instances 110 20190313:01:51:16:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Spawning parallel processes batch [1], please wait... 111 ............ 112 20190313:01:51:16:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Waiting for parallel processes batch [1], please wait... 113 ................................... 114 20190313:01:51:51:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:------------------------------------------------ 115 20190313:01:51:51:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Parallel process exit status 116 20190313:01:51:51:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:------------------------------------------------ 117 20190313:01:51:51:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Total processes marked as completed = 12 118 20190313:01:51:51:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Total processes marked as killed = 0 119 20190313:01:51:51:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Total processes marked as failed = 0 120 20190313:01:51:51:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:------------------------------------------------ 121 20190313:01:51:51:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Commencing parallel build of mirror segment instances 122 20190313:01:51:51:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Spawning parallel processes batch [1], please wait... 123 ............ 124 20190313:01:51:51:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Waiting for parallel processes batch [1], please wait... 125 ................... 126 20190313:01:52:10:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:------------------------------------------------ 127 20190313:01:52:10:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Parallel process exit status 128 20190313:01:52:10:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:------------------------------------------------ 129 20190313:01:52:10:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Total processes marked as completed = 12 130 20190313:01:52:10:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Total processes marked as killed = 0 131 20190313:01:52:10:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Total processes marked as failed = 0 132 20190313:01:52:10:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:------------------------------------------------ 133 20190313:01:52:11:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Deleting distributed backout files 134 20190313:01:52:11:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Removing back out file 135 20190313:01:52:11:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-No errors generated from parallel processes 136 20190313:01:52:11:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Restarting the Greenplum instance in production mode 137 20190313:01:52:11:021327 gpstop:greenplum01:gpadmin-[INFO]:-Starting gpstop with args: -a -l /home/gpadmin/gpAdminLogs -i -m -d /greenplum/data/master/gpseg-1 138 20190313:01:52:11:021327 gpstop:greenplum01:gpadmin-[INFO]:-Gathering information and validating the environment... 139 20190313:01:52:11:021327 gpstop:greenplum01:gpadmin-[INFO]:-Obtaining Greenplum Master catalog information 140 20190313:01:52:11:021327 gpstop:greenplum01:gpadmin-[INFO]:-Obtaining Segment details from master... 141 20190313:01:52:11:021327 gpstop:greenplum01:gpadmin-[INFO]:-Greenplum Version: 'postgres (Greenplum Database) 5.16.0 build commit:23cec7df0406d69d6552a4bbb77035dba4d7dd44' 142 20190313:01:52:11:021327 gpstop:greenplum01:gpadmin-[INFO]:-There are 0 connections to the database 143 20190313:01:52:11:021327 gpstop:greenplum01:gpadmin-[INFO]:-Commencing Master instance shutdown with mode='immediate' 144 20190313:01:52:11:021327 gpstop:greenplum01:gpadmin-[INFO]:-Master host=greenplum01 145 20190313:01:52:11:021327 gpstop:greenplum01:gpadmin-[INFO]:-Commencing Master instance shutdown with mode=immediate 146 20190313:01:52:11:021327 gpstop:greenplum01:gpadmin-[INFO]:-Master segment instance directory=/greenplum/data/master/gpseg-1 147 20190313:01:52:12:021327 gpstop:greenplum01:gpadmin-[INFO]:-Attempting forceful termination of any leftover master process 148 20190313:01:52:12:021327 gpstop:greenplum01:gpadmin-[INFO]:-Terminating processes for segment /greenplum/data/master/gpseg-1 149 20190313:01:52:12:021353 gpstart:greenplum01:gpadmin-[INFO]:-Starting gpstart with args: -a -l /home/gpadmin/gpAdminLogs -d /greenplum/data/master/gpseg-1 150 20190313:01:52:12:021353 gpstart:greenplum01:gpadmin-[INFO]:-Gathering information and validating the environment... 151 20190313:01:52:12:021353 gpstart:greenplum01:gpadmin-[INFO]:-Greenplum Binary Version: 'postgres (Greenplum Database) 5.16.0 build commit:23cec7df0406d69d6552a4bbb77035dba4d7dd44' 152 20190313:01:52:12:021353 gpstart:greenplum01:gpadmin-[INFO]:-Greenplum Catalog Version: '301705051' 153 20190313:01:52:12:021353 gpstart:greenplum01:gpadmin-[INFO]:-Starting Master instance in admin mode 154 20190313:01:52:13:021353 gpstart:greenplum01:gpadmin-[INFO]:-Obtaining Greenplum Master catalog information 155 20190313:01:52:13:021353 gpstart:greenplum01:gpadmin-[INFO]:-Obtaining Segment details from master... 156 20190313:01:52:13:021353 gpstart:greenplum01:gpadmin-[INFO]:-Setting new master era 157 20190313:01:52:13:021353 gpstart:greenplum01:gpadmin-[INFO]:-Master Started... 158 20190313:01:52:13:021353 gpstart:greenplum01:gpadmin-[INFO]:-Shutting down master 159 20190313:01:52:15:021353 gpstart:greenplum01:gpadmin-[INFO]:-Commencing parallel primary and mirror segment instance startup, please wait... 160 ..... 161 20190313:01:52:20:021353 gpstart:greenplum01:gpadmin-[INFO]:-Process results... 162 20190313:01:52:20:021353 gpstart:greenplum01:gpadmin-[INFO]:----------------------------------------------------- 163 20190313:01:52:20:021353 gpstart:greenplum01:gpadmin-[INFO]:- Successful segment starts = 24 164 20190313:01:52:20:021353 gpstart:greenplum01:gpadmin-[INFO]:- Failed segment starts = 0 165 20190313:01:52:20:021353 gpstart:greenplum01:gpadmin-[INFO]:- Skipped segment starts (segments are marked down in configuration) = 0 166 20190313:01:52:20:021353 gpstart:greenplum01:gpadmin-[INFO]:----------------------------------------------------- 167 20190313:01:52:20:021353 gpstart:greenplum01:gpadmin-[INFO]:-Successfully started 24 of 24 segment instances 168 20190313:01:52:20:021353 gpstart:greenplum01:gpadmin-[INFO]:----------------------------------------------------- 169 20190313:01:52:20:021353 gpstart:greenplum01:gpadmin-[INFO]:-Starting Master instance greenplum01 directory /greenplum/data/master/gpseg-1 170 20190313:01:52:21:021353 gpstart:greenplum01:gpadmin-[INFO]:-Command pg_ctl reports Master greenplum01 instance active 171 20190313:01:52:21:021353 gpstart:greenplum01:gpadmin-[INFO]:-No standby master configured. skipping... 172 20190313:01:52:21:021353 gpstart:greenplum01:gpadmin-[INFO]:-Database successfully started 173 20190313:01:52:21:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Completed restart of Greenplum instance inproduction mode 174 20190313:01:52:21:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Starting initialization of standby master greenplum02 175 20190313:01:52:21:021497 gpinitstandby:greenplum01:gpadmin-[INFO]:-Validating environment and parameters forstandby initialization... 176 20190313:01:52:21:021497 gpinitstandby:greenplum01:gpadmin-[INFO]:-Checking for filespace directory /greenplum/data/master/gpseg-1 on greenplum02 177 20190313:01:52:21:021497 gpinitstandby:greenplum01:gpadmin-[INFO]:------------------------------------------------------ 178 20190313:01:52:21:021497 gpinitstandby:greenplum01:gpadmin-[INFO]:-Greenplum standby master initialization parameters 179 20190313:01:52:21:021497 gpinitstandby:greenplum01:gpadmin-[INFO]:------------------------------------------------------ 180 20190313:01:52:21:021497 gpinitstandby:greenplum01:gpadmin-[INFO]:-Greenplum master hostname =greenplum01 181 20190313:01:52:21:021497 gpinitstandby:greenplum01:gpadmin-[INFO]:-Greenplum master data directory =/greenplum/data/master/gpseg-1 182 20190313:01:52:21:021497 gpinitstandby:greenplum01:gpadmin-[INFO]:-Greenplum master port =5432 183 20190313:01:52:21:021497 gpinitstandby:greenplum01:gpadmin-[INFO]:-Greenplum standby master hostname =greenplum02 184 20190313:01:52:21:021497 gpinitstandby:greenplum01:gpadmin-[INFO]:-Greenplum standby master port =5432 185 20190313:01:52:21:021497 gpinitstandby:greenplum01:gpadmin-[INFO]:-Greenplum standby master data directory =/greenplum/data/master/gpseg-1 186 20190313:01:52:21:021497 gpinitstandby:greenplum01:gpadmin-[INFO]:-Greenplum update system catalog =On 187 20190313:01:52:21:021497 gpinitstandby:greenplum01:gpadmin-[INFO]:------------------------------------------------------ 188 20190313:01:52:21:021497 gpinitstandby:greenplum01:gpadmin-[INFO]:- Filespace locations 189 20190313:01:52:21:021497 gpinitstandby:greenplum01:gpadmin-[INFO]:------------------------------------------------------ 190 20190313:01:52:21:021497 gpinitstandby:greenplum01:gpadmin-[INFO]:-pg_system -> /greenplum/data/master/gpseg-1 191 20190313:01:52:21:021497 gpinitstandby:greenplum01:gpadmin-[INFO]:-Syncing Greenplum Database extensions to standby 192 20190313:01:52:22:021497 gpinitstandby:greenplum01:gpadmin-[INFO]:-The packages on greenplum02 are consistent. 193 20190313:01:52:22:021497 gpinitstandby:greenplum01:gpadmin-[INFO]:-Adding standby master to catalog... 194 20190313:01:52:22:021497 gpinitstandby:greenplum01:gpadmin-[INFO]:-Database catalog updated successfully. 195 20190313:01:52:22:021497 gpinitstandby:greenplum01:gpadmin-[INFO]:-Updating pg_hba.conf file... 196 20190313:01:52:23:021497 gpinitstandby:greenplum01:gpadmin-[INFO]:-pg_hba.conf files updated successfully. 197 20190313:01:52:24:021497 gpinitstandby:greenplum01:gpadmin-[INFO]:-Updating filespace flat files... 198 20190313:01:52:24:021497 gpinitstandby:greenplum01:gpadmin-[INFO]:-Filespace flat file updated successfully. 199 20190313:01:52:24:021497 gpinitstandby:greenplum01:gpadmin-[INFO]:-Starting standby master 200 20190313:01:52:24:021497 gpinitstandby:greenplum01:gpadmin-[INFO]:-Checking if standby master is running on host: greenplum02 in directory: /greenplum/data/master/gpseg-1 201 20190313:01:52:25:021497 gpinitstandby:greenplum01:gpadmin-[INFO]:-Cleaning up pg_hba.conf backup files... 202 20190313:01:52:26:021497 gpinitstandby:greenplum01:gpadmin-[INFO]:-Backup files of pg_hba.conf cleaned up successfully. 203 20190313:01:52:26:021497 gpinitstandby:greenplum01:gpadmin-[INFO]:-Successfully created standby master on greenplum02 204 20190313:01:52:26:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Successfully completed standby master initialization 205 20190313:01:52:26:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Scanning utility log file for any warning messages 206 20190313:01:52:26:007228 gpinitsystem:greenplum01:gpadmin-[WARN]:-******************************************************* 207 20190313:01:52:26:007228 gpinitsystem:greenplum01:gpadmin-[WARN]:-Scan of log file indicates that some warnings or errors 208 20190313:01:52:26:007228 gpinitsystem:greenplum01:gpadmin-[WARN]:-were generated during the array creation 209 20190313:01:52:26:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Please review contents of log file 210 20190313:01:52:26:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-/home/gpadmin/gpAdminLogs/gpinitsystem_20190313.log 211 20190313:01:52:26:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-To determine level of criticality 212 20190313:01:52:26:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-These messages could be from a previous run of the utility 213 20190313:01:52:26:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-that was called today! 214 20190313:01:52:26:007228 gpinitsystem:greenplum01:gpadmin-[WARN]:-******************************************************* 215 20190313:01:52:26:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Greenplum Database instance successfully created 216 20190313:01:52:26:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:------------------------------------------------------- 217 20190313:01:52:26:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-To complete the environment configuration,please 218 20190313:01:52:26:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-update gpadmin .bashrc file with the following 219 20190313:01:52:26:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-1. Ensure that the greenplum_path.sh file is sourced 220 20190313:01:52:26:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-2. Add "export MASTER_DATA_DIRECTORY=/greenplum/data/master/gpseg-1" 221 20190313:01:52:26:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:- to access the Greenplum scripts for this instance: 222 20190313:01:52:26:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:- or, use -d /greenplum/data/master/gpseg-1 option for the Greenplum scripts 223 20190313:01:52:26:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:- Example gpstate -d /greenplum/data/master/gpseg-1 224 20190313:01:52:26:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Script log file = /home/gpadmin/gpAdminLogs/gpinitsystem_20190313.log 225 20190313:01:52:26:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-To remove instance, run gpdeletesystem utility 226 20190313:01:52:26:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Standby Master greenplum02 has been configured 227 20190313:01:52:26:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-To activate the Standby Master Segment in the event of Master 228 20190313:01:52:26:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-failure review options for gpactivatestandby 229 20190313:01:52:26:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:------------------------------------------------------- 230 20190313:01:52:26:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-The Master /greenplum/data/master/gpseg-1/pg_hba.conf post gpinitsystem 231 20190313:01:52:26:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-has been configured to allow all hosts within this new 232 20190313:01:52:26:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-array to intercommunicate. Any hosts external to this 233 20190313:01:52:26:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-new array must be explicitly added to thisfile 234 20190313:01:52:26:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-Refer to the Greenplum Admin support guidewhich is 235 20190313:01:52:26:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-located in the /usr/local/greenplum-db/./docs directory 236 20190313:01:52:26:007228 gpinitsystem:greenplum01:gpadmin-[INFO]:-------------------------------------------------------
安装完毕
简单使用:
standby 检查
人生就像一滴水,非要落下才后悔!
--kingle