Install on Amazon Linux

This document describes how to install PGroonga on Amazon Linux.

Supported versions

Here are supported Amazon Linux versions:

How to install on Amazon Linux 2

You can use the following instruction to install PGroonga on Amazon Linux 2.

Install postgresql10 package:

We can't use PostgreSQL's Yum repository because of PostgreSQL doesn't provide a package for Amazon Linux.

Therefore, we modify PostgreSQL's .repo file as below.

% wget https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
% sudo rpm -Uvh --nodeps pgdg-redhat-repo-latest.noarch.rpm
% sudo sed --in-place -e "s/\$releasever/7/g" /etc/yum.repos.d/pgdg-redhat-all.repo

Install postgresql10-pgroonga package:

We enable EPEL repository as below.

% sudo -H yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

We install yum repository for Groonga.

% sudo -H yum install -y https://packages.groonga.org/centos/groonga-release-latest.noarch.rpm

We install PGroonga

% sudo -H yum install -y postgresql10-pgroonga

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

% sudo -H yum install -y groonga-tokenizer-mecab

Run PostgreSQL:

% sudo -H /usr/pgsql-10/bin/postgresql-10-setup initdb
% sudo -H systemctl enable postgresql-10
% sudo -H systemctl start postgresql-10

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.