pg 数据库安装

参考如下安装

yum install https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-7-x86_64/pgdg-centos10-10-2.noarch.rpm
yum install postgresql10
yum install postgresql10-server
yum install -y postgresql10-contrib

安装zombodb 扩展

  • 下载pg10 版本的扩展
wget https://www.zombodb.com/releases/v10-1.0.3/zombodb_centos7_pg10-10-1.0.3_1.x86_64.rpm
  • 安装zombodb
rpm -Uvh zombodb_centos7_pg10-10-1.0.3_1.x86_64.rpm
  • pg 数据库配置&&启动

    为了简单,直接使用没有密码的模式,在pg_hba.conf 添加一下配置,注意生产环境坚决不能这么搞

  • pg_hba.conf
host all all 0.0.0.0/0 trust
  • postgresql.conf
listen_addresses = '0.0.0.0'
port = 5432
  • 数据库启动
/usr/pgsql-10/bin/postgresql-10-setup initdb
systemctl enable postgresql-10
systemctl start postgresql-10

安装es

为了方便docker 安装

  • docker 安装(可选,如果没有安装的话)
yum install -y yum-utils
yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
yum install -y docker-ce
加速
sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{
"registry-mirrors": ["https://b3uey254.mirror.aliyuncs.com"]
}
EOF
sudo systemctl daemon-reload
sudo systemctl restart docker
  • docker-compose 文件
version: '2'
services:
elasticsearch:
image: elasticsearch:6.6.0
ports:
- "9200:9200"
environment:
- http.host=0.0.0.0
- transport.host=0.0.0.0
- network.host=0.0.0.0
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ulimits:
memlock:
soft: -1
hard: -1
mem_limit: 1g 可能需要配置系统vm 参数
echo vm.max_map_count=655360 >> /etc/sysctl.conf && \
sysctl -p
  • 启动
docker-compose up -d

配置扩展

  • 创建扩展
CREATE EXTENSION zombodb;
  • 创建测试表
CREATE TABLE products (
id SERIAL8 NOT NULL PRIMARY KEY,
name text NOT NULL,
keywords varchar(64)[],
short_summary text,
long_description zdb.fulltext,
price bigint,
inventory_count integer,
discontinued boolean default false,
availability_date date
);
  • 导入测试数据
COPY products FROM PROGRAM 'curl https://raw.githubusercontent.com/zombodb/zombodb/master/TUTORIAL-data.dmp';
  • 创建索引
CREATE INDEX idxproducts
ON products
USING zombodb ((products.*))
WITH (url='http://localhost:9200/');
  • 查询
SELECT * FROM products WHERE products ==> 'sports box';
  • 查看查询计划
  • es 索引数据
  • 扩展的schema

说明

zombodb 功能很强大,使用标准扩展我们可以方便的进行全文检索系统的开发,同时集合graphql 以及timescaledb 我们可以设计强大的分析系统

参考资料

https://github.com/zombodb/zombodb/blob/master/INSTALL.md
https://hub.docker.com/_/elasticsearch?tab=tags
https://www.postgresql.org/download/linux/redhat/
https://github.com/zombodb/zombodb/blob/master/TUTORIAL.md

 
 
 
 

zombodb安装试用的更多相关文章

  1. 项目管理工具 Redmine 安装试用手记

    原文:项目管理工具 Redmine 安装试用手记 项目管理工具 Redmine 安装试用手记 分类: Redmine2009-06-01 10:12 996人阅读 评论(1) 收藏 举报 项目管理工具 ...

  2. Tencent Server Web 安装试用

    Tencent Server Web 安装试用 私有环境搭建,使用docker-compose 进行memcache 安装 参考github 代码 https://github.com/rongfen ...

  3. toxiproxy 安装试用

    备注:    实际上是一个代理工具,但是又不是简单的进行代理(tcp,可以配置策略,toxics 实现延迟,模拟故障,    对于这个大家可能了解的就是netflix 公司的chaos monkey, ...

  4. windows openssh server 安装试用

    使用Windows的可能会知道win10 的已经包好了openssh 服务,但是对于其他机器win 7 windows 2008 ,就需要其他的方法了 还好powershell 团队开发了支持wind ...

  5. pgbench 安装试用

    pgbench 是一个方便的pg 性能测试工具,以下是简单的测试试用 安装 安装pg yum install https://download.postgresql.org/pub/repos/yum ...

  6. flynn 开源paas 平台安装试用

    flynn 是一个不错的开源paas 平台,基于git 以及容器技术,开发模型与 heroku 基本一样,同时构建方式就是基于heroku 的buildpacks 安装 官方文档提示说明是ubuntu ...

  7. nsq 安装试用

    因为是mac 系统安装试用brew install nsq 安装 brew install nsq 组件说明 nsqd 守护进程进行消息的接受,缓存以及传递消息给客户端,需要配置nsqlookupd地 ...

  8. apache phoenix 安装试用

    备注:   本次安装是在hbase docker 镜像的基础上配置的,主要是为了方便学习,而hbase搭建有觉得   有点费事,用镜像简单.   1. hbase 镜像 docker pull har ...

  9. Nchan 安装试用(openresty 同时支持)

    备注:        使用nginx最新的源码包(nginx-1.13.6),以及源码安装   1. 下载源码包(nginx+ Nchan) https://nginx.org/download/ng ...

随机推荐

  1. 微生物组学数据分析工具综述 | 16S+宏基因组+宏病毒组+宏转录组--转载

    转载:https://mp.weixin.qq.com/s/xsL9GuLs7b3nRF8VeRtinQ 建立在高通量测序基础上的微生物群落研究,当前主要有三大类:基于16S/18S/ITS等扩增子做 ...

  2. wrk 压测中请求无法响应问题解决过程

    ================= 遇到问题 =================$ 直连压测 wrk -c10000 -t100 -d100m http://localhost:9981/order/ ...

  3. async await与promise

    1.async 的返回值一定是一个promise.,即使你的函数里没有return. // 测试async的返回值 async function testAsync() { } let result ...

  4. Appium Desktop-Permission to start activity denied.

    可能情况1:activity查找错误 如何查找activity (1)确保手机和电脑已连接   adb devices (2)确保在你手机上,要测试的包启动着 (3)dos运行:adb shell d ...

  5. jar包安装到本地仓库

    mvn install:install-file -Dfile=hm_test.jar -DgroupId=com.TEST -DartifactId=hm_test -Dversion=1.0 -D ...

  6. RabittMQ安装和Erlang安装教程

    安装Erlang 官方安装地址文档: http://www.rabbitmq.com/install-rpm.html 根据官网的推荐 进入到专为RabbitMQ整理的极简版Erlang https: ...

  7. MapServer Tutorial——MapServer7.2.1教程学习——教程背景

    MapServer Tutorial——MapServer7.2.1教程学习——教程背景 一.前言 目前处于MapServer学习入门阶段,所以每一步都需要打下扎实基础.尽自己最大的努力,去学习知识的 ...

  8. VSTO:使用C#开发Excel、Word【15】

    使用文档属性DocumentProperties集合和DocumentProperty对象位于Microsoft Office 11.0 Object Library(office.dll)中,该对象 ...

  9. C语言结构体指针初始化(转)

    reference: https://www.cnblogs.com/losesea/archive/2012/11/15/2772526.html 今天来讨论一下C中的内存管理. 记得上周在饭桌上和 ...

  10. JavaScript入门经典(第四版)读书笔记

    第一部分 Web脚本编写与JavaScript语言的概念 1.document.lastModified()    ->    返回文档修改日期 2.<head>标签中的<sc ...