776. [func] tomek
b10-dhcp4 and b10-dhcp6 now support using PostgreSQL as the backend
for storing lease data. This backend is enabled by specifying
- --with-dhcp-pgsql on the "configure" command line. Without this
+ --with-pgsql on the "configure" command line. Without this
switch the PostgreSQL backend is not compiled leaving BIND 10 able to
be built on systems without PostgreSQL installed. Thanks to David
Carlier who contributed the initial patches for this work.
Add initial version of a MySQL backend for the DHCP code. This
implements the basic IPv6 lease access functions - add lease, delete
lease and update lease. The backend is enabled by specifying
- --with-dhcp-mysql on the "configure" command line: without this
+ --with-mysql on the "configure" command line: without this
switch, the MySQL code is not compiled, so leaving BIND 10 able to
be built on systems without MySQL installed.
(Trac #2342, git c7defffb89bd0f3fdd7ad2437c78950bcb86ad37)
# the --with-mysql-config (default to /usr/bin/mysql-config). By default,
# the software is not built with MySQL support enabled.
mysql_config="no"
-AC_ARG_WITH([dhcp-mysql],
- AC_HELP_STRING([--with-dhcp-mysql=PATH],
+AC_ARG_WITH([mysql],
+ AC_HELP_STRING([--with-mysql=PATH],
[path to the MySQL 'mysql_config' script (MySQL is used for the DHCP database)]),
[mysql_config="$withval"])
if test "$MYSQL_CONFIG" != "" ; then
if test -d "$MYSQL_CONFIG" -o ! -x "$MYSQL_CONFIG" ; then
- AC_MSG_ERROR([--with-dhcp-mysql should point to a mysql_config program])
+ AC_MSG_ERROR([--with-mysql should point to a mysql_config program])
fi
MYSQL_CPPFLAGS=`$MYSQL_CONFIG --cflags`
AM_CONDITIONAL(HAVE_MYSQL, test "$MYSQL_CONFIG" != "")
pg_config="no"
-AC_ARG_WITH([dhcp-pgsql],
- AC_HELP_STRING([--with-dhcp-pgsql=PATH],
+AC_ARG_WITH([pgsql],
+ AC_HELP_STRING([--with-pgsql=PATH],
[path to the PostgreSQL 'pg_config' script]),
[pg_config="$withval"])
if test "$PG_CONFIG" != "" ; then
if test -d "$PG_CONFIG" -o ! -x "$PG_CONFIG" ; then
- AC_MSG_ERROR([--with-dhcp-pgsql should point to a pg_config program])
+ AC_MSG_ERROR([--with-pgsql should point to a pg_config program])
fi
PGSQL_CPPFLAGS=`$PG_CONFIG --cppflags`
See @ref unitTests for instructions on how to run unit-tests. If you
happen to touch any database related code, make sure you compile
-your code with @c --with-dhcp-mysql, @c --with-dhcp-pgsql and/or
+your code with @c --with-mysql, @c --with-pgsql and/or
@c --with-cql as needed. For example, if you change something
substantial, make sure the other compilation options still work.
code, you are likely to be interested in enabling a non-default database
backends for DHCP. Note that if the backend is not enabled,
the database-specific unit-tests are skipped. To enable the MySQL backend,
-use the switch \c --with-dhcp-mysql; for PostgreSQL, use \c --with-dhcp-pgsql.
+use the switch \c --with-mysql; for PostgreSQL, use \c --with-pgsql.
A complete list of all switches can be obtained with the command:
@code
%@endverbatim
The unit tests are run automatically when "make check" is executed (providing
- that Kea has been build with the \c --with-dhcp-mysql switch (see the installation
+ that Kea has been build with the \c --with-mysql switch (see the installation
section in the <a href="http://kea.isc.org/docs/kea-guide.html">Kea Administrator
Reference Manual</a>).
that runs tests. Use caution!
The unit tests are run automatically when "make check" is executed (providing
- that Kea has been build with the \c --with-dhcp-pgsql switch (see the installation
+ that Kea has been build with the \c --with-pgsql switch (see the installation
section in the <a href="http://kea.isc.org/docs/kea-guide.html">Kea Administrator
Reference Manual</a>).
# parameters are type and name. If other parameters are not specified,
# Kea will assume the database is avaiable on localhost, that user and
# password is not necessary to connect and that timeout is 5 seconds.
-# Kea must be compiled with --with-dhcp-mysql option to use this backend.
+# Kea must be compiled with --with-mysql option to use this backend.
# "lease-database": {
# "type": "mysql",
# "name": "keatest",
# parameters are type and name. If other parameters are not specified,
# Kea will assume the database is avaiable on localhost, that user and
# password is not necessary to connect and that timeout is 5 seconds.
-# Kea must be compiled with --with-dhcp-pgsql option to use this backend.
+# Kea must be compiled with --with-pgsql option to use this backend.
# "lease-database": {
# "type": "pgsql",
# "name": "keatest",
# parameters are type and name. If other parameters are not specified,
# Kea will assume the database is avaiable on localhost, that user and
# password is not necessary to connect and that timeout is 5 seconds.
-# Kea must be compiled with --with-dhcp-mysql option to use this backend.
+# Kea must be compiled with --with-mysql option to use this backend.
# "lease-database": {
# "type": "mysql",
# "name": "keatest",
# parameters are type and name. If other parameters are not specified,
# Kea will assume the database is avaiable on localhost, that user and
# password is not necessary to connect and that timeout is 5 seconds.
-# Kea must be compiled with --with-dhcp-pgsql option to use this backend.
+# Kea must be compiled with --with-pgsql option to use this backend.
# "lease-database": {
# "type": "pgsql",
# "name": "keatest",
<listitem>
<para>
The MySQL client and the client development libraries, when using
- the --with-dhcp-mysql configuration flag to build the Kea MySQL
+ the --with-mysql configuration flag to build the Kea MySQL
database backend. In this case an instance of the MySQL server
running locally or on a machine reachable over a network
is required. Note that
<listitem>
<para>
The PostgreSQL client and the client development libraries, when
- using the --with-dhcp-pgsql configuration flag to build the Kea
+ using the --with-pgsql configuration flag to build the Kea
PostgreSQL database backend. In this case an instance of the
PostgreSQL server running locally or on some other machine,
reachable over the network from the machine running Kea, is
</varlistentry>
<varlistentry>
- <term>--with-dhcp-mysql</term>
+ <term>--with-mysql</term>
<listitem>
<simpara>
Build Kea with code to allow it to store leases (and access
</varlistentry>
<varlistentry>
- <term>--with-dhcp-pgsql</term>
+ <term>--with-pgsql</term>
<listitem>
<simpara>
Build Kea with code to allow it to store leases (and access
<screen>$ <userinput>./configure \
--with-boost-include=/usr/pkg/include \
- --with-dhcp-pgsql=/usr/local/bin/pg_config \
+ --with-pgsql=/usr/local/bin/pg_config \
--prefix=/opt/kea</userinput></screen>
</para>
<para>
Build and install Kea as described in <xref linkend="installation"/>, with
the following modification. To enable the MySQL database code, at the
- "configure" step (see <xref linkend="configure"/>), the --with-dhcp-mysql switch
+ "configure" step (see <xref linkend="configure"/>), the --with-mysql switch
should be specified:
- <screen><userinput>./configure [other-options] --with-dhcp-mysql</userinput></screen>
+ <screen><userinput>./configure [other-options] --with-mysql</userinput></screen>
If MySQL was not installed in the default location, the location of the MySQL
configuration program "mysql_config" should be included with the switch, i.e.
- <screen><userinput>./configure [other-options] --with-dhcp-mysql=<replaceable>path-to-mysql_config</replaceable></userinput></screen>
+ <screen><userinput>./configure [other-options] --with-mysql=<replaceable>path-to-mysql_config</replaceable></userinput></screen>
</para>
<para>
See <xref linkend="mysql-database-create"/> for details regarding
<para>
Build and install Kea as described in <xref linkend="installation"/>, with
the following modification. To enable the PostgreSQL database code, at the
- "configure" step (see <xref linkend="configure"/>), the --with-dhcp-pgsql switch
+ "configure" step (see <xref linkend="configure"/>), the --with-pgsql switch
should be specified:
- <screen><userinput>./configure [other-options] --with-dhcp-pgsql</userinput></screen>
+ <screen><userinput>./configure [other-options] --with-pgsql</userinput></screen>
If PostgreSQL was not installed in the default location, the location of the PostgreSQL
configuration program "pg_config" should be included with the switch, i.e.
- <screen><userinput>./configure [other-options] --with-dhcp-pgsql=<replaceable>path-to-pg_config</replaceable></userinput></screen>
+ <screen><userinput>./configure [other-options] --with-pgsql=<replaceable>path-to-pg_config</replaceable></userinput></screen>
</para>
<para>
See <xref linkend="pgsql-database-create"/> for details regarding
// Starting tests which require MySQL backend availability. Those tests
// will not be executed if Kea has been compiled without the
-// --with-dhcp-mysql.
+// --with-mysql.
#ifdef HAVE_MYSQL
/// @brief Test fixture class for the test utilizing MySQL database backend.
// Starting tests which require MySQL backend availability. Those tests
// will not be executed if Kea has been compiled without the
-// --with-dhcp-pgsql.
+// --with-pgsql.
#ifdef HAVE_PGSQL
/// @brief Test fixture class for the test utilizing PostgreSQL database backend.
// Starting tests which require MySQL backend availability. Those tests
// will not be executed if Kea has been compiled without the
-// --with-dhcp-mysql.
+// --with-mysql.
#ifdef HAVE_MYSQL
/// @brief Test fixture class for the tests utilizing MySQL database
// Starting tests which require MySQL backend availability. Those tests
// will not be executed if Kea has been compiled without the
-// --with-dhcp-mysql.
+// --with-mysql.
#ifdef HAVE_MYSQL
/// @brief Test fixture class for the tests utilizing MySQL database
- The MySQL lease manager uses the freely available MySQL as its backend
database. This is not included in Kea DHCP by default:
- the \--with-dhcp-mysql switch must be supplied to "configure" for support
+ the \--with-mysql switch must be supplied to "configure" for support
to be compiled into the software.
- The PostgreSQL lease manager uses the freely available PostgreSQL as its
backend database. This is not included in Kea DHCP by default:
- the \--with-dhcp-pgsql switch must be supplied to "configure" for
+ the \--with-pgsql switch must be supplied to "configure" for
support to be compiled into the software.
@section dhcpdb-instantiation Instantiation of Lease Managers