... * [Sun xVM VirtualBox 2.2 or greater|http://www.virtualbox.org/wiki/Downloads] * [Postgres 8.3 Appliance Image|http://mediacast.sun.com/users/j.k.shah/media/pg83dbapp]
h2. Install Instructions
* [Install VirtualBox 2.2 or greater in the system |http://download.virtualbox.org/virtualbox/2.2.0/UserManual.pdf]
h2. 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
h2. 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"
!pgapp.jpg|width=557,height=418!
* 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*
h2. 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 {code} host all all 192.168.1.0/24 trust {code} * Modify /var/postgres/8.3/data/postgresql.conf and atleast add {code} listen_addresses='*' {code} which will allow non-local clients to connect to the Postgres instance ** Also you can bump up following tunables for a better performance setup {code} shared_buffers=128MB wal_buffers=128kB checkpoint_segments=32 {code}
* Restart the Postgres server instance so all Postgres changes take effect
{code} svcadm restart postgresql_83:default_32bit {code} * 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: {code} /usr/postgres/8.3/bin/psql -h 192.168.1.3 -d postgres -U postgres {code} * Now the initial setup has been completed and ready to be now customized as per the requirements of the application
h2. Using Postgres 8.3 Appliance for ERP Applications
* [Openbravo ERP 2.4 Appliance using Postgres 8.3 Appliance|http://blogs.sun.com/jkshah/entry/openbravo_erp_2_40_on]
h2. 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 |http://blogs.sun.com/jkshah/resource/pgmonitor.jnlp] !pgmonitor2.jpg|width=361,height=293!
* 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
h2. DTrace Probes for Postgres 8.3 Appliance
* [DTrace Toolkit 2009.03.29 |http://pgfoundry.org/frs/?group_id=1000163&release_id=1336] * List of generic database probes: [DBDTraceProbes] * List of PostgreSQL specific probes: [PostgresDTraceProbes] |