Skip to content

Instantly share code, notes, and snippets.

@sebastianwebber
Last active January 16, 2016 23:48
Show Gist options
  • Select an option

  • Save sebastianwebber/5670bfc7c324dfd3a4dc to your computer and use it in GitHub Desktop.

Select an option

Save sebastianwebber/5670bfc7c324dfd3a4dc to your computer and use it in GitHub Desktop.

PoWA on FreeBSD

Installation

OS Dependencies

Install pgxnclient and py-pip packages.

PostgreSQL Modules

pgxnclient install powa
pgxnclient install pg_qualstats
pgxnclient install pg_stat_kcache
pgxnclient install pg_track_settings

Install PoWA-WEB package

pip install powa-web

Configuration

PostgreSQL

ALTER SYSTEM SET shared_preload_libraries TO 'pg_stat_statements,powa,pg_stat_kcache,pg_qualstats';
ALTER SYSTEM SET track_io_timing TO on;

And about the powa database:

CREATE DATABASE powa;
\c powa
CREATE EXTENSION pg_stat_statements;
CREATE EXTENSION btree_gist;
CREATE EXTENSION powa;
CREATE EXTENSION pg_qualstats;
CREATE EXTENSION pg_stat_kcache;
CREATE EXTENSION pg_track_settings;

PoWA-WEB

Crie o arquivo /etc/powa-web.conf:

servers={
  'main': {
    'host': 'localhost',
    'port': '5432',
    'database': 'powa'
  }
}
cookie_secret="SUPERSECRET_THAT_YOU_SHOULD_CHANGE"

REMEMBER to change the SUPERSECRET_THAT_YOU_SHOULD_CHANGE value by something more safer.

To Run

powa-web

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment