I am following the instructions on https://www.openldap.org/doc/admin24/quickstart.html to install OpenLDAP on RedHat. Everything goes fine until step 9:
Import the configuration database You are now ready to import your configration database for use by slapd(8), by running the command:
su root -c /usr/local/sbin/slapadd -n 0 -F /usr/local/etc/slapd.d -l /usr /local/etc/openldap/slapd.ldif
Then I get the error: su: invalid option -- 'n'
Then I tried only running /usr/local/sbin/slapadd -n 0 -F /usr/local/etc/slapd.d -l /usr/local/etc/openldap/slapd.ldif
since I already logged in as the root user, then I get this error:
5bcca422 invalid config directory /usr/local/etc/slapd.d, error 2
slapadd: bad configuration directory!
My installation prefix is the default /usr/local/
I find there is no slapd.d
under /usr/local/etc
directory. What's the problem? Thanks!
Additional Information: When I ranmake
in step 5, I got an error: fatal error:ltdl.h: No such file or directory
, then I installed it with yum install libtool-ltdl-devel
, and repeated step 5. When I ran make test in step 6, there is no error. I don't know if this piece of additional information could help.