Developers guide

Chapter 8
Copyright © 2008-2013 Inverse inc.
Operating System Best Practices 66
Once you downloaded those packages, you need to modify the logging configuration file (conf/log.conf)
with something like the following example. Note that log4perl is almost the same as log4j, so you should
be able to find a lot of documentation online.
log4perl.appender.LOGFILE=Log::Dispatch::FileRotate
log4perl.appender.LOGFILE.filename=/usr/local/pf/logs/packetfence.log
log4perl.appender.LOGFILE.mode=append
log4perl.appender.LOGFILE.autoflush=1
log4perl.appender.LOGFILE.size=51200000
log4perl.appender.LOGFILE.max=5
log4perl.appender.LOGFILE.layout=PatternLayout
log4perl.appender.LOGFILE.layout.ConversionPattern=%d{MMM dd HH:mm:ss} %X{proc}
(%X{tid}) %p: %m (%M)%n
High Availability
A high availability setup (active/passive) for PacketFence can be created using two PacketFence servers
and the following open source utilities:
Linux-HA (www.linux-ha.org) A daemon that provides cluster infrastructure
to its clients. Heartbeat would be responsible
for starting the PacketFence services,
eventually
DRBD (www.drbd.org) A network based raid-1.
Since PacketFence stores most of its information in a MySQL database, the two PacketFence redundant
servers need to share this database in a way or another.
There are different options to share the database between the two PacketFence servers:
A local MySQL database server on each PacketFence box configured to store its databases on a remote
partition (a LUN on a SAN for example)
Caution
You have to make sure that only one database server is running at each time (don’t
double-mount the partition)
A local MySQL database server on each PacketFence box and replication of the database partition using
DRBD
A remote MySQL database server with its own high availability setup
In this document, we describe the second option that involves DRBD.
We assume that:
you are using RedHat Enterprise 5 or CentOS 5.
pf1 is the first PacketFence server