Securing-Optimizing-RH-Linux-1_2_318
Comments and suggestions concerning this book should be mailed to gmourani@videotron.ca
© Copyright 1999-2000 Gerhard Mourani and Open Network Architecture ®
318
find /* > ldp1 before and find /* > ldp2 after you install the software, and use diff ldp1 ldp2 >
ldp to get a list of what changed.
Compilation
Decompress the tarball (tar.gz).
[root@deep /]# cp openldap-version.tgz /var/tmp
[root@deep /]# cd /var/tmp/
[root@deep tmp]# tar xzpf openldap-version.tgz
Compile and Optimize
Move into the new OpenLDAP directory and type the following commands on your terminal:
Step 1
Edit the string.h file (vi +52 include/ac/string.h) and remove the lines:
#else
/* some systems have strdup(), but fail to declare it */
extern char *(strdup)();
The lines above dont apply to our Linux system and must be removed for clarity.
Step 2
It is important to note that you can configure three different kinds of backend database with
LDAP. A high-performance disk-based database named LDBM; a database interface to arbitrary
UNIX commands or shell scripts named SHELL; and a simple password file database named
PASSWD.
The default installation of OpenLDAP assumes an LDBM backend database, so if you want to
configure another type of backend database, you must specify it during the configuration and
compile time. For a SHELL backend database you must add the --enable-shell option and for a
PASSWD backend database (used as replacement for NIS service) you must add the --enable-
passwd option in your configuration lines.
CC="egcs" \
CFLAGS="-O9 -funroll-loops -ffast-math -malign-double -mcpu=pentiumpro -march=pentiumpro -fomit-
frame-pointer -fno-exceptions" \
./configure \
--prefix=/usr \
--libexecdir=/usr/sbin \
--localstatedir=/var/run \
--sysconfdir=/etc \
--enable-dns \
--enable-shared \
--with-gnu-ld
This tells OpenLDAP to set itself up for this particular hardware setup with:
- Enable dns support.
- Build shared libraries.
- Assume the C compiler uses GNU ld.