Install on Debian GNU/Linux

This document describes how to install PGroonga on Debian GNU/Linux.

Supported versions

Here are supported Debian GNU/Linux versions:

How to install on Debian GNU/Linux stretch

You can use the following instruction to install PGroonga on Debian GNU/Linux stretch.

Install apt-transport-https package:

$ sudo apt update
$ sudo apt install -y -V apt-transport-https gnupg wget

Add APT repository for Groonga:

/etc/apt/sources.list.d/groonga.list:

deb [signed-by=/usr/share/keyrings/groonga-archive-keyring.gpg] https://packages.groonga.org/debian/ stretch main
deb-src [signed-by=/usr/share/keyrings/groonga-archive-keyring.gpg] https://packages.groonga.org/debian/ stretch main

If you want to use PostgreSQL 10 or later, you need to add the APT repository by PostgreSQL:

$ echo "deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main" | sudo tee /etc/apt/sources.list.d/pgdg.list
$ wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -

Install postgresql-9.6-pgroonga, postgresql-10-pgroonga, postgresql-11-pgroonga or postgresql-12-pgroonga package:

$ sudo wget -O /usr/share/keyrings/groonga-archive-keyring.gpg https://packages.groonga.org/debian/groonga-archive-keyring.gpg
$ sudo apt update
$ sudo apt install -y -V postgresql-9.6-pgroonga
Or
$ sudo apt install -y -V postgresql-10-pgroonga
Or
$ sudo apt install -y -V postgresql-11-pgroonga
Or
$ sudo apt install -y -V postgresql-12-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.

How to install on Debian GNU/Linux buster

You can use the following instruction to install PGroonga on Debian GNU/Linux buster.

Install apt-transport-https package:

$ sudo apt update
$ sudo apt install -y -V apt-transport-https gnupg wget

Add APT repository for Groonga:

/etc/apt/sources.list.d/groonga.list:

deb [signed-by=/usr/share/keyrings/groonga-archive-keyring.gpg] https://packages.groonga.org/debian/ buster main
deb-src [signed-by=/usr/share/keyrings/groonga-archive-keyring.gpg] https://packages.groonga.org/debian/ buster main

If you want to use PostgreSQL 12 or later, you need to add the APT repository by PostgreSQL:

$ echo "deb http://apt.postgresql.org/pub/repos/apt/ buster-pgdg main" | sudo tee /etc/apt/sources.list.d/pgdg.list
$ wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -

Install postgresql-11-pgroonga or postgresql-12-pgroonga package:

$ sudo wget -O /usr/share/keyrings/groonga-archive-keyring.gpg https://packages.groonga.org/debian/groonga-archive-keyring.gpg
$ sudo apt update
$ sudo apt install -y -V postgresql-11-pgroonga
Or
$ sudo apt install -y -V postgresql-12-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.