PostgreSQL Installation

## Postgres Installation steps ##
Make sure
Yum-y install readline-devel
Yum install zlib-devel
and gcc packages are installed already
Login as Postgres
$ cd /home/postgres/postgresql-8.3.3
$ ./configure –prefix=”/usr/postgres/8.3.3″
$ gmake
# $ gmake check  — If required run this
$ gmake install
$ adduser postgres — If User doesnot exist then
$ mkdir /mnt/data/pns/pgsql8.3.3
$ chown -R postgres:postgres /mnt/data/pns/pgsql8.3.3
$ /usr/postgres/8.3.3/bin/initdb -E UTF8 -D /mnt/data/pns/pgsql8.3.3
$  /usr/postgres/8.3.3/bin/postgres -i -D /mnt/data/pns/pgsql8.3.3 >logfile 2>&1 &
$ /usr/postgres/8.3.3/bin/createdb test
$ /usr/postgres/8.3.3/bin/psql test
##############################################################################################
In 8.3.3
create database and load database for pnps and jasperserver database. Create roles same as staging
Import the data from the Staging tables
do a pg_dumpall
/usr/postgres/8.3.3/bin/pg_dumpall > ~/outputfile_dump_8.3.3
Stop 8.3.3 postgres server
#######################################################################################################
## Postgres Installation steps ##
Login as Postgres
$ cd /home/postgres/postgresql-8.3.6
$ ./configure –prefix=”/usr/postgres/8.3.6″
$ gmake
# $ gmake check  — If required run this
$ gmake install
$ adduser postgres — If User doesnot exist then
$ mkdir /mnt/data/pns/pgsql8.3.6
$ chown -R postgres:postgres /mnt/data/pns/pgsql8.3.6
$ /usr/postgres/8.3.6/bin/initdb -E UTF8 -D /mnt/data/pns/pgsql8.3.6
$  /usr/postgres/8.3.6/bin/postgres -i -D /mnt/data/pns/pgsql8.3.6 >logfile 2>&1 &
$ /usr/postgres/8.3.6/bin/createdb test
$ /usr/postgres/8.3.6/bin/psql test
/usr/postgres/8.3.6/bin/psql -d postgres -f outputfile_dump_8.3.3
/usr/postgres/8.3.6/bin/psql
##################################################################################3
To Test to point the New Binary to the Old database
/usr/postgres/8.3.6/bin/postgres -i -D /mnt/data/pns/pgsql8.3.3 >logfile 2>&1 &
/usr/postgres/8.3.6/bin/psql

## Postgres Installation steps ##
Make sure Yum-y install readline-devel Yum install zlib-devel and gcc packages are installed already
Login as Postgres
$ cd /home/postgres/postgresql-8.3.3
$ ./configure –prefix=”/usr/postgres/8.3.3″
$ gmake
# $ gmake check  — If required run this
$ gmake install
$ adduser postgres — If User doesnot exist then
$ mkdir /mnt/data/pns/pgsql8.3.3
$ chown -R postgres:postgres /mnt/data/pns/pgsql8.3.3

$ /usr/postgres/8.3.3/bin/initdb -E UTF8 -D /mnt/data/pns/pgsql8.3.3$  /usr/postgres/8.3.3/bin/postgres -i -D /mnt/data/pns/pgsql8.3.3 >logfile 2>&1 &$ /usr/postgres/8.3.3/bin/createdb test$ /usr/postgres/8.3.3/bin/psql test
##############################################################################################
In 8.3.3create database and load database for pnps and jasperserver database. Create roles same as stagingImport the data from the Staging tables
do a pg_dumpall /usr/postgres/8.3.3/bin/pg_dumpall > ~/outputfile_dump_8.3.3
Stop 8.3.3 postgres server

######################################################################################################### Postgres Installation steps ##
Login as Postgres
$ cd /home/postgres/postgresql-8.3.6
$ ./configure –prefix=”/usr/postgres/8.3.6″
$ gmake
# $ gmake check  — If required run this
$ gmake install
$ adduser postgres — If User doesnot exist then
$ mkdir /mnt/data/pns/pgsql8.3.6
$ chown -R postgres:postgres /mnt/data/pns/pgsql8.3.6

$ /usr/postgres/8.3.6/bin/initdb -E UTF8 -D /mnt/data/pns/pgsql8.3.6$  /usr/postgres/8.3.6/bin/postgres -i -D /mnt/data/pns/pgsql8.3.6 >logfile 2>&1 &$ /usr/postgres/8.3.6/bin/createdb test$ /usr/postgres/8.3.6/bin/psql test

/usr/postgres/8.3.6/bin/psql -d postgres -f outputfile_dump_8.3.3
/usr/postgres/8.3.6/bin/psql
##################################################################################3To Test to point the New Binary to the Old database
/usr/postgres/8.3.6/bin/postgres -i -D /mnt/data/pns/pgsql8.3.3 >logfile 2>&1 &/usr/postgres/8.3.6/bin/psql

Advertisements
This entry was posted in Uncategorized. Bookmark the permalink.

2 Responses to PostgreSQL Installation

  1. deepak says:

    /usr/local/postgres/pg9.01/bin/initdb -E UTF8 –locale=en_US.UTF8 /var/lib/pgsql/data

  2. I like what you guys are usually up too. Such clever
    work and exposure! Keep up the fantastic works guys I’ve included you guys to my own blogroll.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s