Getting started with Slony-I

Installation

Before you can begin replicating your databases with Slony-I, you need to
install it.

Requirements:

Any platform that can run PostgreSQL should be able to run Slony-I.  The
platforms that have received specific testing at the time of this release are
FreeBSD-4X-i368, FreeBSD-5X-i386, FreeBSD-5X-alpha, OS/X-10.3, Linux-2.4X-i386
Linux-2.6X-i386 Linux-2.6X-amd64, Solaris-2.8-SPARC, Solaris-2.9-SPARC,
OpenBSD-3.5-i386 and OpenBSD-3.5-sparc64.

All the servers used within the replication cluster need to have their Real
Time Clocks in sync. This is to ensure that slon doesn't error with messages
indicating that slave is already ahead of the master during replication.  We
recommend you use ntpd running on the master, with the slaves using it as
their time peer.

The following software packages are required to build Slony-I:

GNU make.  Other make programs will not work.  GNU make is often installed
under the name gmake; this document will always refer to it by that name. (On
some systems GNU make is the default tool with the name make) to test for GNU
make enter "gmake --version".  Version 3.76 or later is good.  Previous
versions may not be.

You will need an ISO/ANSI C complier and a working POSIX threads libary. Recent 
versions of GCC work.

You also need a recent version of PostgreSQL with server headers installed.
Slony-I depends on namespace support so you must have version 7.3.3 or newer to 
be able to build and use Slony-I.

If you need to get a GNU package, it comes in the standard packaging for your
operating system, or you can find it at your local GNU mirror (see
http://www.gnu.org/order/ftp.html for a list) or at ftp://ftp.gnu.org/gnu.)

Also check to make sure you have sufficient disk space.  You will need
approximately 5MB for the source tree during build and installation.

Getting Slony-I Source

You can get the Slony-I source from <http://slony.info/>

After you have obtained the file, unpack it.

gunzip slony1-1.1.0.tar.gz
tar xf slony1-1.1.0.tar

This will create a directory slony1-1.0.0 under the current directory with the
Slony-I sources.  Change into that that directory for the rest of the
installation procedure.


Short Version

./configure
gmake all
gmake install

1. Configure
./configure

This script will run a number of tests to guess values for various dependent
variables and try to detect some quirks of your system.  Slony-I is known to
need a modified version of libpq on specific platforms such as Solaris2.X on
SPARC this patch can be found at <http://slony.info/>.

2.  Build

To start the build process, type

gmake all

(Remember to use GNU make) The build make take any ware from 30 seconds to 2
minutes depending on your hardware.  The last line displayed should be

All of Slony-I is successfully made.  Ready to install.

3.  Installing Slony-I

To install Slony-I, enter

gmake install

This will install files into PostgreSQL install directory as specified by the
--prefix option used in the PostgreSQL configuration (as returned by pg_config).
Make sure you have appropriate permissions to write into that area.  Normally 
you need to do this as root.
