From 389 Directory Server
NOTE: This is the legacy build page, for Fedora Directory Server 1.0.4 and earlier. See Building for information about building Fedora DS 1.1 and later.
Contents |
Compilers
- Linux - gcc 3.2.3, gcc 4.0
- Solaris - Sun Workshop compiler 6.x or higher (aka Forte C compiler)
- Windows 2000 - Visual C++ 6.0
- HP/UX - ANSI-C compliant compiler (cc, usually found in /opt/ansic), and aC++ (aCC, usually found in /opt/aCC)
gcc may work on platforms other than Linux but it has not been tested. Other versions of gcc may also work but we use the above versions.
Tools you need
- Perl 5.6+
- URI::Escape
- cvs 1.11+
- GNU make 3.79.1+ ("gmake", or just "make" on Linux systems)
- GNU tar
- gzip
- zip
- java 1.4.2 or later - Must be the Sun or IBM JDK - see Install_Guide for more details - GCJ 4.1 or later may be used to build, but it will not run the console
- ant 1.6.1 or later
- Apache 2 developer files
- Linux - the httpd-devel and/or apr-devel packages - you need the apr-config and apxs binaries in your PATH at build time
- Solaris - this may be /usr/local/apache2
- HP/ux - There is a free depot web services download which includes Apache2 and Tomcat
In general, you'll need to have the compilers and tools listed above in your PATH for your operating system. The following are some OS specific settings required to be made to PATH.
The adminutil build wants the current directory "." to be in your PATH.
Fedora Core/RHEL
No special tools are required. Most everything is included with the OS. Just make sure you have installed the programming and/or the development packages that contain cvs, gcc, make, etc.
Among the required packages are:
- db4-devel
- krb5-devel
- libtermcap-devel
- ncurses-devel
- java (ibm or sun jdk 1.4.2)
- ant (1.6.1 or later)
- httpd-devel
- apr-devel
Fedora DS 1.0.4 can use the system net-snmp (FC3/RHEL4 and later) and cyrus-sasl (FC2/RHEL3 and later).
- net-snmp
- net-snmp-libs
- net-snmp-devel
- The following are needed to build the snmp ldap-agent:
- lm_sensors-devel
- bzip2-devel
- zlib-devel
- openssl-devel
- tcp_wrappers
- libselinux-devel
- cyrus-sasl
- cyrus-sasl-devel
- cyrus-sasl-gssapi is required in order to use GSSAPI/Kerberos
- cyrus-sasl-md5 is required in order to use Digest-MD5
- pam and pam-devel are required in order to use the PAM pass thru auth plugin
NOTE: The java that comes by default on many Linux distros is GNU gcj/classpath. Our code does not currently run with this (we're working on it!), so you will need to install the IBM or Sun JDK in order to build the java code. On RHEL, the IBM JDK is in RHEL Extras. For other distros, you will have to go to the IBM or Sun web site, download, and install it.
Solaris
Make sure /usr/ccs/bin comes first in your PATH. This directory contains some tools used by the compilers and build process (e.g. ar). Also, the Workshop compilers are usually installed in /opt/SUNWspro. An example PATH:
export PATH=/usr/ccs/bin:/opt/SUNWspro/bin:/usr/ucb:/paths/to/other/tools:/bin:/usr/bin
Make sure java, ant, apr-config, and apxs are also in your PATH.
HP-UX
The ANSI-C compiler is usually found in /opt/ansic; the HP aC++ compiler in /opt/aCC. If you also have gcc installed you may need to export CC=cc so that the configure scripts will not try to use it.
export PATH=/opt/ansic/bin:/opt/aCC/bin:/paths/to/other/tools:/bin:/and/other/system/paths
Make sure java, ant, apr-config, and apxs are also in your PATH.
Windows
The build process doesn't currently support Cygwin - we welcome help with this porting effort. MKS is required for now. Be sure to put the paths to the other tools before MKS so that the MKS versions of those programs are not used. Make sure the MSVC cl.exe and link.exe tools are in your PATH.
One-Step Build
dsbuild is a build system which helps you build the Fedora Directory server. It downloads defined source tarballs, checks their integrity, decompresses, patches, configures and builds them.
It is loosely based on the Konstruct builder which itself uses the GAR build system.
Be sure that you have a live internet connection. Building is as simple as:
% tar xzf dsbuild-fds104.tar.gz % cd dsbuild-fds104/meta/ds % make [BUILD_RPM=1] [DEBUG=full] [NOJAVA=1] [SNMP_SOURCE=1] [SASL_SOURCE=1]
NOTE: make must be GNU make. This may be called gmake on Solaris in order not to conflict with the Solaris make (usually in /usr/ccs/bin).
In most cases, you will just want to build the RPM for installation. Just do the following:
% make BUILD_RPM=1 2>&1 | tee build.log
FC2/RHEL3 use an ancient version of net-snmp, so you need to build those from source:
% make BUILD_RPM=1 SNMP_SOURCE=1 2>&1 | tee build.log
Use "make help" to get some help with using this build system. Use BUILD_RPM=1 to make a RHEL/Fedora Core RPM package (default is a setuputil installable package). Use DEBUG=full to build the debug version (default is optimized). Use NOJAVA=1 to skip the Java code, including the console and DSML gateway. Use SNMP_SOURCE=1 to build SNMP from source rather than just use the net-snmp on the OS (required for RHEL3/FC2). Use SASL_SOURCE=1 if you need to build cyrus-sasl from source (in most cases just use the cyrus-sasl bundled with the OS).
If you do not have a live internet connection, and you can obtain the source tarballs in another way, you can put them into $HOME/ds-sources and gar will grab them from there. See dsbuild/gar.conf.mk for more details or to change the location.
The gar make process will create an installable build in the dsbuild/ds/ldapserver/work/pkg directory. You can cd to this directory and run ./setup. Detailed installation instructions are available. With BUILD_RPM=1, on Linux, this will create an RPM package in the dsbuild/ds/ldapserver/work directory. The RPM is nice because you can use it to install FDS on other systems.
At the present time this will only work with Linux due to some hardcoded values. GAR has some cross-platform capabilities and it should be possible to make a few changes and build on other platforms. We're working on it.
External Requirements
Introduction
The following external components are required to build Directory Server. For support purposes the Directory Server does not generally use external libraries found in /usr/lib, /usr/local/lib, etc. It has its own lib directory where these components are installed. All in all you will need approximately 600 MB of disk to accomodate building the project. A directory has been set up that contains all of the external sources and patches that you will need to build the Directory Server. You can find all of the tarballs and patches here.
To build all of the external components from source, see each component for instructions on how to configure, build and install it so the Directory Server can find it. Pay attention to the --prefix option and note that the packages are being installed locally, not system-wide.
The first thing you should do is create a directory that will contain all of the required libraries and the built directory server.
mkdir ldap ; cd ldap
When you're done you will have a directory structure that looks something like this:
ldap/cyrus-sasl-2.1.20 ldap/cyrus-sasl-2.1.20.tar.gz ldap/db-4.2.52.NC ldap/db-4.2.52.NC.tar.gz ldap/icu ldap/icu-3.4.tgz ldap/ldapserver ldap/mozilla ldap/net-snmp-5.2.1 ldap/net-snmp-5.2.1.tar.gz ldap/patch.4.2.52.1 ldap/patch.4.2.52.2 ldap/patch.4.2.52.3 ldap/patch.4.2.52.4 ldap/console ldap/onlinehelp ldap/setuputil ldap/adminutil ldap/adminserver ldap/dsonlinehelp ldap/directoryconsole ldap/admservconsole ldap/crimson ldap/dsmlgwjars ldap/mod_admserv ldap/mod_nss ldap/mod_restartd
Mozilla.org components
These first 6 can be checked out into the same build tree and built as follows:
- Checkout NSPR (v4.6.3), NSS (v3.11.3), SVRCORE (v4.0.2), LDAPSDK (v6.0.0), and PerLDAP (*)
- Build NSS (this will also build NSPR and DBM)
- Build SVRCORE
- Build LDAPSDK
- Build PerLDAP
All of the necessary libraries, include files, and command line tools will be in the mozilla/dist directory.
Run the following commands to pull source code or download and unpack the source tarball:
export CVSROOT=:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot cvs -z3 co -r NSPR_4_6_3_RTM mozilla/nsprpub cvs -z3 co -r NSS_3_11_3_RTM mozilla/security/coreconf mozilla/security/nss mozilla/dbm mozilla/security/dbm cvs -z3 co -r SVRCORE_4_0_2_RTM mozilla/security/svrcore cvs -z3 -q -z3 co -r LDAPCSDK_6_0_0_RTM -P DirectorySDKSourceC cvs -z3 co -r devel-branch-1_4_2 -P mozilla/directory/perldap
Next you need to build NSS. When you build NSS, it will automatically build NSPR as well. Use BUILD_OPT=1 for an optimized build. Not including BUILD_OPT=1 will generate a debug build. If you're on a 64 bit platform use USE_64=1.
cd mozilla/security/nss; make [BUILD_OPT=1] [USE_64=1] nss_build_all
Now that NSS has been built you can build SVRCORE which depends on NSS. Same build flags above apply here.
cd mozilla/security/svrcore; make [BUILD_OPT=1] [USE_64=1]
LDAPSDK depends on SVRCORE, NSS, NSPR, and DBM (see above).
Then see the table below for configure and gmake arguments for your platform. Use the --enable-optimize --disable-debug configure options and BUILD_OPT=1 make flag to build an optimized build or leave them out for a debug build.
For 32 bit platforms:
cd mozilla/directory/c-sdk; \ ./configure --enable-clu --with-sasl --with-svrcore [--enable-optimize] [--disable-debug] && \ make
For 64 bit platforms:
cd mozilla/directory/c-sdk; \ ./configure --enable-clu --with-sasl --with-svrcore --enable-64bit [--enable-optimize] [--disable-debug] && \ make USE_64=1 [BUILD_OPT=1]
PerLDAP depends on all of the above
cd mozilla/directory/perldap perl Makefile.PL make [LD_RUN_PATH=/opt/fedora-ds/shared/lib]
The built files will be created in the usual MakeMaker blib directory. The Directory Server build process will pull the necessary files from here and package them into the Directory Server installable package - there is no need to do a make install unless you want to make PerLDAP part of the perl in your operating system. This won't work unless the shared libraries for the Mozilla components above are installed in a standard location (/usr/lib or using ldconfig) or you set LD_LIBRARY_PATH before using it (which comes with its own set of headaches). Use the LD_RUN_PATH option as above to make perldap use the libraries included with Fedora DS.
Java/XML Components
A number of third-party JAR files are required to compile the directory server. You'll need to create a few directories for them to live in:
mkdir dsmlgwjars mkdir dist mkdir dist/classes
You'll need the following components. If you are running Fedora Core, they should all be available in /usr/share/java. They are also available from the following links:
http://directory.fedoraproject.org/download/dsmlgwjars-1.0/activation.jar http://directory.fedoraproject.org/download/dsmlgwjars-1.0/axis.jar http://directory.fedoraproject.org/download/dsmlgwjars-1.0/jakarta-commons-codec.jar http://directory.fedoraproject.org/download/dsmlgwjars-1.0/jaxrpc.jar http://directory.fedoraproject.org/download/dsmlgwjars-1.0/saaj.jar http://directory.fedoraproject.org/download/dsmlgwjars-1.0/xercesImpl.jar http://directory.fedoraproject.org/download/dsmlgwjars-1.0/xml-apis.jar
- Axis. Precompiled bytecode available from http://ws.apache.org/axis/index.html. Provides axis.jar, jaxrpc.jar, and saaj.jar.
gunzip -c axis-bin-1_3.tar.gz | tar -xf - cd axis-1_3/lib cp axis.jar jaxrpc.jar saaj.jar ../../dsmlgwjars/
- Xerces-J. Precompiled bytecode available from http://xml.apache.org/xerces2-j/download.cgi. Provides xercesImpl.jar and xml-apis.jar
gunzip -c Xerces-J-bin.2.7.1.tar.gz | tar -xf - cd xerces-2_7_1/ cp xercesImpl.jar xml-apis.jar ../dsmlgwjars/
- JavaBean Activation Framework. Precompiled bytecode available from http://java.sun.com/products/javabeans/glasgow/jaf.html. Provides activation.jar.
unzip jaf-1_0_2-upd2.zip cp jaf-1.0.2/activation.jar dsmlgwjars/
- Java Web Services Developer Pack. Self-extracting binary available from http://java.sun.com/webservices/downloads/webservicespack.html. Provides jaxrpc-api.jar. JWSDP 2.0 requires Java 1.5; if you are using Java 1.4.2, you will need to download JWSDP 1.5 from http://java.sun.com/webservices/downloads/1.5/index.html.
./jwsdp-2_0-unix.sh -silent -P installLocation="./jwsdp" cp jwsdp/jaxrpc/lib/jaxrpc-api.jar dsmlgwjars/
If installation fails for some reason, you can try running the installer with the -console flag instead of -silent.
- Crimson. Precompiled bytecode available from http://xml.apache.org/dist/crimson/. Provides crimson.jar.
tar -xzf crimson-1.1.3-bin.tar.gz cp crimson-1.1.3/crimson.jar dist/classes/
Cyrus SASL
NOTE: Fedora DS 1.0.3 can use the bundled version of cyrus-sasl on most linux distributions, so it's quite likely that you do not need to build Cyrus-SASL from source.
You will want version 2.1.20 of Cyrus SASL.
Download the source from our local directory or get tarball from upstream at ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/cyrus-sasl-2.1.20.tar.gz
gunzip -c cyrus-sasl-2.1.20.tar.gz | tar xf - cd cyrus-sasl-2.1.20 export CYRUS_SASL_BUILD_PATH=`pwd`
Patches: If you are using gcc4 (i.e. Fedora Core 4) you will need to use the gcc4 patch; if you are building on HP-UX, you will need to use the HP-UX patch from our sources directory to get cyrus-sasl to compile.
Pick the configure setup for your platform listed below. Note that you will build it but you will not need to do a make install
| Platform | Configure | Make | Notes |
|---|---|---|---|
| FC and RHEL | CFLAGS="-O2" ./configure [--enable-gssapi=/usr/kerberos/ (*)] --enable-static --without-des --without-openssl --without-saslauthd --prefix=$CYRUS_SASL_BUILD_PATH/built | make all install | Use CFLAGS="-g" for debug builds - will automatically build 64 bit libs on x86_64 |
| Solaris 9 32 bit | CC="cc -O" ./configure --enable-gssapi --enable-static --without-des --without-openssl --without-saslauthd --prefix=$CYRUS_SASL_BUILD_PATH/built | make all install | Use "-g" for debug builds |
| Solaris 9 64 bit | CC="cc -O -xarch=v9" ./configure --enable-gssapi --enable-static --without-des --without-openssl --without-saslauthd --prefix=$CYRUS_SASL_BUILD_PATH/built | make all install | Use "-g" for debug builds |
| HP/UX 32 bit | CC="cc +DD32" CFLAGS="-O" ./configure --enable-gssapi --enable-static --without-des --without-openssl --without-saslauthd --prefix=$CYRUS_SASL_BUILD_PATH/built | make all install | Use -g instead of -O in CFLAGS for debug builds |
| HP/UX 64 bit | CC="cc +DD64" CFLAGS="-O" (**) ./configure --enable-gssapi --enable-static --without-des --without-openssl --without-saslauthd --prefix=$CYRUS_SASL_BUILD_PATH/built | make all install | Use -g instead of -O in CFLAGS for debug builds |
(*) Prerequisite: krb5-devel; The package could be installed in /usr/kerberos (e.g., on RHEL 3). If your system has krb5.h in /usr/kerberos/include, please specify "--enable-gssapi=/usr/kerberos/". Otherwise, "--enable-gssapi" is set by default.
(**) If you see an error message 'ld: Unsatisfied symbol "krb5_..."', you may need to set LDFLAGS="-L/usr/lib/pa20_64/gss" or LDFLAGS="-L/usr/lib/hpux64/gss" depending upon your hardware architecture.
ICU4C
You need version 3.4 or later (3.6 should work too) of ICU4C (*). Version 2.4 is not available on the main download page, but should be available from our local sources page or get it here - ftp://ftp.software.ibm.com/software/globalization/icu/3.4/icu-3.4.tgz Run the following commands:
gunzip -c icu-3.4.tgz | tar xf - cd icu export ICU_BUILD_PATH=`pwd` cd source
Then see the table below for configure and gmake arguments for your platform. Use --enable-debug for debug builds or omit it for optimized builds (the default). Note below that the --prefix requires a full path. Relative paths don't work which is why we set the env var above.
Version 3.4 and later
| Platform | Configure | Make | Notes |
|---|---|---|---|
| FC and RHEL 32 bit | ./runConfigureICU [--enable-debug] Linux --enable-64bit-libs=no --enable-rpath --disable-ustdio --prefix=$ICU_BUILD_PATH/built | make all install | |
| FC and RHEL 64 bit | ./runConfigureICU [--enable-debug] Linux --enable-64bit-libs --enable-rpath --disable-ustdio --prefix=$ICU_BUILD_PATH/built | make all install | |
| Solaris 9 32 bit | CC=cc ./runConfigureICU [--enable-debug] Solaris --enable-64bit-libs=no --enable-rpath --disable-ustdio --prefix=$ICU_BUILD_PATH/built | gmake all install | |
| Solaris 9 64 bit | CC=cc ./runConfigureICU [--enable-debug] Solaris --enable-64bit-libs --enable-rpath --disable-ustdio --prefix=$ICU_BUILD_PATH/built | gmake all install | |
| HP/UX 11i 32 bit | ./runConfigureICU [--enable-debug] HP-UX/ACC --enable-64bit-libs=no --enable-rpath --disable-ustdio --prefix=$ICU_BUILD_PATH/built | gmake all install | |
| HP/UX 11i 64 bit | ./runConfigureICU [--enable-debug] HP-UX/ACC --enable-64bit-libs --enable-rpath --disable-ustdio --prefix=$ICU_BUILD_PATH/built | gmake all install |
Net-SNMP
NOTE: As of Fedora DS 1.0.3, you can just use the net-snmp built in to most Linux distributions (except FC2/RHEL3 and earlier).
You want version 5.2.1 of Net-SNMP.
Get the tarball from our local sources directory or from the upstream download page. Here is a direct link to the download that should work.
In the tar command below, use GNU tar (the tar included with Solaris will not untar Net-SNMP.)
gunzip -c net-snmp-5.2.1.tar.gz | tar xf - cd net-snmp-5.2.1 export NET_SNMP_BUILD_PATH=`pwd`
Then see the table below for configure and gmake arguments for your platform. The COMMON_ARGS for the configure command are as follows:
--with-default-snmp-version=3 --with-sys-contact="" \ --with-sys-location="" --with-logfile="" \ --with-persistent-directory=/var/net-snmp \ --prefix="$NET_SNMP_BUILD_PATH/built" \ --disable-applications --disable-manuals \ --disable-scripts --disable-mibs
| Platform | Configure | Make | Notes |
|---|---|---|---|
| FC and RHEL | CFLAGS="-O2" ./configure COMMON_ARGS | make; make install | Use CFLAGS="-g" for debug builds - automatically builds 64 bit libs on x86_64 |
| Solaris 9 32 bit | CC=cc CFLAGS="-O2" ./configure COMMON_ARGS | gmake; gmake install | Use CFLAGS="-g" for debug builds |
| Solaris 9 64 bit | CC=cc CFLAGS="-O2 -xarch=v9" ./configure COMMON_ARGS | gmake; gmake install | Use -g instead of -O2 in CFLAGS for debug builds |
| HP/UX 11i 32 bit | CFLAGS="-O2 +DAportable" ./configure COMMON_ARGS | gmake; gmake install | Use -g instead of -O2 in CFLAGS for debug builds |
| HP/UX 11i 64 bit | CFLAGS="-O2 +DA2.0w +DChpux -D_LARGEFILE64_SOURCE" ./configure COMMON_ARGS | gmake; gmake install | Use -g instead of -O2 in CFLAGS for debug builds |
| HP/UX IA64 32 bit | CFLAGS="-O +DD32" ./configure COMMON_ARGS | gmake; gmake install | Use -g instead of -O in CFLAGS for debug builds |
| HP/UX IA64 64 bit | CFLAGS="-O +DD64" ./configure COMMON_ARGS | gmake; gmake install | Use -g instead of -O in CFLAGS for debug builds |
Berkeley DB
You need version 4.2.52 of sleepycat's db library. You can get the source tarball and the four required patches from our local sources directory or you can get the source from the sleepycat db download page.
When you download the source you're going to need to get the tarball (db-4.2.52.NC.tar.gz) and the four patches listed on the download page (named patch.4.2.52.x). When you're on the download page choose:
Product -> Berkley DB Version -> 4.2.52 Don't check the AES Encryption support Package -> GNU gzip/tar
Once you've saved those, untar and patch the source with the following commands (make sure you're using the GNU patch utility)
gunzip -c db-4.2.52.NC.tar.gz | tar xf - cd db-4.2.52.NC patch -p0 < ../patch.4.2.52.1 patch -p0 < ../patch.4.2.52.2 patch -p0 < ../patch.4.2.52.3 patch -p0 < ../patch.4.2.52.4
There is an additional patch that's required on HP/UX and it's available here. If you're not using HP/UX, then you don't need this patch.
patch -p0 < ../patch.4.2.52.hpux
After unpacking and patching the source make yourself a build directory:
mkdir built ; cd built
See the table below for the configure arguments for your platform. For debug builds on all platforms, use the --enable-debug --enable-umrw arguments instead of the --disable-debug argument to the configure command.
| Platform | Configure |
|---|---|
| FC and RHEL | ../dist/configure --enable-dynamic --disable-debug |
| Solaris 9 32 bit | CC=cc ../dist/configure --enable-dynamic --disable-debug |
| Solaris 9 64 bit | CC=cc CFLAGS="-xarch=v9" LDFLAGS="-xarch=v9" ../dist/configure --enable-dynamic --disable-debug |
| HP/UX 11i 32 bit | CC="cc -O +DAportable" ../dist/configure --enable-dynamic --disable-debug |
| HP/UX 11i 64 bit | CC="cc -O +DA2.0w +DChpux -D_LARGEFILE64_SOURCE" ../dist/configure --enable-dynamic --disable-debug |
| HP/UX IA64 32 bit | CC="cc -O2 +DD32" ../dist/configure --enable-dynamic --disable-debug |
| HP/UX IA64 64 bit | CC="cc -O2 +DD64" ../dist/configure --enable-dynamic --disable-debug |
Build libdb.a with the following command:
make LIBDB_ARGS="libdb.a" all
The above command builds command line tools that dynamically link with the libdb shared library. While this may work, it is generally preferred to statically link the command line tools. To do so, first look at your configure line above. If it includes LDFLAGS, you'll need to include them in the build command below. If you didn't have to set LDFLAGS then you don't have to set them in LDFLAGS below, you only need to use the -static.
rm db_archive db_checkpoint db_deadlock db_dump \ db_load db_printlog db_recover db_stat \ db_upgrade db_verify make LDFLAGS="-static $LDFLAGS" libdb.a all
Other Components
The other components are available from cvs.fedora.redhat.com. For the Fedora Directory Server 1.0.4 release, the static CVS tag FedoraDirSvr104 is used to pull the correct components (or FedoraDirSvr103 if the component was not updated for 1.0.4). This will give the same version that is available in tarball form from the sources download site. For anonymous CVS access, use
CVSROOT=:pserver:anonymous@cvs.fedora.redhat.com:/cvs/dirsec ; export CVSROOT cvs login
(password is empty i.e. just press Enter or Return)
If you have commit access, use
CVSROOT=:ext:yourlogin@cvs.fedora.redhat.com:/cvs/dirsec ; export CVSROOT CVS_RSH=ssh ; export CVS_RSH
You will have to apply for commit access - see our contributing page on more information on how to get CVS commit access.
OK, you're ready to pull the source. Do it!
cvs -z3 co -r FedoraDirSvr104 <modulename>
This table gives the CVS module name for pulling from CVS, the download link for grabbing the source tarball, and the link to build instructions. It is best to build the components in the order they are listed in the table, since some of the later components depend on some of the earlier components.
| CVS module | Download source | Instructions |
|---|---|---|
| console | console | BuildingConsole |
| setuputil | setuputil | SetupUtil |
| adminutil | adminutil | AdminUtil |
| onlinehelp | onlinehelp | Onlinehelp |
| mod_admserv | mod_admserv | Mod_admserv |
| mod_nss | mod_nss | Mod_nss |
| mod_restartd | mod_restartd | Mod_restartd |
| adminserver | adminserver | AdminServer |
| directoryconsole | directoryconsole | DirectoryConsole |
| admservconsole | admservconsole | AdmservConsole |
| dsonlinehelp | dsonlinehelp | no build necessary |
Pulling the Directory Server Source
For anonymous access, use
CVSROOT=:pserver:anonymous@cvs.fedora.redhat.com:/cvs/dirsec ; export CVSROOT cvs login
(password is empty i.e. just press Enter or Return)
If you have commit access, use
CVSROOT=:ext:yourlogin@cvs.fedora.redhat.com:/cvs/dirsec ; export CVSROOT CVS_RSH=ssh ; export CVS_RSH
You will have to apply for commit access - see our contributing page on more information on how to get CVS commit access.
OK, you're ready to pull the source. Do it!
cvs -z3 co -r RELEASETAG ldapserver
The current release tag is FedoraDirSvr104. This is a static tag.
Building the Source
This will do a complete build, including making a release directory layout. See the install guide for what to do once you're done building. There are a couple of options to note:
- BUILD_DEBUG=[optimize|full] - the default is full for a debug build. If you build with optimize you must also have optimized components You can, however, have a debug build that links against optimized components. This can be useful if you want to debug the core server without having to find/build all debug components. You just won't be able to debug those optimized components.
- USE_64=1 is for 64 bit platforms, as for all of the components that you just built.
cd ldapserver ; make [BUILD_DEBUG=optimize] [USE_64=1]
Notes
The build has poor or no header file dependency checking. This means if you change a header file, especially if you change the size of a structure, the safest thing to do is clean first, then build. For example, if you add another parameter to the pblock, it's best to recompile everything from scratch.
Installation
Congratulations for sticking with us this far! See our install guide on how to set up the server.
Example
Here is an example optimized build from source on RHEL 3. Should also work on RHEL4, and Fedora Core 2 and 3:
% cd /home/me
% mkdir fds103
% cd fds103
% CVSROOT=:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot
% export CVSROOT
% cvs co -r NSPR_4_6_3_RTM mozilla/nsprpub
% cvs co -r NSS_3_11_3_RTM mozilla/security/coreconf mozilla/security/nss mozilla/dbm mozilla/security/dbm
% cd mozilla/security/nss
% gmake nss_build_all BUILD_OPT=1
% cd -
% cvs co -r SVRCORE_4_0_2_RTM mozilla/security/svrcore
% cvs co -r LDAPCSDK_6_0_0_RTM -P DirectorySDKSourceC
% cd mozilla/security/svrcore
% gmake BUILD_OPT=1
% cd -
% cd mozilla/directory/c-sdk
% ./configure --enable-clu --with-sasl --with-svrcore --enable-optimize --disable-debug
% gmake BUILD_OPT=1
% cd -
% cvs co -r devel-branch-1_4_2 mozilla/directory/perldap
% cd mozilla/directory/perldap
% perl Makefile.PL
% make
% cd -
% wget ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/cyrus-sasl-2.1.20.tar.gz
% gunzip -c cyrus-sasl-2.1.20.tar.gz | tar xf -
% cd cyrus-sasl-2.1.20
% CFLAGS="-O2" ./configure --enable-static --enable-gssapi=/usr/kerberos/include \
--without-des --without-openssl
% gmake
% cd -
% wget ftp://ftp.software.ibm.com/software/globalization/icu/3.4/icu-3.4.tgz
% gunzip -c icu-3.4.tgz | tar xf -
% cd icu/source
% ./runConfigureICU LinuxRedHat --enable-rpath --disable-ustdio \
--prefix=/home/me/ds71/icu/built
% gmake install
% cd ../../
% wget http://downloads.sleepycat.com/db-4.2.52.NC.tar.gz
% wget -O patch.4.2.52.1 \
"http://www.sleepycat.com/webforms/patchdl.php?src=patch.4.2.52.1"
% wget -O patch.4.2.52.2 \
"http://www.sleepycat.com/webforms/patchdl.php?src=patch.4.2.52.2"
% wget -O patch.4.2.52.3 \
"http://www.sleepycat.com/webforms/patchdl.php?src=patch.4.2.52.3"
% wget -O patch.4.2.52.4 \
"http://www.sleepycat.com/webforms/patchdl.php?src=patch.4.2.52.4"
# Remember that on HP/UX you need another patch
% gunzip -c db-4.2.52.NC.tar.gz | tar xf -
% cd db-4.2.52.NC
% patch -p0 < ../patch.4.2.52.1
% patch -p0 < ../patch.4.2.52.2
% patch -p0 < ../patch.4.2.52.3
% patch -p0 < ../patch.4.2.52.4
% mkdir built
% cd built
% ../dist/configure --disable-debug --enable-dynamic
% gmake LIBDB_ARGS="libdb.a"
% rm db_archive db_checkpoint db_deadlock db_dump \
db_load db_printlog db_recover db_stat \
db_upgrade db_verify
% gmake LDFLAGS="-static " libdb.a all
% cd ../../
# Get net-snmp from sourceforge, this is just one mirror
% wget \
http://easynews.dl.sourceforge.net/sourceforge/net-snmp/net-snmp-5.2.1.tar.gz
% gunzip -c net-snmp-5.2.1.tar.gz |tar xf -
% cd net-snmp-5.2.1
% CFLAGS="-O2" ./configure --with-default-snmp-version=3 --with-sys-contact="" \
--with-sys-location="" --with-logfile="" \
--with-persistent-directory="/var/net-snmp" \
--prefix="/home/me/ds71/net-snmp-5.2.1/built" \
--disable-applications --disable-manuals --disable-scripts --disable-mibs
% gmake ; gmake install
% cd ..
% CVSROOT=:pserver:anonymous@cvs.fedora.redhat.com:/cvs/dirsec
% export CVSROOT
% cvs co -r FedoraDirSvr104 ldapserver
% cd ldapserver
% gmake USE_PERL_FROM_PATH=1 BUILD_DEBUG=optimize
Congratulations, you've built Directory Server. Refer to the install guide for installing and configuring your new server.
