Slony-I REL_1_1_0 Documentation | ||||
---|---|---|---|---|
Prev | Fast Backward | Fast Forward | Next |
You should have obtained the Slony-I source from the previous step. Unpack it.
gunzip slony.tar.gz; tar xf slony.tar
This will create a directory under the current directory with the Slony-I sources. Head into that that directory for the rest of the installation procedure.
PGMAIN=/usr/local/pgsql746-freebsd-2005-04-01 \ ./configure \ --prefix=$PGMAIN \ --bindir=$PGMAIN/bin \ --datadir=$PGMAIN/share \ --libdir=$PGMAIN/lib \ --with-pgconfigdir=$PGMAIN/bin \ --with-pgbindir=$PGMAIN/bin \ --with-pgincludedir=$PGMAIN/include \ --with-pglibdir=$PGMAIN/lib \ --with-pgsharedir=$PGMAIN/share gmake all; gmake install
The first step of the installation procedure is to configure the source tree for your system. This is done by running the configure script. In early versions, configure needed to know where your PostgreSQL source tree is, which was done with the --with-pgsourcetree= option. As of version 1.1, this is no longer necessary, as Slony-I has included within its own code base certain parts needed for platform portability. It now only needs to make reference to parts of PostgreSQL that are actually part of the installation. Therefore, Slony-I is configured by pointing it to the various library, binary, and include directories. For a full list of these options, use the command ./configure --help
PGMAIN=/opt/dbs/pgsql746-aix-2005-04-01 \ ./configure \ --prefix=$PGMAIN \ --bindir=$PGMAIN/bin \ --datadir=$PGMAIN/share \ --libdir=$PGMAIN/lib \ --with-pgconfigdir=$PGMAIN/bin \ --with-pgbindir=$PGMAIN/bin \ --with-pgincludedir=$PGMAIN/include \ --with-pglibdir=$PGMAIN/lib \ --with-pgsharedir=$PGMAIN/share
The configure 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. The patch for libpq version 7.4.2 can be found at http://developer.postgresql.org/~wieck/slony1/download/threadsafe-libpq-742.diff.gz Similar patches may need to be constructed for other versions; see the FAQ entry on thread safety .
To start the build process, type
gmake all
Be sure to use GNU make; on BSD systems, it is called gmake; on Linux, GNU make is typically the "native" make, so the name of the command you type in may be either make or gmake. On other platforms, you may need additional packages or even install GNU make from scratch. The build may take anywhere from a few seconds to 2 minutes depending on how fast your hardware is at compiling things. The last line displayed should be
All of Slony-I is successfully made. Ready to install.
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 installation. Make sure you have appropriate permissions to write into that area. Normally you need to do this either as root or as the postgres user.