Installing is done with one additional command:
$ sudo make install
On some versions of Linux or UNIX, instead of using sudo
, you will need to switch users (su
) to root and run the make install command as root: su
-c
‘make
install'
. You will be prompted to enter the password for your account (or, if you use su
instead of sudo
, the root password). Once you have correctly entered the password, the necessary OpenLDAP files will be copied to subdirectories of /usr/local
.
On some systems, the directories that contain local executable files (/usr/local/bin
and /usr/local/sbin
) are not included in the $PATH
environment variable. As a result, simply typing an OpenLDAP command at a command line may return an error. One way to get around this problem is to type in the entire path to the command:
$ /usr/local/sbin/slapcat
But this can be tedious. You can also append the appropriate paths to your $PATH
environment variable. Then you will be able to simply issue the command without specifying the absolute path to the command:
$ export PATH= /usr/local/bin:/usr/local/sbin:$PATH $ slapcat
In this example the export command re-sets $PATH
for the current session. So the variable $PATH
is assigned the values /usr/local/bin
, /usr/local/sbin
, and the contents of the current $PATH
variable (which likely contains /bin
, /sbin
, /usr/bin
, and other directories). Order is important. When the shell is searching for a command (slapcat
, in the given example), it will search from the first directory in $PATH
on to the last directory. As soon as it finds a match, it will stop searching. So, for example, if there were two slapcat
commands, the shell would use the first one it found. In our case, it is best to put the two /usr/local
directories early in the path just in case an older version of LDAP is installed elsewhere on the file system.
Usually, the export
command should be added to the shell configuration file (for example ~/.bash_profile
) so that the additional path information is automatically added every time you start a shell session.
You are now ready to configure the new version of OpenLDAP.