postgre.rst
author Oleksandr Gavenko <gavenkoa@gmail.com>
Thu, 12 Feb 2015 19:28:09 +0200
changeset 1683 d99b4a277679
child 1684 88f1d11d2adf
permissions -rw-r--r--
Installing on Debian.

.. -*- coding: utf-8; -*-
.. include:: HEADER.rst

==========
 Postgre.
==========
.. contents::

Installing on Debian.
=====================

Install and create new user and database::

  $ sudo apt-get install postgresql postgresql-client
  $ sudo su - postgres
  postgres=# CREATE USER "mypguser" WITH PASSWORD 'mypguserpass';
  postgres=# CREATE DATABASE "mypgdatabase" OWNER "mypguser";
  postgres=# \q

Connect as user ``mypguser`` to new database::

  $ su - mypguser
  $ psql mypgdatabase

..

  https://wiki.debian.org/PostgreSql
    Debian wiki instructions.