On an Ubuntu Server, version 8.4 of PostgreSQL Server is already installed. I have to install 8.2 on the same server.
I would prefer to install from a .DEB instead of compiling from source.
You can use hardy Ubuntu repository:
End:
# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 10.10
Release: 10.10
Codename: maverick
# pg_lsclusters
Version Cluster Port Status Owner Data directory Log file
8.2 main 5433 online postgres /var/lib/postgresql/8.2/main /var/log/postgresql/postgresql-8.2-main.log
8.4 main 5432 online postgres /var/lib/postgresql/8.4/main /var/log/postgresql/postgresql-8.4-main.log
Debian's postgresql packages are designed to be installable side by side, with pg_*cluster
commands for controlling them, which makes installing from a .deb a great idea. Unfortunately it looks like hardy (8.04) was the last version of Ubuntu to package postgresql-8.2 (in universe), I'm certain that the libraries it was compiled against are different than what you've got now, and would probably conflict against what you have if you tried to just install the package.
The easiest way to rebuild the package would be to add deb-src
lines to your sources for Hardy:
deb-src http://us.archive.ubuntu.com/ubuntu/ hardy universe
deb-src http://us.archive.ubuntu.com/ubuntu/ hardy-updates universe
deb-src http://us.archive.ubuntu.com/ubuntu/ hardy-security universe
Then, after an apt-get update
, you should use apt-get build-dep postgresql-8.2
to install all the build dependencies. If something can't be found at all in Maverick, you're going to have to make a judgement call on whether the package changed its name and install it by hand, or build that package from source too. Once you have all the build dependencies installed, apt-get source --compile postgresql-8.2
will fetch the source and build debian packages for all of these, using the library versions found in Maverick.