《Docker系列》Docker安装GreenPlum集群
Docker安装GreenPlum集群
一、创建容器
## 启动docer
[root@zxy_master ~]# systemctl start docker
## 拉取centos镜像,使用6.8和latest下载的镜像,在容器中都没法使用yum
## 使用centos7,可以正常使用yum
[root@zxy_master ~]# docker pull centos:7
7: Pulling from library/centos
2d473b07cdd5: Pull complete
Digest: sha256:c73f515d06b0fa07bb18d8202035e739a494ce760aa73129f60f4bf2bd22b407
Status: Downloaded newer image for centos:7
docker.io/library/centos:7
## 查看镜像
[root@zxy_master /]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
centos 7 eeb6ee3f44bd 6 months ago 204MB
## 创建容器并进入容器
[root@zxy_master /]# sudo docker run -d --name mdw --privileged=true eeb6ee3f44bd /usr/sbin/init
[root@zxy_master /]# sudo docker run -d --name sdw1 --privileged=true eeb6ee3f44bd /usr/sbin/init
[root@zxy_master /]# sudo docker run -d --name sdw2 --privileged=true eeb6ee3f44bd /usr/sbin/init
[root@zxy_master /]# sudo docker run -d --name sdw3 --privileged=true eeb6ee3f44bd /usr/sbin/init
二、启动Docker容器
## 查看所有docker容器
[root@zxy_master /]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
e52a14e99e90 eeb6ee3f44bd "/usr/sbin/init" 5 seconds ago Up 3 seconds sdw3
17958fb5ddb1 eeb6ee3f44bd "/usr/sbin/init" 10 seconds ago Up 9 seconds sdw2
8853f886b356 eeb6ee3f44bd "/usr/sbin/init" 18 seconds ago Up 16 seconds sdw1
d4f6ce1daac3 eeb6ee3f44bd "/usr/sbin/init" 9 minutes ago Up 9 minutes mdw
## 启动集群
[root@zxy_master /]# docker start d4f6ce1daac3
dc2a65dbe4bd
[root@zxy_master /]# docker start 8853f886b356
0124f396849e
[root@zxy_master /]# docker start 17958fb5ddb1
ce93908af614
[root@zxy_master /]# docker start e52a14e99e90
433f460ae838
## 查看所有启动docker容器
[root@zxy_master /]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
e52a14e99e90 eeb6ee3f44bd "/usr/sbin/init" About a minute ago Up About a minute sdw3
17958fb5ddb1 eeb6ee3f44bd "/usr/sbin/init" About a minute ago Up About a minute sdw2
8853f886b356 eeb6ee3f44bd "/usr/sbin/init" About a minute ago Up About a minute sdw1
d4f6ce1daac3 eeb6ee3f44bd "/usr/sbin/init" 10 minutes ago Up 10 minutes mdw
## 依次启动
[root@zxy_master /]# docker exec -it d4f6ce1daac3 /bin/bash
[root@zxy_master ~]# docker exec -it 8853f886b356 /bin/bash
[root@zxy_master ~]# docker exec -it 17958fb5ddb1 /bin/bash
[root@zxy_master ~]# docker exec -it e52a14e99e90 /bin/bash
三、docker集群部署
1.安装相关的依赖包(所有节点操作)
由于拉取docker的centos镜像是一个简化版本,里面有一些程序没有默认安装,会影响到gp的部署,因为在每个docker容器中安装相关的依赖包
yum install -y net-tools which openssh-clients openssh-server less zip unzip iproute.x86_64
2.免密操作(所有节点操作)
ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key
ssh-keygen -t ecdsa -f /etc/ssh/ssh_host_ecdsa_key
ssh-keygen -t ed25519 -f /etc/ssh/ssh_host_ed25519_key
/usr/sbin/sshd
3.修改/etc/hosts(所有节点操作)
## 修改为以下内容
172.17.0.2 d4f6ce1daac3
172.17.0.3 8853f886b356
172.17.0.4 17958fb5ddb1
172.17.0.5 e52a14e99e90
172.17.0.2 dw-greenplum-1 mdw
172.17.0.3 dw-greenplum-2 sdw1
172.17.0.4 dw-greenplum-3 sdw2
172.17.0.5 dw-greenplum-4 sdw3
4.修改/etc/sysconfig/network(所有节点操作)
[root@gp1 sysconfig]# cat network
NETWORKING=yes
HOSTNAME=mdw
[root@gp2 sysconfig]# cat network
NETWORKING=yes
HOSTNAME=sdw1
[root@gp3 sysconfig]# cat network
NETWORKING=yes
HOSTNAME=sdw2
[root@gp4 sysconfig]# cat network
NETWORKING=yes
HOSTNAME=sdw3
5.创建用户/用户组(所有节点操作)
groupadd -g 530 gpadmin
useradd -g 530 -u 530 -m -d /home/gpadmin -s /bin/bash gpadmin
chown -R gpadmin:gpadmin /home/gpadmin
passwd gpadmin
##密码设置为gpadmin
6.关闭防火墙和selinux(所有节点操作)
## 未发现firewalld,安装firewalld
yum -y install firewalld
## 关闭firewalld
systemctl stop firewalld
## 未发现/etc/sysconfig/selinux文件
## 1.安装setroubleshoot-server
[root@d4f6ce1daac3 sysconfig]# yum install setroubleshoot-server
[root@8853f886b356 sysconfig]# yum install setroubleshoot-server
[root@17958fb5ddb1 sysconfig]# yum install setroubleshoot-server
[root@e52a14e99e90 sysconfig]# yum install setroubleshoot-server
## 2.将主机中的selinux文件复制到容器
[root@zxy_master /]# docker cp ../selinux/ d4f6ce1daac3:/etc/
[root@zxy_master /]# docker cp ../selinux/ 8853f886b356:/etc/
[root@zxy_master /]# docker cp ../selinux/ 17958fb5ddb1:/etc/
[root@zxy_master /]# docker cp ../selinux/ e52a14e99e90:/etc/
## 3.在每个容器的/etc/sysconfig中创建全连接
[root@d4f6ce1daac3 sysconfig]# ln -s ../selinux/config selinux
[root@8853f886b356 sysconfig]# ln -s ../selinux/config selinux
[root@17958fb5ddb1 sysconfig]# ln -s ../selinux/config selinux
[root@e52a14e99e90 sysconfig]# ln -s ../selinux/config selinux
## 4.例如:查看文件内容,主要查看SELINUX=disabled
[root@d4f6ce1daac3 sysconfig]# cat selinux
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of three values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are protected.
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
## 执行命令成功
[root@d4f6ce1daac3 sysconfig]# getenforce
Disabled
7.将gp上传至容器mdw
[root@zxy_master software]# docker cp greenplum-db-6.4.0-rhel6-x86_64.rpm d4f6ce1daac3:/home/gpadmin
[root@zxy_master software]#
8.安装gp(mdw节点)
## rpm安装greenplum
[root@gp1 gpadmin]# rpm -ivh --relocate /usr/local/=/home/gpadmin/ ./greenplum-db-6.4.0-rhel6-x86_64.rpm
error: Failed dependencies:
apr is needed by greenplum-db-6.4.0-1.el6.x86_64
apr-util is needed by greenplum-db-6.4.0-1.el6.x86_64
bzip2 is needed by greenplum-db-6.4.0-1.el6.x86_64
krb5-devel is needed by greenplum-db-6.4.0-1.el6.x86_64
libevent is needed by greenplum-db-6.4.0-1.el6.x86_64
libyaml is needed by greenplum-db-6.4.0-1.el6.x86_64
openssl is needed by greenplum-db-6.4.0-1.el6.x86_64
rsync is needed by greenplum-db-6.4.0-1.el6.x86_64
[root@gp1 gpadmin]# yum -y install apr apr-util bzip2 krb5-devel libevent libyaml openssl rsync
[root@d4f6ce1daac3 gpadmin]# rpm -ivh --relocate /usr/local/=/home/gpadmin/ ./greenplum-db-6.4.0-rhel6-x86_64.rpm
Preparing... ################################# [100-%]
Updating / installing...
1:greenplum-db-6.4.0-1.el6 ########################### ( 81%)
[root@d4f6ce1daac3 gpadmin]# ls
greenplum-db greenplum-db-6.4.0 greenplum-db-6.4.0-rhel6-x86_64.rpm
[root@d4f6ce1daac3 gpadmin]#
## 配置集群节点文件
[root@d4f6ce1daac3 config]# mkdir config
[root@d4f6ce1daac3 config]# vim all_hosts
mdw
sdw1
sdw2
sdw3
[root@d4f6ce1daac3 config]# vim seg_hosts
sdw1
sdw2
sdw3
[root@d4f6ce1daac3 gpadmin]# ls
config greenplum-db greenplum-db-6.4.0
8.完成安装配置(mdw节点)
## 创建gpadmin用户后使用
[root@d4f6ce1daac3 gpadmin]# chown -R gpadmin ../gpadmin/
[root@d4f6ce1daac3 gpadmin]# chgrp -R gpadmin ../gpadmin/
## 切换用户
[root@d4f6ce1daac3 gpadmin]# su gpadmin
## 查看
[gpadmin@d4f6ce1daac3 ~]$ ll
total 8
drwxr-xr-x 2 gpadmin gpadmin 4096 Mar 25 16:04 config
lrwxrwxrwx 1 gpadmin gpadmin 32 Mar 25 15:52 greenplum-db -> /home/gpadmin/greenplum-db-6.4.0
drwxr-xr-x 12 gpadmin gpadmin 4096 Mar 25 15:52 greenplum-db-6.4.0
## 配置环境变量
[gpadmin@d4f6ce1daac3 ~]$ source greenplum-db/greenplum_path.sh
## 查看环境变量
[gpadmin@d4f6ce1daac3 ~]$ echo $GPHOME
/home/gpadmin/greenplum-db/.
9.修改容器root密码(所有节点相同操作)
[root@d4f6ce1daac3 gpadmin]# passwd
Changing password for user root.
New password: 111213
BAD PASSWORD: The password is shorter than 8 characters
Retype new password: 111213
passwd: all authentication tokens updated successfully.
10.免密操作(所有节点)
## mdw节点
[root@d4f6ce1daac3 .ssh]# ssh-keygen -t rsa
[root@d4f6ce1daac3 .ssh]# ssh-copy-id -i ~/.ssh/id_rsa.pub root@172.17.0.2
[root@d4f6ce1daac3 .ssh]# ssh-copy-id -i ~/.ssh/id_rsa.pub root@172.17.0.3
[root@d4f6ce1daac3 .ssh]# ssh-copy-id -i ~/.ssh/id_rsa.pub root@172.17.0.4
[root@d4f6ce1daac3 .ssh]# ssh-copy-id -i ~/.ssh/id_rsa.pub root@172.17.0.5
## sdw1
[root@8853f886b356 .ssh]# ssh-keygen -t rsa
[root@8853f886b356 .ssh]# ssh-copy-id -i ~/.ssh/id_rsa.pub root@172.17.0.2
[root@8853f886b356 .ssh]# ssh-copy-id -i ~/.ssh/id_rsa.pub root@172.17.0.3
[root@8853f886b356 .ssh]# ssh-copy-id -i ~/.ssh/id_rsa.pub root@172.17.0.4
[root@8853f886b356 .ssh]# ssh-copy-id -i ~/.ssh/id_rsa.pub root@172.17.0.5
## sdw2
[root@17958fb5ddb1 .ssh]# ssh-keygen -t rsa
[root@17958fb5ddb1 .ssh]# ssh-copy-id -i ~/.ssh/id_rsa.pub root@172.17.0.2
[root@17958fb5ddb1 .ssh]# ssh-copy-id -i ~/.ssh/id_rsa.pub root@172.17.0.3
[root@17958fb5ddb1 .ssh]# ssh-copy-id -i ~/.ssh/id_rsa.pub root@172.17.0.4
[root@17958fb5ddb1 .ssh]# ssh-copy-id -i ~/.ssh/id_rsa.pub root@172.17.0.5
## sdw3
[root@e52a14e99e90 .ssh]# ssh-keygen -t rsa
[root@e52a14e99e90 .ssh]# ssh-copy-id -i ~/.ssh/id_rsa.pub root@172.17.0.2
[root@e52a14e99e90 .ssh]# ssh-copy-id -i ~/.ssh/id_rsa.pub root@172.17.0.3
[root@e52a14e99e90 .ssh]# ssh-copy-id -i ~/.ssh/id_rsa.pub root@172.17.0.4
[root@e52a14e99e90 .ssh]# ssh-copy-id -i ~/.ssh/id_rsa.pub root@172.17.0.5
11.打通集群中所有机器(mdw节点)
[root@d4f6ce1daac3 bin]# gpssh-exkeys -f /home/gpadmin/config/all_hosts
[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] retrieving credentials from remote hosts
... send to mdw
... send to sdw1
... send to sdw2
... send to sdw3
[STEP 4 of 5] determine common authentication file content
[STEP 5 of 5] copy authentication files to all remote hosts
... finished key exchange with mdw
... finished key exchange with sdw1
... finished key exchange with sdw2
... finished key exchange with sdw3
[INFO] completed successfully
[root@d4f6ce1daac3 bin]#
12.登录到所有机器(mdw节点)
[root@d4f6ce1daac3 bin]# gpssh -f /home/gpadmin/config/all_hosts
=> ls
[sdw1] anaconda-ks.cfg
[sdw3] anaconda-ks.cfg
[sdw2] anaconda-ks.cfg
[ mdw] anaconda-ks.cfg
=>
13.打包greenplum-db-6.4.0(mdw节点)
[root@d4f6ce1daac3 gpadmin]# tar -cf gp-6.4.0.tar greenplum-db-6.4.0/
[root@d4f6ce1daac3 gpadmin]# ll
total 510588
drwxr-xr-x 2 gpadmin gpadmin 4096 Mar 25 16:04 config
-rw-r--r-- 1 root root 522833920 Mar 26 03:37 gp-6.4.0.tar
lrwxrwxrwx 1 gpadmin gpadmin 32 Mar 25 15:52 greenplum-db -> /home/gpadmin/greenplum-db-6.4.0
drwxr-xr-x 12 gpadmin gpadmin 4096 Mar 25 15:52 greenplum-db-6.4.0
14.将打包文件发送至各个节点(mdw节点)
[root@d4f6ce1daac3 bin]# gpscp -f /home/gpadmin/config/seg_hosts /home/gpadmin/gp-6.4.0.tar =:/home/gpadmin/
15.连接各个节点并解压(mdw节点)
## 连接所有segment节点
[root@d4f6ce1daac3 bin]# gpssh -f /home/gpadmin/config/seg_hosts
## 进入到gpadmin目录
=> cd /home/gpadmin
[sdw2]
[sdw1]
[sdw3]
## 查看目录内容
=> ls
[sdw2] gp-6.4.0.tar
[sdw1] gp-6.4.0.tar
[sdw3] gp-6.4.0.tar
## 解压mdw传过来的文件
=> tar -xf gp-6.4.0.tar
[sdw2]
[sdw1]
[sdw3]
## 查看解压成功后的结果
=> ls
[sdw2] gp-6.4.0.tar greenplum-db-6.4.0
[sdw1] gp-6.4.0.tar greenplum-db-6.4.0
[sdw3] gp-6.4.0.tar greenplum-db-6.4.0
## 创建软连接
=> ln -s ./greenplum-db-6.4.0 greenplum-db
[sdw2]
[sdw1]
[sdw3]
## 查看创建软连接后的结果
=> ls
[sdw2] gp-6.4.0.tar greenplum-db greenplum-db-6.4.0
[sdw1] gp-6.4.0.tar greenplum-db greenplum-db-6.4.0
[sdw3] gp-6.4.0.tar greenplum-db greenplum-db-6.4.0
=>
16.创建文件目录(mdw节点)
## 连接所有节点
[root@d4f6ce1daac3 bin]# gpssh -f /home/gpadmin/config/all_hosts
## 创建gpdata目录
=> mkdir /home/gpadmin/gpdata
[sdw1]
[sdw2]
[ mdw]
[sdw3]
=> cd gpdata
[sdw1]
[sdw2]
[ mdw]
[sdw3]
## 创建数据存储节点
=> mkdir gpmaster gpdatap1 gpdatap2 gpdatap3 gpdatam1 gpdatam2 gpdatam3
[sdw1]
[sdw2]
[ mdw]
[sdw3]
=> ls
[sdw1] gpdatam1 gpdatam2 gpdatam3 gpdatap1 gpdatap2 gpdatap3 gpmaster
[sdw2] gpdatam1 gpdatam2 gpdatam3 gpdatap1 gpdatap2 gpdatap3 gpmaster
[ mdw] gpdatam1 gpdatam2 gpdatam3 gpdatap1 gpdatap2 gpdatap3 gpmaster
[sdw3] gpdatam1 gpdatam2 gpdatam3 gpdatap1 gpdatap2 gpdatap3 gpmaster
=> exit
17.配置换变量(所有节点)
## 编辑.bash_profile文件,添加以下内容
[root@d4f6ce1daac3 ~]# vim .bash_profile
source /home/gpadmin/greenplum-db/greenplum_path.sh
export MASTER_DATA_DIRECTORY=/home/gpadmin/gpdata/gpmaster/gpseg-1
export PGPORT=2345
export PGDATABASE=zxy
## 刷新资源文件
[root@d4f6ce1daac3 ~]# source .bash_profile
## .bash_profile文件整体内容如下:
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
source /home/gpadmin/greenplum-db/greenplum_path.sh
export MASTER_DATA_DIRECTORY=/home/gpadmin/gpdata/gpmaster/gpseg-1
export PGPORT=2345
export PGDATABASE=zxy
18.创建初始化文件(所有节点)
[gpadmin@mdw ~]$ cat /home/gpadmin/conf/gpinitsystem_config
ARRAY_NAME="Greenplum"
MACHINE_LIST_FILE=/home/gpadmin/config/seg_hosts
# Segment 的名称前缀
SEG_PREFIX=gpseg
# Primary Segment 起始的端口号
PORT_BASE=33000
# 指定 Primary Segment 的数据目录
declare -a DATA_DIRECTORY=(/home/gpadmin/gpdata/gpdatap1 /home/gpadmin/gpdata/gpdatap2 /home/gpadmin/gpdata/gpdatap3)
# Master 所在机器的 Hostname
MASTER_HOSTNAME=d4f6ce1daac3
# 指定 Master 的数据目录
MASTER_DIRECTORY=/home/gpadmin/gpdata/gpmaster
# Master 的端口
MASTER_PORT=2345
# 指定Bash的版本
TRUSTED_SHELL=/usr/bin/ssh
# Mirror Segment起始的端口号
MIRROR_PORT_BASE=43000
# Primary Segment 主备同步的起始端口号
REPLICATION_PORT_BASE=34000
# Mirror Segment 主备同步的起始端口号
MIRROR_REPLICATION_PORT_BASE=44000
# Mirror Segment 的数据目录
declare -a MIRROR_DATA_DIRECTORY=(/home/gpadmin/gpdata/gpdatam1 /home/gpadmin/gpdata/gpdatam2 /home/gpadmin/gpdata/gpdatam3)
19.从节点创建config文件,将主节点gpinitsystem_config发送至个节点
## 在从节点创建config
[root@d4f6ce1daac3 bin]# gpssh -f /home/gpadmin/config/seg_hosts
=> cd /home/gpadmin
[sdw2]
[sdw1]
[sdw3]
=> mdkir config
[sdw2]
[sdw1]
[sdw3]
=> chgrp -R gpadmin ../gpadmin/
[sdw2]
[sdw3]
[sdw1]
=> chown -R gpadmin ../gpadmin/
[sdw2]
[sdw3]
[sdw1]
## 将gpinitsystem_config复制到所有节点
[root@d4f6ce1daac3 bin]# gpscp -f /home/gpadmin/config/seg_hosts /home/gpadmin/config/gpinitsystem_config =:/home/gpadmin/config/
20.初始化数据库
[root@d4f6ce1daac3 bin]# su gpadmin
## -s sdw1是指master的standy节点
## 如果初始化不能成功,就在/home/gpadmin/gpAdminLogs目录下查看日志做调整
[gpadmin@d4f6ce1daac3 bin]$ gpinitsystem -c /home/gpadmin/config/gpinitsystem_config -s sdw1
20220326:05:37:26:009376 gpinitsystem:d4f6ce1daac3:gpadmin-[INFO]:-Waiting for parallel processes batch [1], please wait...
.gpadmin@sdw1's password: gpadmin@sdw1's password: gpadmin@sdw1's password: gpadmin@sdw2's password: gpadmin@sdw2's password: gpadmin@sdw2's password: gpadmin@sdw3's password: gpadmin@sdw3's password: gpadmin@sdw3's password: .....................................................................................
21.启动
## 登录
psql -d zxy
## 正常启动
gpstart
## 正常关闭
gpstop
## 快速关闭
gpstop -M fast
##重启
gpstop -f
报错解决
问题一:
## 以下属于在docker拉取不同版本的Centos镜像遇到的问题,后使用Centos:7解决
## Centos:latest
removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/6/base/mirrorlist.txt
Error: Cannot find a valid baseurl for repo: base
## Centos:6.8
removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/6/base/mirrorlist.txt
Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again
问题二:
## 添加--privileged=true即可
sudo docker run -d --name mdw --privileged=true eeb6ee3f44bd /usr/sbin/init
[root@mdw /]# systemctl status firewalld
Failed to get D-Bus connection: Operation not permitted
问题三:
## 问题是known_hosts存有已知的server,将know_hosts删除,重新做免密操作后,成功
## [root@d4f6ce1daac3 .ssh]# ssh-copy-id -i ~/.ssh/id_rsa.pub root@mdw
## [root@d4f6ce1daac3 .ssh]# ssh-copy-id -i ~/.ssh/id_rsa.pub root@sdw1
## [root@d4f6ce1daac3 .ssh]# ssh-copy-id -i ~/.ssh/id_rsa.pub root@sdw2
## [root@d4f6ce1daac3 .ssh]# ssh-copy-id -i ~/.ssh/id_rsa.pub root@sdw3
[root@d4f6ce1daac3 bin]# gpssh-exkeys -f /home/gpadmin/config/all_hosts
[ERROR]: Failed to ssh to mdw. Warning: the RSA host key for 'mdw' differs from the key for the IP address '172.17.0.2'
Offending key for IP in /root/.ssh/known_hosts:1
Matching host key in /root/.ssh/known_hosts:8
Exiting, you have requested strict checking.
Host key verification failed.
[ERROR]: Expected passwordless ssh to host mdw
问题四:
## root用户下初始化失败,需要切换gpadmin用户
[root@d4f6ce1daac3 bin]# gpinitsystem -c /home/gpadmin/config/gpinitsystem_config -s sdw1
20220326:05:04:34:003706 gpinitsystem:d4f6ce1daac3:root-[INFO]:-Checking configuration parameters, please wait...
20220326:05:04:34:003706 gpinitsystem:d4f6ce1daac3:root-[FATAL]:-Unable to run this script as root Script Exiting!
[root@d4f6ce1daac3 bin]# su gpadmin
问题五:
## 报错
[gpadmin@d4f6ce1daac3 bin]$ gpstart
20220326:09:02:52:021330 gpstart:d4f6ce1daac3:gpadmin-[INFO]:-Starting gpstart with args:
20220326:09:02:52:021330 gpstart:d4f6ce1daac3:gpadmin-[INFO]:-Gathering information and validating the environment...
20220326:09:02:52:021330 gpstart:d4f6ce1daac3:gpadmin-[CRITICAL]:-gpstart failed. (Reason='Environment Variable MASTER_DATA_DIRECTORY not set!') exiting...
## 添加以下内容
vim .bashrc
##
source /home/gpadmin/greenplum-db/greenplum_path.sh
export MASTER_DATA_DIRECTORY=/home/gpadmin/gpdata/gpmaster/gpseg-1
export PGPORT=2345
export PGDATABASE=zxy
##
source .bashrc
问题六:
## 修改/home/gpadmin/gpdata/gpmaster/gpseg-1/pg_hba.conf
[root@d4f6ce1daac3 bin]# psql
psql: FATAL: no pg_hba.conf entry for host "[local]", user "root", database "zxy", SSL off
[GP下载](Download VMware Tanzu™ Greenplum® — VMware Tanzu Network (pivotal.io))
GP安装包
[GPCC下载](Download VMware Tanzu™ Greenplum® Command Center — VMware Tanzu Network (pivotal.io))
GPCC安装包
本文来源:https://blog.csdn.net/m0_51197424/article/details/123760086
相关文章