How to install zombodb on CentOS 6

ZomboDB [github]

Prerequisites

  • Postgres 10.x installed
  • libcurl >= 7.28.0 installed <== important
  • A 64bit Intel Architecture

Install PG-10

Download libcurl source (current version 7.64.0)
https://curl.haxx.se/download.html

** NOTE:
You cannot install libcurl by binary version on CentOS 6.x. I had tried.

Install libcurl by source


# build & install
./configure
make
make test             # (optional)
make install

# version check
curl-config --version

start elasticsearch service
create extension zombodb;

Test zombodb

-- create extension
CREATE EXTENSION zombodb;

-- sample database : "northwind"

-- create index using zombodb and elasticsearch
create index idx_products 
on products using zombodb((products.*)) with (url='http://localhost:9200/');
CREATE INDEX idx_customers
ON customers USING zombodb ((customers.*)) WITH (url='http://localhost:9200/');
CREATE INDEX idx_orders
ON orders USING zombodb ((orders.*)) WITH (url='http://localhost:9200/');
CREATE INDEX idx_employees
ON employees USING zombodb ((employees.*)) WITH (url='http://localhost:9200/');

-- full-text search with operator
select * from products where products ==> 'sho*';
select * from products where products ==> 'unitprice:[8 TO 10]';
select * from products where products ==> 'mix AND kg';
select * from products where products ==> 'mix AND NOT kg';

-- auto-changes of data : insert, update, delete
-- ==> immediatly OK!!
INSERT INTO customers VALUES 
('BGMIN', 'Byeong-Guk Min', 'Jason Min', 'Senior Engineer', 'Yeon-dong, Jeju-si', 'Jeju-do', NULL, '63126', 'Korea', '070-1234-5678', NULL);
select * from customers where customers ==> 'jason';

update customers 
set address = '1st street Sungshin-ro, Yeon-dong, Jeju-si'
where customerid = 'BGMIN';
select * from customers where customers ==> 'sungshin';

delete from customers where customerid = 'BGMIN';
select * from customers where customers ==> 'jason';

** Reply From zombodb [twitter]

Getting a modern libcurl on Centos6 is a pain. This is the Dockerfile I use to build the Centos6 ZomboDB RPM, and it does get a libcurl installed without installing from source:
==> Dockerfile

답글 남기기

아래 항목을 채우거나 오른쪽 아이콘 중 하나를 클릭하여 로그 인 하세요:

WordPress.com 로고

WordPress.com의 계정을 사용하여 댓글을 남깁니다. 로그아웃 /  변경 )

Google photo

Google의 계정을 사용하여 댓글을 남깁니다. 로그아웃 /  변경 )

Twitter 사진

Twitter의 계정을 사용하여 댓글을 남깁니다. 로그아웃 /  변경 )

Facebook 사진

Facebook의 계정을 사용하여 댓글을 남깁니다. 로그아웃 /  변경 )

%s에 연결하는 중

%d 블로거가 이것을 좋아합니다: