1# $OpenLDAP$ 2# Copyright 1999-2016 The OpenLDAP Foundation, All Rights Reserved. 3# COPYING RESTRICTIONS APPLY, see COPYRIGHT. 4 5P1: Making and Installing the OpenLDAP Distribution 6 7This file provides brief instructions on how to build and install 8OpenLDAP on UNIX (and UNIX-{{like}}) systems. More detailed 9information and instructions can be found in 10{{The OpenLDAP Administrator's Guide}} 11(available from {{URL:http://www.openldap.org/doc/}}). 12 13It is recommended that you read, or at least skim through, ALL of 14the instructions in this file before attempting to build the 15software. 16 17It is also recommended you review 18the {{Frequently Asked Questions}} ({{URL:http://www.openldap.org/faq/}}) 19pages, in particular the 20{{Installation section}} ({{URL:http://www.openldap.org/faq/index.cgi?file=8}}) 21and 22{{Platform Hints}} ({{URL:http://www.openldap.org/faq/index.cgi?file=9}}) 23should be examined. 24 25 26P2: Making and Installing the OpenLDAP Distribution 27 28^ Unpack the distribution and change directory: 29 30E: % tar xfz openldap-VERSION.tgz 31E: % cd openldap-VERSION 32 33.(replacing {{EX:VERSION}} with the appropriate version string). If 34you are reading this file, you probably have already done this! 35 36 37+ Type: 38 39E: % ./configure --help 40 41.to list available configuration options. 42 43.The {{EX:configure}} script also looks for compiler/linker options 44on the command line and in the environment. These include: 45 46> Variable Description Example 47> CC C compiler gcc 48> CFLAGS C flags -O -g 49> CPPFLAGS cpp flags -I/path/include -D__FOO__=42 50> LDFLAGS ld flags -L/usr/local/lib 51> LIBS libraries -llib 52> PATH command path /usr/local/bin:/usr/bin:/bin 53 54!if $var{'OPT_TARGET'} eq 'txt' 55.See doc/install/configure for generic configure documentation. 56!endif 57 58+ Configure the build system: 59 60E: % ./configure [options] [var=value ...] 61 62.If all goes well, the {{EX:configure}} script will automatically detect 63the appropriate settings. If the {{EX:configure}} script fails, you should 64read the {{FILE:config.log}} file that it generated to see what it was trying 65to do and exactly what failed. You may need to specify additional 66options and/or variables besides those listed above to 67obtain desired results, depending on your operating system. The 68{{Platform Hints}} section of the {{FAQ}} provides help for operating system 69related problems. 70 71+ Build dependencies: 72 73E: % make depend 74 75+ Build the system: 76 77E: % make 78 79.If all goes well, the system will build as configured. If not, 80return to step 3 after reviewing the configuration settings. You 81may want to consult the {{Platform Hints}} subsection of the {{FAQ}} 82if you have not done so already. 83 84+ Test the standalone system: 85 86.This step requires the standalone LDAP server, {{slapd}}(8), 87with {{HDB}} and/or {{BDB}} support. 88 89E: % make test 90 91.If all goes well, the system has been built as configured. If not, 92return to step 2 after reviewing your configuration settings. You 93may want to consult the {{Installation}} section of the {{FAQ}} 94if you have not done so already. 95 96+ Install the software. You may need to become the 97{{super-user}} (e.g. {{EX:root}}) to do this (depending on where you 98are installing things): 99 100E: % su root -c 'make install' 101 102+ That's it. Enjoy! 103 104See the {{OpenLDAP Administrator's Guide}} and the manual pages 105for the individual applications for configuration and use information. 106You may also want to edit the configuration files used by the 107various components. These configuration files are located in 108the OpenLDAP configuration directory (normally 109{{FILE:/usr/local/etc/openldap}}). 110 111> ldap.conf client defaults 112> slapd.conf Standalone LDAP daemon 113> schema/*.schema Schema Definitions 114 115