Kernel needs
==============

  Compile a kernel with the following options :

  Kernel/User netlink socket
  LinuxVirtualServer

  Keepalived supports all LVS code.

Library dependencies
====================

  In order to compile Keepalived needs the following libraries :

  * OpenSSL, <www.openssl.org>

Linux flavours
==============

RedHat based systems (RedHat Enterprise/CentOS/Fedora)
------------------------------------------------------
The following libraries need to be installed:
	openssl-devel libnl3-devel ipset-devel iptables-devel libnfnetlink-devel
For SNMP support:
	net-snmp-devel
For DBUS support:
	glib2-devel
For JSON support:
	json-c-devel

For building the documentation, the following packages need to be installed:
	Fedora: python-sphinx (will pull in: python2-sphinx_rtd_theme)
	CentOS-and-friends: python-sphinx epel-release python-sphinx_rtd_theme
   For latex or pdf files, the following are also needed:
	Fedora: latexmk python-sphinx-latex
	CentOS-and-friends: latexmk texlive texlive-titlesec texlive-framed texlive-threeparttable texlive-wrapfig texlive-multirow

Debian/Ubuntu
-------------
On Debian, install:
	pkg-config
The following libraries need to be installed:
	iptables-dev libipset-dev libnfnetlink-dev libnl-3-dev libnl-genl-3-dev libnl-route-3-dev libssl-dev
For SNMP support:
	libsnmp-dev
For DBUS support:
	libglib2.0-dev
For JSON support:
	libjson-c-dev

For building the documentation, the following packages need to be installed:
	python-sphinx python-sphinx-rtd-theme
   For latex or pdf files, the following are also needed:
	texlive-latex-base texlive-generic-extra texlive-latex-recommended texlive-fonts-recommended texlive-latex-extra

Alpine Linux
------------
The following libraries need to be installed:
	iptables-dev ipset-dev libnfnetlink-dev libnl3-dev musl-dev and openssl-dev or libressl-dev
For SNMP support:
	net-snmp-dev (requires libressl-dev and not openssl-dev)

For building the documentation, the following packages need to be installed:
	py-sphinx py3-sphinx_rtd_theme
   For latex or pdf files, you'll need texlive or similar, which is not yet
   available as a distro package.


Archlinux
---------
Run the following to install the required libraries:
	pacman -S ipset libnfnetlink libnl1
For SNMP support:
	pacman -S net-snmp
For building the documentation, the following packages need to be installed:
	python-sphinx python-sphinx_rtd_theme
   For latex or pdf files, the following are also needed:
	texlive-core texlive-bin texlive-latexextra

Installation
============

  1. uncompress the tarball
  2. cd into the directory
  3. './configure'
  4. 'make'
  5. 'make install'. This will install keepalived on your system,
     binaries and configuration file :
     * keepalived : The keepalived daemon program.
     * genhash : The MD5 url digest generator. You need it to 
                 configure HTTP GET check and SSL GET check in
                 order to compute MD5SUM digest etalon.
     * /etc/keepalived/keepalived.conf
  6. link keepalived.init into your runlevel directory. On Red Hat systems :
     ln -s /etc/rc.d/init.d/keepalived.init /etc/rc.d/rc3.d/S99keepalived

  By default the configure script uses /usr/local as base directory. You can
  change this value to your own by passing it the --prefix value.

  eg: './configure --prefix=/usr/'

Modifying source code
=====================

If you modify the source code, especially configure.ac or any Makefile.am
file, you will need to regenerate the build files. Keepalived uses automake
and so you will need to have automake and autoconf installed.

To regenerate the build environment, you will need to run the following
commands before following the instuctions under 'Installation' above:

  1. 'aclocal'
  2. 'autoheader'
  3. 'automake --add-missing' # add -c option if going to commit to git
  4. 'autoreconf'

If you are attempting to build keepalived after cloning
https://github.com/acassen/keepalived and you don't have automake available,
you may find it useful first to run 'find . -exec touch -r configure {} +'.

Configuration
=============

  Just take a look at the /etc/keepalived/keepalived.conf file installed.
  It will give you all the information needed. Alternativley, run
  'man keepalived.conf' or look at doc/keepalived.conf.SYNOPSIS.
  If you want more information about keepalived, please refer to the
  keepalived homepage into the documentation section.

  http://www.keepalived.org


Have fun with it !

Alexandre, <acassen@linux-vs.org>
