Monday, November 25, 2013

Install postgres, pgadmin in Ubuntu 12.04

Installing postgres database to Ubuntu 12.04 run

  1. sudo apt-get install postgresql
  2. sudo apt-get install postgresql-contrib
  3. sudo apt-get install pgadmin3
There is nice article what you can to do further in postgres database.

To allow connection to postgres database from host computer these steps are necessary:
  1. In VirtualBox NAT Advanced settings add port forwarding 5432 -> 65432
  2. In guest start sudo vim /etc/postgresql/9.1/main/pg_hba.conf and add these lines
    host    all    all             192.168.0.0/16          md5
    host    all    all             10.0.0.0/8              md5
  3. sudo vim /etc/postgresql/9.1/main/postgresql.conf
    listen_addresses = '*'
  4. sudo -u postgres psql and execute
    create user vagrant with password 'vagrant';
    create database pentaho;
    GRANT ALL PRIVILEGES ON DATABASE pentaho to vagrant;
    alter user vagrant with superuser;
    \c pentaho
    CREATE SCHEMA repo;
    CREATE SCHEMA target;
  5. In host pgadmin III create new connection
    Name: local
    Host: localhost
    Port: 65432
    Maintenance DB: pentaho
    Username: vagrant
    Password: vagrant

No comments:

Post a Comment