Jul 082008
 


pgAdmin III is the most popular and feature rich Open Source administration and development platform for PostgreSQL, the most advanced Open Source database in the world. pgAdmin III is a comprehensive design and management interface for PostgreSQL database, designed to run on most operating systems. The software is written in C++ and uses the excellent wxWidgets cross platform toolkit. In every environment, pgAdmin III is a native application. The application is executed in binary code, not in a virtual machine, therefore offering excellent performance.


Let’s see how to install and configure pgAdmin in openSUSE.

NOTE: This procedure is installed on openSUSE 11.0

Pre-requisites to install pgAdmin III

pgAdmin requires the following pre-requisites to be installed before proceeding to install PostgreSQL.

Latest stable postgreSQL (YaST2 package: postgresql postgresql-devel & postgresql-server from source)
GTK 2.2
Automake (YaST2 package: automake)
Autoconf (YaST2 package: autoconf)
GNU C Compiler (YaST2 package: gcc)
wxGTK 2.8 or above (YaST2 package: wxGTK)
libxml2 & libxml2-devel
libxslt & libxslt-devel

opensuse11:~ # yast2 –install gtk2 gcc automake autoconf libxml2 libxml2-devel libxslt libxslt-devel postgresql postgresql-devel

Install PostgreSQl Database Server from Source

pgAdmin III requires Postresql database server be installed with support to openssl and hence it is better to build PostgreSQL from source.

Download PostgreSQL Source

Download the latest version of PostgreSQL from here

opensuse11:~ # wget http://ftp2.uk.postgresql.org/sites/ftp.postgresql.org//source/v8.3.3/postgresql-8.3.3.tar.gz

Untar & Uncompress PostgreSQL source

opensuse11:~ # tar -zxvf postgresql-8.3.3.tar.gz

Configure/Compile & Install PostgreSQL

Change directory to the newly extracted directory and run the configure script with “–with-openssl” switch to support openssl. Once, the script runs without any error, run “make” and “make install” to compile and install PostgreSQL.

opensuse11:~ # cd postgresql-8.3.3
opensuse11:~/postgresql-8.3.3 # ./configure –with-openssl
opensuse11:~/postgresql-8.3.3 # make; make install

Install wxGTK

wxGTK2 can be installed from YaST2 packages (wxGTK) however, it is recommended to install from source. Download the latest stable release 2.8.8 of wxGTK from here

opensuse11:~ # wget http://prdownloads.sourceforge.net/wxwindows/wxGTK-2.8.8.tar.gz

Unzip & Untar wxGTK

opensuse11:~ # tar -zxvf wxGTK-2.8.8.tar.gz

Configure/Compile & Install wxGTK

opensuse11:~ # cd wxGTK-2.8.8
opensuse11:~/wxGTK-2.8.8 # ./configure –with-gtk –enable-gtk2 –enable-unicode
opensuse11:~/wxGTK-2.8.8 # make
opensuse11:~/wxGTK-2.8.8 # make install

Alternatively, pgadmin has a script to wxGTK from the downloaded source to do all the above for you. This script is “wxGTK-2.8.8/xtra/wx-build/build-wxgtk” where wxGTK-2.8.8 is the folder we extracted.

Install pgAdmin III

Let’s proceed to install pgAdmin now.

Download the latest source for pgAdmin from here

opensuse11:~ # wget http://ftp2.uk.postgresql.org/sites/ftp.postgresql.org//pgadmin3/release/v1.8.4/src/pgadmin3-1.8.4.tar.gz

Unzip & Untar pgAdmin III

opensuse11:~ # tar -zxvf pgadmin3-1.8.4.tar.gz

Configure/Compile & Install pgAdmin III

opensuse11:~ # cd pgadmin3-1.8.4
opensuse11:~/pgadmin3-1.8.4 # ./configure
opensuse11:~/pgadmin3-1.8.4 # make
opensuse11:~/pgadmin3-1.8.4 # make install

This should install pgAdmin successfully on openSUSE. As I said earlier, I’ve done this in openSUSE 11.0 but should work fine on openSUSE 10.3 and earlier.

Start pgAdmin

pgAdmin binaries are installed in the /usr/local/pgadmin3/bin/

To start pgAdmin run the command as

opensuse11:~ # /usr/local/pgadmin3/bin/pgadmin