parameters. Let's comment this out When default parameters are used, the
Memfile backend will write leases to a disk in the
[kea-install-dir]/var/kea/kea-leases4.csv. -->
- The following configuration:
+ The following configuration sets the name of the lease file to
+ /tmp/kea-leases4.csv:
+
<screen>
"Dhcp4": {
"lease-database": {
...
}
</screen>
- ...sets the name of the lease file to /tmp/kea-leases4.csv.
</para>
<para>The "persist" parameter controls whether the leases are written to disk.
parameters. Let's comment this out When default parameters are used, the
Memfile backend will write leases to a disk in the
[kea-install-dir]/var/kea/kea-leases4.csv. -->
- The following configuration:
+ The following configuration sets the name of the lease file to
+ /tmp/kea-leases6.csv:
+
<screen>
"Dhcp6": {
"lease-database": {
...
}
</screen>
- ...sets the name of the lease file to /tmp/kea-leases6.csv.
</para>
<para>The "persist" parameter controls whether the leases are written to disk.
</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"/>), specify the location of the
- MySQL configuration program "mysql_config" with the "--with-dhcp-mysql" switch,
- i.e.
+ the following modification. To enable the MySQL database code, at the
+ "configure" step (see <xref linkend="configure"/>), do:
<screen><userinput>./configure [other-options] --with-dhcp-mysql</userinput></screen>
- ...if MySQL was installed in the default location, or:
+ Or specify the location of the MySQL configuration program
+ "mysql_config" if MySQL was not installed in the default location:
<screen><userinput>./configure [other-options] --with-dhcp-mysql=<replaceable>path-to-mysql_config</replaceable></userinput></screen>
- ...if not.
</para>
</section>
<section id="dhcp-mysql-database-create">
<para>
2. Create the database:
<screen>mysql> <userinput>CREATE DATABASE <replaceable>database-name</replaceable>;</userinput></screen>
- ... <replaceable>database-name</replaceable> is the name you have chosen for the database.
+ (<replaceable>database-name</replaceable> is the name you
+ have chosen for the database.)
</para>
<para>
3. Create the database tables by running the dhcpdb_create.mysql script supplied as part of Kea:
</para>
<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"/>), specify the location of the
- PostgreSQL configuration program "pg_config" with the "--with-dhcp-pgsql" switch,
- i.e.
+ the following modification. To enable the PostgreSQL database code, at the
+ "configure" step (see <xref linkend="configure"/>), do:
<screen><userinput>./configure [other-options] --with-dhcp-pgsql</userinput></screen>
- ...if PostgreSQL was installed in the default location, or:
+ Or specify the location of the PostgreSQL configuration
+ program "pg_config" if PostgreSQL was not installed in
+ the default location:
<screen><userinput>./configure [other-options] --with-dhcp-pgsql=<replaceable>path-to-pg_config</replaceable></userinput></screen>
- ...if not.
</para>
</section>
<section id="dhcp-pgsql-database-create">
CREATE DATABASE
postgres=#
</screen>
- ... <replaceable>database-name</replaceable> is the name you have chosen for the database.
+ (<replaceable>database-name</replaceable> is the name you
+ have chosen for the database.)
</para>
<para>
3. Create the user under which Kea will access the database (and give it a password), then grant it access to the database:
<para>
The optional <command>-s</command> switch allows
the selection of the servers to which <command>keactrl</command>
- command is issued. For example,
+ command is issued. For example, the following
+ instructs <command>keactrl</command> to stop the
+ <command>kea-dhcp4</command> and <command>kea-dhcp6</command> servers
+ and leave the <command>kea-dhcp-ddns</command> server running:
<screen>
<userinput>$ keactrl stop -s dhcp4,dhcp6</userinput>
</screen>
- ... instructs <command>keactrl</command> to stop the
- <command>kea-dhcp4</command> and <command>kea-dhcp6</command> servers
- and leave the <command>kea-dhcp-ddns</command> running.
</para>
<para>
- Similarly,
+ Similarly, the following
+ will only start the <command>kea-dhcp4</command> and
+ <command>kea-dhcp-ddns</command> servers and not
+ <command>kea-dhcp6</command>.
<screen>
<userinput>$ keactrl start -s dhcp4,dhcp_ddns</userinput>
</screen>
- ... will only start the <command>kea-dhcp4</command> and
- <command>kea-dhcp-ddns</command> servers and not
- <command>kea-dhcp6</command>.
</para>
<para>
Note that the behavior of the <command>-s</command> switch