安装greenplum扩展

简介:

安装hstore

greenplum5.x当前还不支持create extension 的方式创建hstore扩展,但是可以以执行sql文件的形式创建hstore相关的函数,能达到相同的效果

这些函数创建方式存放在:$GPHOME/share/postgresql/contrib/hstore.sql
执行SQL文件即可:
$ psql -d data_sas -f $GPHOME/share/postgresql/contrib/hstore.sql

安装Madlib

参考文档:https://gpdb.docs.pivotal.io/550/ref_guide/extensions/madlib.html
1、下载扩展包并解压

下载扩展包到集群的master服务器(standby 不需要,由于也无法安装),扩展包的版本需要与greenplum版本保持一致,下载地址:
https://network.pivotal.io/products/pivotal-gpdb

[root@l-test5 /export]$ ll
-rw-r--r--  1 root     root         3003497 Feb 27 18:28 madlib-1.13-gp5-rhel6-x86_64.tar.gz

[root@l-test5 /export]# tar -zxvf madlib-1.13-gp5-rhel6-x86_64.tar.gz 
madlib-1.13-gp5-rhel6-x86_64/
madlib-1.13-gp5-rhel6-x86_64/._madlib-1.13-gp5-rhel6-x86_64.gppkg
madlib-1.13-gp5-rhel6-x86_64/madlib-1.13-gp5-rhel6-x86_64.gppkg
madlib-1.13-gp5-rhel6-x86_64/._open_source_license_MADlib_1.13_GA.txt
madlib-1.13-gp5-rhel6-x86_64/open_source_license_MADlib_1.13_GA.txt
madlib-1.13-gp5-rhel6-x86_64/ReleaseNotes.txt

# chown -R gpadmin: madlib*
$ ll
drwxr-xr-x  2 gpadmin     gpadmin            4096 Jan  6 03:23 madlib-1.13-gp5-rhel6-x86_64
-rw-r--r--  1 gpadmin     gpadmin         3003497 Feb 27 18:28 madlib-1.13-gp5-rhel6-x86_64.tar.gz

2、安装madlib扩展

[gpadmin@l-test5 /export/madlib-1.13-gp5-rhel6-x86_64]$ gppkg -i madlib-1.13-gp5-rhel6-x86_64.gppkg 
.
.
20180228:14:22:22:021216 gppkg:l-test5:gpadmin-[ERROR]:-
Traceback (most recent call last):
  File "/opt/greenplum-db/lib/python/gppylib/commands/base.py", line 243, in run
    self.cmd.run()
  File "/opt/greenplum-db/lib/python/gppylib/operations/__init__.py", line 53, in run
    self.ret = self.execute()
  File "/opt/greenplum-db/lib/python/gppylib/operations/utils.py", line 52, in execute
    raise ret
IOError
.
.
.
20180228:14:22:22:021216 gppkg:l-test5:gpadmin-[CRITICAL]:-gppkg failed. (Reason='') exiting...

发现安装报错,并且Reason='',没有提示报错信息,经排查,是由于segment服务器中的/opt/greenplum-db 权限不足导致,执行chown -R gpadmin: /opt/greenplum-db* 即可

[gpadmin@l-test5 /export/madlib-1.13-gp5-rhel6-x86_64]$ gppkg -i madlib-1.13-gp5-rhel6-x86_64.gppkg 
.
.
.
usage:  madpack install [-s schema_name] -p greenplum -c user@host:port/database
Example:
       $ $GPHOME/madlib/bin/madpack install -s madlib -p greenplum -c gpadmin@mdw:5432/testdb
       This will install MADlib objects into a Greenplum database named "testdb"
       running on server "mdw" on port 5432. Installer will try to login as "gpadmin"
       and will prompt for password. The target schema will be "madlib".
       To upgrade to a new version of MADlib from version v1.0 or later, use option "upgrade",
       instead of "install" 
For additional options run:
$ madpack --help
Release notes and additional documentation can be found at http://madlib.apache.org
20180228:14:59:33:030019 gppkg:l-test5:gpadmin-[INFO]:-madlib-1.13-gp5-rhel6-x86_64.gppkg successfully installed.

3、增加madlib 函数到指定的数据库

----解析参数:-s 指定数据库中的schema  
             -p 指定要安装的平台,这里是统一的 greenplum
             -c 指定连接数据库的方式,需要账户名、host、port、dbname

[gpadmin@l-pgdata5.vc.cn6 /export/madlib-1.13-gp5-rhel6-x86_64]$ /opt/greenplum-db/madlib/bin/madpack install -s public -p greenplum -c gpadmin@l-pgdata5.vc.cn6:65432/data_sas
madpack.py: INFO : Detected Greenplum DB version 5.5.0.
madpack.py: INFO : *** Installing MADlib ***
madpack.py: INFO : MADlib tools version    = 1.13 (/opt/greenplum-db-5.5.0/madlib/Versions/1.13/bin/../madpack/madpack.py)
madpack.py: INFO : MADlib database version = None (host=l-pgdata5.vc.cn6:65432, db=data_sas, schema=public)
madpack.py: INFO : Testing PL/Python environment...
madpack.py: INFO : > Creating language PL/Python...
madpack.py: INFO : > PL/Python environment OK (version: 2.7.12)
madpack.py: INFO : Installing MADlib into PUBLIC schema...
madpack.py: INFO : > Creating PUBLIC.MigrationHistory table
madpack.py: INFO : > Writing version info in MigrationHistory table
madpack.py: INFO : > Creating objects for modules:
madpack.py: INFO : > - array_ops
madpack.py: INFO : > - bayes
madpack.py: INFO : > - crf
madpack.py: INFO : > - elastic_net
madpack.py: INFO : > - linalg
madpack.py: INFO : > - pmml
madpack.py: INFO : > - prob
madpack.py: INFO : > - sketch
madpack.py: INFO : > - svec
madpack.py: INFO : > - svm
madpack.py: INFO : > - tsa
madpack.py: INFO : > - stemmer
madpack.py: INFO : > - conjugate_gradient
madpack.py: INFO : > - knn
madpack.py: INFO : > - lda
madpack.py: INFO : > - stats
madpack.py: INFO : > - svec_util
madpack.py: INFO : > - utilities
madpack.py: INFO : > - assoc_rules
madpack.py: INFO : > - convex
madpack.py: INFO : > - glm
madpack.py: INFO : > - graph
madpack.py: INFO : > - linear_systems
madpack.py: INFO : > - recursive_partitioning
madpack.py: INFO : > - regress
madpack.py: INFO : > - sample
madpack.py: INFO : > - summary
madpack.py: INFO : > - kmeans
madpack.py: INFO : > - pca
madpack.py: INFO : > - validation
madpack.py: INFO : MADlib 1.13 installed successfully in PUBLIC schema.

安装成
目录
相关文章
|
缓存 Linux 开发工具
CentOS 7- 配置阿里镜像源
阿里镜像官方地址http://mirrors.aliyun.com/ 1、点击官方提供的相应系统的帮助 :2、查看不同版本的系统操作: 下载源1、安装wget yum install -y wget2、下载CentOS 7的repo文件wget -O /etc/yum.
261372 0
|
Java 定位技术 数据处理
windows下gdal的java开发环境搭建
本文介绍了gdal在windows环境下怎么搭建java开发,同时提供一个开发示例,通过输出gdal支持的数据驱动来演示其支持的数据类型,同时表明我们的环境搭建完成,可以基于java进行相应开发。
1310 0
windows下gdal的java开发环境搭建
|
负载均衡
Pgpool-II实现高可用+读写分离+负载均衡(七)---- recovery_1st_stage分析
recovery_1st_stage是Pgpool online recovery的第一阶段,位于PG_DATA目录下,主要功能就是使用pg_basebackup恢复(recovery)从节点。
|
10月前
|
安全 关系型数据库 MySQL
CentOS7仅安装部署MySQL80客户端
通过上述步骤,你可以在CentOS 7上成功安装并配置MySQL 8.0客户端。这个过程确保你能够使用MySQL客户端工具连接和管理远程的MySQL数据库,而不需要在本地安装MySQL服务器。定期更新MySQL客户端可以确保你使用的是最新的功能和安全修复。
969 16
|
弹性计算 Java 网络协议
……企业搭建门户网站需要考虑的事情就很多了?
企业门户网站不同于普通网站,它不仅是品牌形象的展示,还集品牌宣传、销售、服务、互动、数据营销等多功能于一体。企业搭建门户需考虑多地访客的访问速度、定制开发及高昂成本。为解决这些问题,中小企业转向云服务,如阿里云提供的解决方案,利用云效流水线自动化构建和发布,通过ROS快速创建ECS,结合DNS解析和CDN加速,实现高效低成本的部署。此方案简化了上线的流程,但完整的开发还包括设计、开发、测试等环节在本解决方案中没有体现。
513 1
……企业搭建门户网站需要考虑的事情就很多了?
|
存储 分布式数据库 数据库
深入OceanBase内部机制:分区构建高可用、高性能的分布式数据库基石
深入OceanBase内部机制:分区构建高可用、高性能的分布式数据库基石
|
存储 数据可视化 数据挖掘
R语言绘制圈图、环形热图可视化基因组实战:展示基因数据比较
R语言绘制圈图、环形热图可视化基因组实战:展示基因数据比较
|
SQL Rust 数据挖掘
4秒读取50w行Excel数据
4秒读取50w行Excel数据
399 1
|
Web App开发 前端开发 JavaScript
过渡效果的艺术:CSS transition 让网页交互更平滑(下)
过渡效果的艺术:CSS transition 让网页交互更平滑(下)
|
SQL 监控 关系型数据库
postgresql|数据库|插件学习(二)---postgresql-12的外置插件pg_profile的启用和使用
postgresql|数据库|插件学习(二)---postgresql-12的外置插件pg_profile的启用和使用
575 0