Compiler pgpool II 3.0.1 sous Debian

Compiler pgpool II 3.0.1 sous Debian

Prerequis

Installer les dependances necessaire a la compilation :

aptitude install make gcc g++ libpq-dev

Telecharger les sources sur http://www.pgpool.net/ puis les decompresser

Installation

Configurer et compiler :

./configure --prefix=/usr/local/pgpool
make
make install

Configuration

Configurer pgpool

Les fichiers de configuration se trouve dans le dossier /usr/local/pgpool/etc/

Mise en place du script d’init (/etc/init.d/pgpool)

#! /bin/sh

PATH=/usr/local/pgpool/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/local/pgpool/bin/pgpool
PIDFILE=/var/run/pgpool.pid

test -x $DAEMON || exit 5

. /lib/lsb/init-functions

case "$1" in
    start)
	log_daemon_msg "Starting pgpool-II" pgpool
	$DAEMON
	log_end_msg $?
	;;
    stop)
	log_daemon_msg "Stopping pgpool-II" pgpool
	$DAEMON stop
	log_end_msg $?
	;;
    restart|force-reload)
	log_daemon_msg "Restarting pgpool-II" pgpool
	$DAEMON stop && sleep 1 && $DAEMON
	log_end_msg $?
	;;
    *)
	log_failure_msg "Usage: $0 {start|stop}"
	exit 2
	;;
esac
comments powered by Disqus