暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

一条命令快速启动Greenplum 6.12

DB宝 2023-01-13
945

作为全球首个开源、多云大数据平台,Greenplum致力于OLAP系统数据引擎开发,2019年发布的6版本让其具备了对OLTP和混合负载很好的支持能力。

一条命令快速启动GP

下载镜像:

1dockerproxy.com/lyasper/greenplum:6

创建GreenPlum的容器:

1docker run -itd --name gp6 -h gp6 \
2-p 5432:5432 lyasper/greenplum:6

就是这么简单,一条命令就能让你本地的5432端口运行好一个3个节点的Greenplum!

查看日志:

1docker logs -f gp6

日志返回“PostgreSQL stand-alone backend 9.4.24”说明部署成功。

使用:

 1[root@lhrxxt soft]# docker exec -it gp6 bash
2[root@gp6 /]
3[root@gp6 /]# source /opt/greenplum/greenplum_path.sh 
4[root@gp6 /]# psql -U gpadmin postgres
5psql (9.4.24)
6Type "help" for help.
7
8postgres=# select * from version();
9                                                                                        version                                                                                        
10---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
11 PostgreSQL 9.4.24 (Greenplum Database 6.12.0 build dev) on x86_64-unknown-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-39), 64-bit compiled on Nov  7 2020 08:56:34
12(1 row)
13
14postgres=# select * from gp_segment_configuration ;
15 dbid | content | role | preferred_role | mode | status | port  | hostname  |  address  | datadir 
16------+---------+------+----------------+------+--------+-------+-----------+-----------+---------
17    1 |      -1 | p    | p              | s    | u      |  5432 | localhost | localhost | 
18    2 |       0 | p    | p              | s    | u      | 40000 | localhost | localhost | 
19    3 |       1 | p    | p              | s    | u      | 40001 | localhost | localhost | 
20    4 |       2 | p    | p              | s    | u      | 40002 | localhost | localhost | 
21(4 rows)
22
23postgres=# 
24


注意

最新版本为6.12,作者一直未更新。

参考

https://mp.weixin.qq.com/s/6hpAVB8ow7o-90khw51QOA


文章转载自DB宝,如果涉嫌侵权,请发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论