Understanding LDAP (part 2) - Building Blocks (Page 3 of 9 )
The first order of business to install OpenLDAP on your Linux box. Drop by the official Web site at
http://www.openldap.org/ and get yourself the latest stable release of the software (this tutorial uses OpenLDAP 2.1.12). Note that you will also need a copy of the SleepyCat Berkeley DB database engine, available from
http://www.sleepycat.com/ (this tutorial uses Berkeley DB 4.1.25)
Once you've downloaded the source code archive to your Linux box (mine is named "olympus"), log in as "root".
[me@olympus] $ su -
Password: ****
You'll first need to compile and install Berkeley DB. Extract the
source to a temporary directory.
[root@olympus] $ cd /tmp
[root@olympus] $ tar -xzvf db-4.1.25.tar.gz
Next, configure the package using the provided "configure" script,
[root@olympus] $ cd /tmp/db-4.1.25
[root@olympus] $ cd build_unix[root@olympus] $ ../dist/configure
and compile and install it.
[root@olympus] $ make
[root@olympus] $ make install
Unless you specified a different path to the "configure" script, Berkeley DB will have been installed to the directory "/usr/local/BerkeleyDB.4.1".
Next, you need to install the OpenLDAP software proper. Again, extract the source archive to a temporary directory.
[root@olympus] $ cd /tmp
[root@olympus] $ tar -xzvf openldap-stable-20030107.tar.gz
Next, configure the package using the provided "configure" script,
[root@olympus] $ cd /tmp/openldap-2.1.12
[root@olympus] $ ./configure --prefix=/usr/local/openldap
and compile and install it.
[root@olympus] $ make depend
[root@olympus] $ make
[root@olympus] $ make install
Since I specified a custom path to the "configure" script, OpenLDAP
will have been installed to the directory "/usr/local/openldap".
It must be noted that "configure" sometimes barfs when including the Berkeley DB library into OpenLDAP. In case you have this problem, explicitly tell "configure" where to find the files, as follows:
[root@olympus] $ env CPPFLAGS="-I/usr/local/BerkeleyDB.4.1/include"
LDFLAGS="-L/usr/local/BerkeleyDB.4.1/lib" ./configure
--prefix=/usr/local/openldap
Once you've got OpenLDAP installed, the next step is to configure
it.
Next: The Root Of All Evil >>
More Administration Articles
More By icarus, (c) Melonfire