Difference between revisions of "Openldap: Compile"
Jump to navigation
Jump to search
Onnowpurbo (talk | contribs) |
Onnowpurbo (talk | contribs) |
||
Line 50: | Line 50: | ||
==Masukan data== | ==Masukan data== | ||
+ | Edit file ldif | ||
+ | vi example.ldif | ||
+ | isi dengan | ||
dn: dc=<MY-DOMAIN>,dc=<COM> | dn: dc=<MY-DOMAIN>,dc=<COM> | ||
Line 75: | Line 78: | ||
cn: Manager | cn: Manager | ||
+ | masukan ke ldap | ||
+ | ldapadd -x -D "cn=Manager,dc=<MY-DOMAIN>,dc=<COM>" -W -f example.ldif | ||
+ | atau | ||
+ | |||
+ | ldapadd -x -D "cn=Manager,dc=example,dc=com" -W -f example.ldif | ||
+ | |||
+ | |||
+ | ==Cari== | ||
+ | |||
+ | ldapsearch -x -b 'dc=example,dc=com' '(objectclass=*)' | ||
==Referensi== | ==Referensi== | ||
* http://www.openldap.org/doc/admin24/quickstart.html | * http://www.openldap.org/doc/admin24/quickstart.html |
Revision as of 10:18, 6 June 2011
Downoad source code dari
http://www.openldap.org/software/download/
Compile
Lakukan ..
cp openldap-stable-20100719.tgz /usr/local/src/ cd /usr/local/src gunzip -c openldap-stable-20100719.tgz | tar xvfB - cd /usr/local/src/openldap-2.4.23/ ./configure make depend make make test su root -c 'make install'
Edit konfigurasi
Edit /usr/local/etc/openldap/slapd.conf
vi /usr/local/etc/openldap/slapd.conf
database bdb suffix "dc=<MY-DOMAIN>,dc=<COM>" rootdn "cn=Manager,dc=<MY-DOMAIN>,dc=<COM>" rootpw secret directory /usr/local/var/openldap-data
contoh
database bdb suffix "dc=example,dc=com" rootdn "cn=Manager,dc=example,dc=com" rootpw secret directory /usr/local/var/openldap-data
Running
Jalankan
su root -c /usr/local/libexec/slapd
Testing
ldapsearch -x -b -s base '(objectclass=*)' namingContexts
Masukan data
Edit file ldif
vi example.ldif
isi dengan
dn: dc=<MY-DOMAIN>,dc=<COM> objectclass: dcObject objectclass: organization o: <MY ORGANIZATION> dc: <MY-DOMAIN> dn: cn=Manager,dc=<MY-DOMAIN>,dc=<COM> objectclass: organizationalRole cn: Manager
contoh
dn: dc=example,dc=com objectclass: dcObject objectclass: organization o: Example Company dc: example dn: cn=Manager,dc=example,dc=com objectclass: organizationalRole cn: Manager
masukan ke ldap
ldapadd -x -D "cn=Manager,dc=<MY-DOMAIN>,dc=<COM>" -W -f example.ldif
atau
ldapadd -x -D "cn=Manager,dc=example,dc=com" -W -f example.ldif
Cari
ldapsearch -x -b 'dc=example,dc=com' '(objectclass=*)'