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
I don’t know where is my wxWidgets directory…
Very nice !
Hi
Thanks for all the advices.
For me it works till I have to type “make” for pgadmin.
It gives me error about stc.h ogl.h and it says there is no file or directory. I am totaly new and I don’t know what to do.
Short version:
zypper sa -r http://download.opensuse.org/repositories/server:/database:/postgresql/openSUSE_11.0/server:database:postgresql.repo
#zypper ref
#zypper in pgadmin3
I was really helpfull and many thanks to admin.
Could anyone please help me to solve the error I am getting during the PgAdmin III installation at ./configure step?
==========================================
…………………..
checking PostgreSQL in /usr/local/pgsql… ok
checking for PQgetOutResult in -lpq… no
checking wxWidgets version… ok
checking wxWidgets in /usr/local… failed
configure: error: Your wxWidgets installation cannot support pgAdmin in the selected configuration. This may be because it was configured without the –enable-unicode option, or the combination of dynamic/static linking and debug/non-debug libraries selected did not match any installed wxWidgets libraries.
========================================
Then tried adding this –with-wx-version=2.8 to the pgAdmin configure command but did not work and same error.
Thinking the following information would be helpfull in answering my above problem solution. I was following exactly the steps mentioned in this page by admin.
Software Detail:
—————–
openSuse11.1
postgresql-8.3.7
wxGTK-2.8.8
pgadmin3-1.8.4
—————–
Thanks.
Thanks for the posting.
I have some problems for configuring the server code with “./configure -with-openssl”. It complains that I don’t have crypto. I installed it from the opensuse 11.1 software server. It still complains it. Please help. Thanks in advances.
Thanks for this tutorial.
Now I have installed pgadmin but I can’t add a server.
I install wxWidgets everything was fine. Then compile pgAdmin was fine. I am using OpenSuse 11.1, but when I make then:
direccion-ditic:~/Desktop/pgadmin3-1.8.4 # make
make all-recursive
make[1]: se ingresa al directorio `/root/Desktop/pgadmin3-1.8.4′
Making all in branding
make[2]: se ingresa al directorio `/root/Desktop/pgadmin3-1.8.4/branding’
make[2]: No se hace nada para `all’.
make[2]: se sale del directorio `/root/Desktop/pgadmin3-1.8.4/branding’
Making all in i18n
make[2]: se ingresa al directorio `/root/Desktop/pgadmin3-1.8.4/i18n’
make[2]: No se hace nada para `all’.
make[2]: se sale del directorio `/root/Desktop/pgadmin3-1.8.4/i18n’
Making all in pgadmin
make[2]: se ingresa al directorio `/root/Desktop/pgadmin3-1.8.4/pgadmin’
test -f ./include/svnversion.cpp || touch ./include/svnversion.cpp
test -d ./.svn && ( V=`svnversion ./..` && OV=`cat ./include/svnversion.h | cut -d’ ‘ -f3|tr -d ‘”‘` ; if [ “$V” != “$OV” ]; then echo “#define VERSION_SVN \”$V\”” > ./include/svnversion.h ; fi ) || true
g++ -DHAVE_CONFIG_H -I. -I.. -I/usr/include/pgsql -DSSL -I/usr/local/lib/wx/include/gtk2-unicode-release-2.8 -I/usr/local/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -O2 -DEMBED_XRC -I/usr/include/libxml2 -I/usr/include/libxml2 -DDATA_DIR=\”/usr/local/pgadmin3/share/pgadmin3/\” -Wall -Wno-non-virtual-dtor -fno-strict-aliasing -Wno-write-strings -I../pgadmin/include -MT svnversion.o -MD -MP -MF .deps/svnversion.Tpo -c -o svnversion.o `test -f ‘./include/svnversion.cpp’ || echo ‘./’`./include/svnversion.cpp
mv -f .deps/svnversion.Tpo .deps/svnversion.Po
g++ -DHAVE_CONFIG_H -I. -I.. -I/usr/include/pgsql -DSSL -I/usr/local/lib/wx/include/gtk2-unicode-release-2.8 -I/usr/local/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -O2 -DEMBED_XRC -I/usr/include/libxml2 -I/usr/include/libxml2 -DDATA_DIR=\”/usr/local/pgadmin3/share/pgadmin3/\” -Wall -Wno-non-virtual-dtor -fno-strict-aliasing -Wno-write-strings -I../pgadmin/include -MT pgAdmin3.o-MD -MP -MF .deps/pgAdmin3.Tpo -c -o pgAdmin3.o `test -f ‘./pgAdmin3.cpp’ || echo ‘./’`./pgAdmin3.cpp
In file included from ../pgadmin/include/pgAdmin3.h:23,
from ./pgAdmin3.cpp:13:
../pgadmin/include/ctl/ctlSQLBox.h:17:24: error: wx/stc/stc.h: No existe el fichero o el directorio
./pgAdmin3.cpp:28:24: error: wx/ogl/ogl.h: No existe el fichero o el directorio
In file included from ../pgadmin/include/pgAdmin3.h:23,
from ./pgAdmin3.cpp:13:
../pgadmin/include/ctl/ctlSQLBox.h:37: error: expected class-name before ‘{’ token
../pgadmin/include/ctl/ctlSQLBox.h:67: error: ‘wxStyledTextEvent’ has not been declared
In file included from ./pgAdmin3.cpp:54:
../pgadmin/include/frm/frmMain.h:149: error: ‘wxStyledTextEvent’ has not been declared
../pgadmin/include/frm/frmMain.h: In member function ‘void frmMain::OnCopy(wxCommandEvent&)’:
../pgadmin/include/frm/frmMain.h:145: error: ‘class ctlSQLBox’ has no member named ‘Copy’
In file included from ./pgAdmin3.cpp:56:
../pgadmin/include/frm/frmQuery.h: At global scope:
../pgadmin/include/frm/frmQuery.h:81: error: ‘wxStyledTextEvent’ has not been declared
../pgadmin/include/frm/frmQuery.h:82: error: ‘wxStyledTextEvent’ has not been declared
./pgAdmin3.cpp: In member function ‘virtual bool pgAdmin3::OnInit()’:
./pgAdmin3.cpp:366: error: ‘wxOGLInitialize’ was not declared in this scope
make[2]: *** [pgAdmin3.o] Error 1
make[2]: se sale del directorio `/root/Desktop/pgadmin3-1.8.4/pgadmin’
make[1]: *** [all-recursive] Error 1
make[1]: se sale del directorio `/root/Desktop/pgadmin3-1.8.4′
make: *** [all] Error 2
direccion-ditic:~/Desktop/pgadmin3-1.8.4 #
Any help, please. Thanks
hello, please help me
after configure in wxGTK there is error message like this
/opt/wxGTK-2.8.8/bk-deps g++ -c -o coredll_gsockgtk.o -I.pch/wxprec_coredll -D__WXGTK__ -I./src/tiff -I./src/jpeg -I./src/regex -I./src/expat/lib -DWXUSINGDLL -DWXMAKINGDLL_CORE -DwxUSE_BASE=0 -fPIC -DPIC -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -I/opt/wxGTK-2.8.8/lib/wx/include/gtk2-unicode-release-2.8 -I./include -pthread -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -DWX_PRECOMP -pthread -Wall -Wundef -Wno-ctor-dtor-privacy -O2 -fno-strict-aliasing ./src/gtk/gsockgtk.cpp
In file included from ./src/gtk/gsockgtk.cpp:21:0:
./include/wx/gsocket.h:40:7: error: using typedef-name ‘GSocket’ after ‘class’
/usr/include/glib-2.0/gio/giotypes.h:127:47: error: ‘GSocket’ has a previous declaration here
In file included from ./include/wx/gsocket.h:179:0,
from ./src/gtk/gsockgtk.cpp:21:
./include/wx/unix/gsockunx.h:40:7: error: using typedef-name ‘GSocket’ after ‘class’
/usr/include/glib-2.0/gio/giotypes.h:127:47: error: ‘GSocket’ has a previous declaration here
./src/gtk/gsockgtk.cpp: In function ‘void _GSocket_GDK_Input(void*, gint, GdkInputCondition)’:
./src/gtk/gsockgtk.cpp:34:13: error: ‘struct GSocket’ has no member named ‘Detected_Read’
./src/gtk/gsockgtk.cpp:36:13: error: ‘struct GSocket’ has no member named ‘Detected_Write’
./src/gtk/gsockgtk.cpp: In member function ‘virtual bool GSocketGUIFunctionsTableConcrete::Init_Socket(GSocket*)’:
./src/gtk/gsockgtk.cpp:56:11: error: ‘struct GSocket’ has no member named ‘m_gui_dependent’
./src/gtk/gsockgtk.cpp:57:27: error: ‘struct GSocket’ has no member named ‘m_gui_dependent’
./src/gtk/gsockgtk.cpp: In member function ‘virtual void GSocketGUIFunctionsTableConcrete::Destroy_Socket(GSocket*)’:
./src/gtk/gsockgtk.cpp:67:16: error: ‘struct GSocket’ has no member named ‘m_gui_dependent’
./src/gtk/gsockgtk.cpp: In member function ‘virtual void GSocketGUIFunctionsTableConcrete::Install_Callback(GSocket*, GSocketEvent)’:
./src/gtk/gsockgtk.cpp:72:33: error: ‘struct GSocket’ has no member named ‘m_gui_dependent’
./src/gtk/gsockgtk.cpp:75:15: error: ‘struct GSocket’ has no member named ‘m_fd’
./src/gtk/gsockgtk.cpp:83:42: error: ‘struct GSocket’ has no member named ‘m_server’
./src/gtk/gsockgtk.cpp:90:35: error: ‘struct GSocket’ has no member named ‘m_fd’
./src/gtk/gsockgtk.cpp: In member function ‘virtual void GSocketGUIFunctionsTableConcrete::Uninstall_Callback(GSocket*, GSocketEvent)’:
./src/gtk/gsockgtk.cpp:98:33: error: ‘struct GSocket’ has no member named ‘m_gui_dependent’
./src/gtk/gsockgtk.cpp:108:42: error: ‘struct GSocket’ has no member named ‘m_server’
make: *** [coredll_gsockgtk.o] Error 1
please any suggested
thanks
Hello, try:
wxGTK-2.8.12.tar.gz