Re: How to upgrade Centos 4.3 to PHP 5.1 and Postgresql 8.1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Richmond Dyes wrote:
That's the problem. There are no errors persay. That's why I am looking for basic instructions on how to get that upgrade done with rpm's from someone who has done it.

Assuming you have downloaded the rpm's. Don't know if CentOS has a "yum" or "apt" type program that will handle that for you.

What version of postgresql are you upgrading from? If it's from 8.1.X to 8.1.Y then this will work:

Take a database dump as a backup.

Stop postgresql:

/etc/init.d/postgresql stop

update the rpms:

rpm -Fvh postgresql-*

Start postgresql:

/etc/init.d/postgresql start


If you are doing from 8.0.X to 8.1.Y then you need to:


Take a database dump as a backup.

Copy or zip your existing files (/var/lib/pgsql/data) somewhere safe.

Stop postgresql:

/etc/init.d/postgresql stop

update the rpms:

rpm -Fvh postgresql-*

rm -rf /var/lib/pgsql/data or where-ever your postgresql data files are. Of course your backup is somewhere else!

Start postgresql:

/etc/init.d/postgresql start

(that should handle doing an 'initdb')

import your backup:

su - postgres
psql < /path/to/your/database.dump.file

If you have made any changes to the postgresql.conf file or pg_hba.conf file then you'll need to copy those back from your backup as well.

I'm sure someone will correct me if I have missed any steps.

--
Postgresql & php tutorials
http://www.designmagick.com/


[Index of Archives]     [Postgresql General]     [Postgresql Admin]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Yosemite Backpacking]     [Postgresql Jobs]

  Powered by Linux