Monday, August 23, 2010

Reinstalling PostgreSQL 9.0 beta

I am reinstalling PostgreSQL 9.0, using EnterpriseDB installer.

1. Download the installer
2. Launch installer:
$ cd download/
$ chmod +x postgresql-9.0.0-beta4-linux.bin 
$ sudo ./postgresql-9.0.0-beta4-linux.bin
This opens a GUI installer. Just follow the instruction.

3. Do not install Stack Builder.
Unlike, earlier version of installer, Apache and PHP are optional.
Thank you! I really do not want PHP and have already apache running.

4. Check the installation.
$ finger postgresql
Login: postgres          Name: PostgreSQL
Directory: /opt/PostgreSQL/9.0       Shell: /bin/sh
Never logged in.
No mail.
No Plan.

There it is!

5. Make psql available from the Ubuntu terminal.
EnterprieseDB installer of PostgreSQL 9.0 beta installs a script that launches a psql shell of its own.
But I'd rather be able to launch it from the Ubuntu main terminal.
So I added a directory to the path.

a. open (or create) ~/.profile
b. add the following:
if [ -d "/opt/PostgreSQL/9.0/bin" ] ; then
c. restart.

After restart, check it.
$ psql --version
psql (PostgreSQL) 9.0beta4
contains support for command-line editing

No comments:

Post a Comment