Can anyone point me to a good tutorial on how to upgrade PSQL to version 7.3.x or 7.4 on a Debian box? I've done it in OS X (thanks to Mike Liyanage's excellent packages), but I'm a Linux newb and have little idea what's going on over here.
do you want to use deb package, or want to compile it?
should be aware that the dep package I've seen is backpached for debian stable, so it is not stable ;-)) there won't be official stable package
and for debian unstable, i havn't seen what is the situation (the package system of debian doesn't work for sometime) and don't know if there is going to be soon official package for 7.4
debian packages also put the things everywhere
when you compile, you can change the directories, whereever you want, the default configuration puts them in one directory and default it is /usr/local/pgsql
you can do as normal user (not root)
download the source from postgresql.org,
decompress it and go to the directory, something like "cd ~/postgresql-7.4"
run
./configure
wait (if you want first you can run "./configure --help" to see the parameter and change something)
if everything is ok, run
make
and when it is done you should su to root and do
make install
after that if you haven't changed the configuration for the directory - everything will be in /usr/local/pgsql
you deside now, where to put the data directory (for debian usualy goes to /var/lib/pgsql, but you can put it anywhere), create it and change the ownership to user postgres (if it doesn't exist - create it)
then do
su postgres
initdb -D /var/lib/pgsql
then in the directory, where are the source of postgre, there is subdir /contrib/startup-script
get the linux one and see what's written in it as comments follow what's written, but the symlink should be in rc2.d as S98postgres the others all can be K02postgresql, (debian start rc2 if not changed) and don't forget do do chmod +x /etc/init.d/postgres, also edit it so that PGDATA is equal to the place you put the data
you can compile it if you have gcc installed and some other things, which I don't remember (everytime if something complains I install the needed thing, if you get error like that and you cannot understand, ask ;-)))
OK... I had to run the configure program as:
./configure --without-zlib --without-readline
I doubt readline will prove necessary, and I assume that zlib is for running compression within data in the database? I don't plan on doing that, so I think I'm good.
After editing the PGDATA part of the "linux" file, I moved it to /etc/rc2.d and renamed it S98postgres. However, there's no /etc/init.d/postgres file, where does that come from?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.