作为全球首个开源、多云大数据平台,Greenplum致力于OLAP系统数据引擎开发,2019年发布的6版本让其具备了对OLTP和混合负载很好的支持能力。
下载镜像:
dockerproxy.com/lyasper/greenplum:6
创建GreenPlum的容器:
docker run -itd --name gp6 -h gp6 \
-p 5432:5432 lyasper/greenplum:6
就是这么简单,一条命令就能让你本地的5432端口运行好一个3个节点的Greenplum!
查看日志:
docker logs -f gp6
日志返回“PostgreSQL stand-alone backend 9.4.24”说明部署成功。
使用:
[root@lhrxxt soft]# docker exec -it gp6 bash
[root@gp6 /]#
[root@gp6 /]# source /opt/greenplum/greenplum_path.sh
[root@gp6 /]# psql -U gpadmin postgres
psql (9.4.24)
Type "help" for help.
postgres=# select * from version();
version
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
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
(1 row)
postgres=# select * from gp_segment_configuration ;
dbid | content | role | preferred_role | mode | status | port | hostname | address | datadir
------+---------+------+----------------+------+--------+-------+-----------+-----------+---------
1 | -1 | p | p | s | u | 5432 | localhost | localhost |
2 | 0 | p | p | s | u | 40000 | localhost | localhost |
3 | 1 | p | p | s | u | 40001 | localhost | localhost |
4 | 2 | p | p | s | u | 40002 | localhost | localhost |
(4 rows)
postgres=#
最新版本为6.12,作者一直未更新。
https://mp.weixin.qq.com/s/6hpAVB8ow7o-90khw51QOA