Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to upgrade in Debian?

Status
Not open for further replies.

CowboyX

Programmer
Dec 10, 2003
3
US
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
 
I don't mind compiling, as long as the directions are for utter dummies.

I've tried going off the directions for the OS X upgrade, but everything's located in completely different places.

(note that this is a brand new, clean Debian install, so there's no data to preserve or back up)
 
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 ;-)))

hope it is clear enough ;-) if not ask again ;-)
 
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?
 
I probalby didn't say it correct

you should copy linux to init.d as postgres, and then symlink S98postgres to this file

i.e.

cp linux /etc/init.d/postgres
cd /etc/rc2.d/
ln -s ../init.d/postgres ./S98postgres


the way you did it will also start postgre ot boot, but the standart way is more standard ;-))
 
I just found ftp://ftp.postgresql.org/pub/binary/v7.4/debian/

you can go there and get the package by hand, or

add

deb ftp://ftp.postgresql.org/pub/binary/v7.4/debian/ woody/main/binary-i386/

to your /etc/apt/sources.list

then
#apt-get update
#apt-get install postgresql
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top