| Beacon Hill, Inc. | Technology Solutions |
Home > Knowledge Base > Upgrading Postgres 8.1 to 8.3
$ cd ~/sources$ wget XXXX postgresql-8.3.8.tar.gz
$ tar -zxvf postgresql-8.3.8.tar.gz
$ apt-get readline-devel$ apg-get zlib-devel
$ ./configure$ gmake$ gmake install
/usr/local/pgsql
Old is in /var/lib/pgsql
/usr/bin/psql/usr/bin/postmaster/usr/bin/pg_ctl/usr/bin/posgres
/etc/rc.d/init.d/postgresql
$ cd ~/backups$ pg_dumpall > backup
$ pg_ctl stop
for me this didn't work.
As root:
$ /etc/rc.d/init.d/postgres stop
As root$ mv /var/lib/pgsql /var/lib/pgsql.8.1
# As root:$ mkdir /usr/local/pgsql/data$ chown postgres:postgres data
# As postgres$ su $ password$ su - postgressu: warning: cannot change directory to /var/lib/pgsql: No such file or directory
/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
usermod -d /usr/local/pgsql postgres
$ cd /etc/rc.d/init.d/$ cp /home/blucas/sources/postgresql-8.3.8/contrib/start-scripts/linux postgresql
$ /sbin/chkconfig --add postgresql
# check$ /sbin/chkconfig --list
$ /etc/rc.d/init.d/postgresql start
$ cd ~/backups
As postgres:
$ psql -f backup postgres
su -yum remove *postgre*
Dependencies Resolved
============================================================================= Package Arch Version Repository Size =============================================================================Removing: postgresql i386 8.1.11-1.el5_1.1 installed 10 M postgresql-devel i386 8.1.11-1.el5_1.1 installed 3.6 M postgresql-libs i386 8.1.11-1.el5_1.1 installed 495 k postgresql-server i386 8.1.11-1.el5_1.1 installed 9.8 MRemoving for dependencies: apr-util i386 1.2.7-7.el5 installed 156 k dovecot i386 1.0.7-2.el5 installed 3.6 M httpd i386 2.2.3-11.el5_2.centos.4 installed 2.8 M mod_dav_svn i386 1.4.2-2.el5 installed 134 k mod_perl i386 2.0.2-6.3.el5 installed 6.5 M mod_python i386 3.2.8-3.1 installed 1.1 M mod_ssl i386 1:2.2.3-11.el5_2.centos.4 installed 173 k php i386 5.1.6-20.el5_2.1 installed 2.9 M subversion i386 1.4.2-2.el5 installed 7.6 M webalizer i386 2.01_10-30.1 installed 252 k
Leave library...See rimuhosting mail