Update with code captions
This commit is contained in:
parent
d769d59c85
commit
19ab22b675
@ -2,6 +2,7 @@
|
|||||||
layout: default
|
layout: default
|
||||||
title: OpenLDAP 2.4 to 2.6 upgrade
|
title: OpenLDAP 2.4 to 2.6 upgrade
|
||||||
date: 2023-05-19 23:28 +0200
|
date: 2023-05-19 23:28 +0200
|
||||||
|
tags: Gentoo LDAP
|
||||||
---
|
---
|
||||||
OpenLDAP >= 2.5 drops Berkeley DB based @hdb@ and @bdb@ backends support. Backend
|
OpenLDAP >= 2.5 drops Berkeley DB based @hdb@ and @bdb@ backends support. Backend
|
||||||
upgrade - preferably to @mdb@ - is required before version upgrade.
|
upgrade - preferably to @mdb@ - is required before version upgrade.
|
||||||
@ -11,10 +12,10 @@ deployments the config database must be exported via @slapcat@, config export
|
|||||||
modified as required, then resulting config database imported.
|
modified as required, then resulting config database imported.
|
||||||
|
|
||||||
Upstream documentation:
|
Upstream documentation:
|
||||||
* "B. Upgrading from 2.x":https://www.openldap.org/doc/admin25/appendix-upgrading.html
|
"Upgrading from 2.4.x":https://www.openldap.org/doc/admin25/appendix-upgrading.html
|
||||||
|
|
||||||
|
|
||||||
h2. Backup database and configuration
|
h3(#backup). Backup database and configuration
|
||||||
|
|
||||||
{% highlight bash %}
|
{% highlight bash %}
|
||||||
/etc/init.d/slapd stop
|
/etc/init.d/slapd stop
|
||||||
@ -24,11 +25,11 @@ mv /var/lib/openldap-data /var/lib/openldap-data-2.4
|
|||||||
{% endhighlight %}
|
{% endhighlight %}
|
||||||
|
|
||||||
|
|
||||||
h2. Migrate to @mdb@ backend
|
h3. Migrate to @mdb@ backend
|
||||||
|
|
||||||
Update _/etc/openldap/slapd.conf_ as follows:
|
Replace backend module and set database type:
|
||||||
|
|
||||||
{% highlight config %}
|
{% highlight file caption=/etc/openldap/slapd.conf %}
|
||||||
...
|
...
|
||||||
# moduleload back_hdb.so
|
# moduleload back_hdb.so
|
||||||
moduleload back_mdb.so
|
moduleload back_mdb.so
|
||||||
@ -37,7 +38,7 @@ database mdb
|
|||||||
...
|
...
|
||||||
{% endhighlight %}
|
{% endhighlight %}
|
||||||
|
|
||||||
Then restore database and convert config to directory format (in that order):
|
Restore database and convert config to directory format (in that order):
|
||||||
|
|
||||||
{% highlight bash %}
|
{% highlight bash %}
|
||||||
mkdir /var/lib/openldap-data
|
mkdir /var/lib/openldap-data
|
||||||
@ -52,16 +53,14 @@ slaptest -f slapd.conf -F slapd.d
|
|||||||
/etc/init.d/slapd start
|
/etc/init.d/slapd start
|
||||||
{% endhighlight %}
|
{% endhighlight %}
|
||||||
|
|
||||||
Now is the time to verify if LDAP dependent services work like before migration.
|
Verify if LDAP dependent services work like before migration - they should.
|
||||||
They should.
|
|
||||||
|
|
||||||
|
|
||||||
h2. Upgrade to 2.6
|
h3. Upgrade to 2.6
|
||||||
|
|
||||||
Before upgrade:
|
Before upgrade:
|
||||||
* check @openldap@ @USE@ flags,
|
* check @openldap@ @USE@ flags,
|
||||||
* backup database and configuration if applicable
|
* backup database and configuration ("see above":#backup),
|
||||||
|
|
||||||
then proceed with upgrade:
|
then proceed with upgrade:
|
||||||
|
|
||||||
{% highlight bash %}
|
{% highlight bash %}
|
||||||
@ -71,7 +70,7 @@ dispatch-conf
|
|||||||
|
|
||||||
Remove @ppolicy@ overlay, which is now implemented internally:
|
Remove @ppolicy@ overlay, which is now implemented internally:
|
||||||
|
|
||||||
{% highlight config %}
|
{% highlight file caption=/etc/openldap/slapd.conf %}
|
||||||
...
|
...
|
||||||
#include /etc/openldap/schema/ppolicy.schema
|
#include /etc/openldap/schema/ppolicy.schema
|
||||||
...
|
...
|
Loading…
x
Reference in New Issue
Block a user