DBonSolaris.PG83Appliance

PostgreSQL 8.3 Appliance using OpenSolaris Kernel (ZFS,DTrace)

What you need

Install Instructions

Instructions to setup  Appliance

  •  Unzip the Appliance image zip in a directory
    • The zip image consists of two files   Postgres83Appliance.ovf (5.3KB) and Postgres83Appliance.vmdk (330MB)
  • Open Sun xVM VirtualBox GUI and select File->Import Appliance
    • Select "Choose" Browse to the directory when you unzipped the files and select Postgres83Appliance.ovf
    • Select "Next" to go the next screen of the Import Appliance Wizard
    • It shows details of the VM being imported. Do not modify anything here and just "Import" the VM
  • There is a new VM called "Postgres83Appliance" now available in VirtualBox
  • Typically for an appliance you want external applications to connect to it and hence we need to change network settings to allow access
    • Select the "Postgres83Appliance" and then on the right side click the blue colored  "Network" link
    • Change "Attached to: NAT" to "Attached to: Bridged Network"
    • If  you have more than one Network Adapters then click the icon next to it and make sure you select the right Network Adapter to connect
    • Press OK and verify the changes are committed on the information screen

Starting the appliance for the first time

  • Click "Postgres83Appliance" and hit the Start Icon
  • A new VM will start and show a grub menu "Postgres 8.3 Appliance based on OpenSolaris 2008.11"

 

  • Select the default grub menu and It will start an instance of the appliance with hostname "postgresdb" and import all 84 services defined.
  • Postgres 8.3 32-bit instance is one of them. This is where it will create a default Postgres 8.3 instance in /var/postgres/8.3/data
  • Postgres 8.3 will be running by the time you see a login screen
  • Login into the appliance as root with password opensolaris

Recommended Changes once you start the appliance for the first time

  • Select a new password for the appliance instead of the default "opensolaris" password using "passwd" command
  • Modify /var/postres/8.3/data/pg_hba.conf to add your applications ip address so that those clients are allowed to connect to the Postgres instance
    host    all         all         192.168.1.0/24          trust
    
  • Modify /var/postgres/8.3/data/postgresql.conf and atleast add
    listen_addresses='*'
    

        which will allow non-local clients to connect to the Postgres instance

    • Also you can bump up following tunables for a better performance setup
      shared_buffers=128MB
      wal_buffers=128kB
      checkpoint_segments=32
      
  • Restart the Postgres server instance so all Postgres changes take effect
svcadm restart postgresql_83:default_32bit
  • You can verify the IP address of the server using ifconfig -a and find the ipaddress for the Network adapter in use
  • Verify that you the client machine can connect to Postgres 
    • Example:
      /usr/postgres/8.3/bin/psql -h 192.168.1.3 -d postgres -U postgres
      
  • Now the initial setup has been completed and ready to be now customized as per the requirements of the application

Using Postgres 8.3 Appliance for ERP Applications

Using PostgreSQL Monitor with the Postgres 8.3 Appliance

  • PostgreSQL Monitor is a JNLP based Java Application and runs in client JVM. Hence typically the IP of your laptop should be added to the pg_hba.conf of the Postgres 8.3 Appliance
  • Once that is set start the PostgreSQL Monitor by clicking the following url/image:
    PostgreSQL Monitor
  • Select File-> Connect Server
    • Host: Enter IP Address of Postgres 8.3 Appliance
    • DB port: 5432 (default)
    • DB name: postgres (default)
    • DB user: postgres
    • DB password: blank  (trusted by default based on entry in pg_hba.conf)
    • Hit "Connect to DB"
  • Currently it is a demo mode and just shows tables, tablespaces and other information

DTrace Probes for Postgres 8.3 Appliance

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.

Sign up or Log in to add a comment or watch this page.


The individuals who post here are part of the extended Sun Microsystems community and they might not be employed or in any way formally affiliated with Sun Microsystems. The opinions expressed here are their own, are not necessarily reviewed in advance by anyone but the individual authors, and neither Sun nor any other party necessarily agrees with them.

Copyright 1994-2009 Sun Microsystems, Inc.
Powered by Atlassian Confluence
Sun Guidelines on Public Discourse Privacy Policy Terms of Use Trademarks Site Map Employment Investor Relations Contact