“PostgreSQL is a powerful, open source object-relational database system with over 30 years of active development that has earned it a strong reputation for reliability, feature robustness, and performance.” - postgresql.org

NOTE: Setting up and administering the database on your groov EPIC is only for advanced developers who are familiar with both Linux shell commands and database administration. Once you enable Secure Shell access, you are on your own and will have to solve any issues that arise through your own knowledge and online research. Opto 22 product support is limited to helping you reset the groov EPIC processor to factory defaults; our Product Support engineers cannot help you with programming, usage, or troubleshooting.

CAUTION: Before updating groov EPIC firmware, be sure you back up any files or applications you have created, including database table entries, as they will be deleted during the update. In addition, be aware that when you update EPIC firmware, your installation and PostgreSQL database setup will not be restored. You will need to repeat the steps in this guide after you have updated the firmware.

Installing PostgreSQL

  1. Log into shell and use apt to update the package repositories.
  2. Use apt to install postgresql, postgresql-client, and postgresql-doc.

Configuring PostgreSQL

  1. sudo postgresql-setup initdb
  2. sudo nano /var/lib/postgresql/data/postgresql.conf
    Uncomment and change listen_address = '*'
  3. sudo /etc/init.d/postgresql-server start
  4. sudo update-rc.d -f postgresql-server remove
  5. sudo update-rc.d postgresql-server start 64 2 3 4 5 . stop 36 1 6 .
  6. Add rule to groov Manage firewall:
        Title: PostgreSQL
        Protocol: tcp
        Ports: 5432
        eth0, tun0: enabled
        eth1, wlan0: disabled
  7. sudo nano /var/lib/postgresql/data/pg_hba.conf
    Add the following two lines at the end to allow all users to access via password from any host:

    host    all        all        0.0.0.0/0        md5
    host    all        all        ::/0             md5

Create a user and a database

  1. sudo su - postgres -c psql
  2. create user [testuser] with encrypted password '[testpassword]';
  3. create database [testdb] owner [testuser];
  4. \q
  5. sudo /etc/init.d/postgresql-server restart

You can now test remote connectivity to the database server.

Top

EPIC Developer Overview Home