Changes between Version 73 and Version 74 of InstallationGuidelines/PostgreSQL


Ignore:
Timestamp:
03/02/16 11:28:12 (6 years ago)
Author:
Fran Boon
Comment:

Remote Access

Legend:

Unmodified
Added
Removed
Modified
  • InstallationGuidelines/PostgreSQL

    v73 v74  
    264264}}}
    265265
     266== Rewmote Access ==
     267Say that you want to provide access for an external reporting tool.
     268
     269Add the user account:
     270{{{
     271su postgres
     272psql
     273CREATE USER reporter WITH PASSWORD 'mypassword';
     274\q
     275exit
     276su -c - postgres "psql -q -d sahana -c 'GRANT CONNECT ON DATABASE sahana TO reporter;'"
     277su -c - postgres "psql -q -d sahana -c 'GRANT SELECT ON ALL TABLES IN SCHEMA public TO reporter;'"
     278}}}
     279
     280Allow remote access:
     281{{{
     282vim /etc/postgresql/9.4/main/postgresql.conf
     283listen_addresses = '*'
     284
     285vim /etc/postgresql/9.4/main/pg_hba.conf
     286host    sahana          reporter        x.x.x.x/32          md5
     287
     288/etc/init.d/postgresql restart
     289}}}
     290
     291NB Also remember any network firewll, e.g. on Amazon EC2, amend the Security Group.
     292
    266293== Troubleshooting ==
    267294