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 ;-)