Ubuntu – How to install Postgres Graphical Installer

11.10postgresql

I am a newbie in using Ubuntu (more precisely never used linux except the production deployment ). Now I choose to hold a grip on the system and intalled a latest 11.10 Ubuntu in my 32 bit Intel** desktop. In this machine **I have a 'administrator' user 'tusar'.

I want to install the PostgreSQL graphical version so downloaded this file postgresql-8.4.9-1-linux.bin from here

Now If run the file with ./filename command (refuses if I am not root), it opens up the graphical interface and completes the installation (creates user postgres and ask for password, wont complete if I dont give valid password).

I checked with /etc/inint.d/postgresql-8.4 status , that postgres is running.

But the problem is I am unable to open the GUI (I installed it in /opt/Postgresql ), its telling permission denied even if I am logged in as 'tusar'. Then I tried using the su postgres command and it directly changed the user without password. Now if I run the psql , createdb , its prompting me to install the postgres-client-package but this utilies are already installed and I can view them in my /opt/Postgresql/8.4/bin folder.

I can run query through my JDBC utility programs but unable to use neither terminal nor the graphical interface (although I can see pgAdmin3 is there ). Urgent help needed.

I have used this guide for the installation.

Best Answer

My suggestion would be to not use that all-in-one installer in the first place. Ubuntu already includes all the tools you need to make use of PostgreSQL in its software archive, including the graphical administration utility pgAdmin III. And since these programs are part of the software archive, you get the benefit of Ubuntu security updates (which you won't get with a 3rd party installer).

I'm not sure of the best way to clean up after the installer you tried, but I can give some tips on configuring PostgreSQL on a fresh system.

You can install the database with the following command:

sudo apt-get install postgresql

You can then find instructions on creating an account to log in to the database in /usr/share/doc/postgresql-9.1/README.Debian.gz. Once you've done that you can use the graphical administrative front end, which can be installed from the software centre or with the following command:

sudo apt-get install pgadmin3

If you need to access PostgreSQL via JDBC, you can install the Java drivers with the following command:

sudo apt-get install libpg-java