Install on Ubuntu

This document describes how to install PGroonga on Ubuntu.

Supported versions

Here are supported Ubuntu versions:

How to install

You can use the following instruction to install PGroonga on Ubuntu.

If you're using Ubuntu 14.04, install postgresql-9.3-pgroonga package.

If you're using Ubuntu 17.04, install postgresql-9.6-pgroonga package.

Otherwise, install postgresql-9.5-pgroonga package:

% sudo apt-get install -y software-properties-common
% sudo add-apt-repository -y universe
% sudo add-apt-repository -y ppa:groonga/ppa
% sudo apt-get update
Ubuntu 14.04:
% sudo apt-get install -y -V postgresql-9.3-pgroonga
Ubuntu 17.04:
% sudo apt-get install -y -V postgresql-9.6-pgroonga
Others:
% sudo apt-get install -y -V postgresql-9.5-pgroonga

If you want to use MeCab based tokenizer, you also need to install groonga-tokenizer-mecab package:

% sudo apt-get install -y -V groonga-tokenizer-mecab

Create a database:

% sudo -u postgres -H psql --command 'CREATE DATABASE pgroonga_test'

(Normally, you should create a user for pgroonga_test database and use the user. See GRANT USAGE ON SCHEMA pgroonga for details.)

Connect to the created database and execute CREATE EXTENSION pgroonga:

% sudo -u postgres -H psql -d pgroonga_test --command 'CREATE EXTENSION pgroonga'

That's all!

Try tutorial. You can understand more about PGroonga.