ee /etc/hosts
####################2. tambah line ni dalam /etc/hosts##############################
127.0.1.1 admin.acme.com admin
####################3. waktu install################################################
Updating FreeBSD repository catalogue...
Fetching meta.txz: 100% 944 B 0.9kB/s 00:01
Fetching packagesite.txz: 100% 6 MiB 117.8kB/s 00:49
Processing entries: 100%
FreeBSD repository update completed. 25400 packages processed.
New version of pkg detected; it needs to be installed first.
The following 1 package(s) will be affected (of 0 checked):
Installed packages to be UPGRADED:
pkg: 1.7.2 -> 1.8.7_1
2 MiB to be downloaded.
Proceed with this action? [y/N]: y
Fetching pkg-1.8.7_1.txz: 100% 2 MiB 26.7kB/s 01:36
Checking integrity... done (0 conflicting)
[1/1] Upgrading pkg from 1.7.2 to 1.8.7_1...
[1/1] Extracting pkg-1.8.7_1: 100%
Updating FreeBSD repository catalogue...
FreeBSD repository is up-to-date.
All repositories are up-to-date.
The following 2 package(s) will be affected (of 0 checked):
New packages to be INSTALLED:
openldap-server: 2.4.44
openldap-client: 2.4.44
Number of packages to be installed: 2
The process will require 7 MiB more space.
2 MiB to be downloaded.
Proceed with this action? [y/N]: y
Fetching openldap-server-2.4.44.txz: 100% 773 KiB 113.1kB/s 00:07
Fetching openldap-client-2.4.44.txz: 100% 999 KiB 127.9kB/s 00:08
Checking integrity... done (0 conflicting)
[1/2] Installing openldap-client-2.4.44...
[1/2] Extracting openldap-client-2.4.44: 100%
[2/2] Installing openldap-server-2.4.44...
===> Creating groups.
Creating group 'ldap' with gid '389'.
===> Creating users
Creating user 'ldap' with uid '389'.
[2/2] Extracting openldap-server-2.4.44: 100%
####################4. siap install dia habaq kat hang##############################
Message from openldap-client-2.4.44:
************************************************************
The OpenLDAP client package has been successfully installed.
Edit
/usr/local/etc/openldap/ldap.conf
to change the system-wide client defaults.
Try `man ldap.conf' and visit the OpenLDAP FAQ-O-Matic at
http://www.OpenLDAP.org/faq/index.cgi?file=3
for more information.
************************************************************
Message from openldap-server-2.4.44:
************************************************************
The OpenLDAP server package has been successfully installed.
In order to run the LDAP server, you need to edit
/usr/local/etc/openldap/slapd.conf
to suit your needs and add the following lines to /etc/rc.conf:
slapd_enable="YES"
slapd_flags='-h "ldapi://%2fvar%2frun%2fopenldap%2fldapi/ ldap://0.0.0.0/"'
slapd_sockets="/var/run/openldap/ldapi"
Then start the server with
/usr/local/etc/rc.d/slapd start
or reboot.
Try `man slapd' and the online manual at
http://www.OpenLDAP.org/doc/
for more information.
slapd runs under a non-privileged user id (by default `ldap'),
see /usr/local/etc/rc.d/slapd for more information.
************************************************************
####################5. set password#################################################
slappasswd -h '{SHA}'
New password: toor
Re-enter new password: toor
{SHA}Q1tBBo6GZVE6IAcMAzsIucZuQzI=
####################6. pastu edit configuration file################################
ee /usr/local/etc/openldap/slapd.conf
####################7. tambah 6-line ni kat bawah include /usr/local/etc/openldap/schema/core.schema####################
include /usr/local/etc/openldap/schema/cosine.schema
include /usr/local/etc/openldap/schema/corba.schema
include /usr/local/etc/openldap/schema/inetorgperson.schema
include /usr/local/etc/openldap/schema/nis.schema
include /usr/local/etc/openldap/schema/collective.schema
include /usr/local/etc/openldap/schema/openldap.schema
####################8. buang tanda # atau uncomment dekat line######################
# moduleload back_mdb
# moduleload back_ldap
####################9. tukar suffix "dc=my-domain,dc=com" kepada###########
suffix "dc=acme,dc=com"
####################10. tukar rootdn "cn=Manager,dc=my-domain,dc=com" kepada####################
rootdn "cn=admin,dc=acme,dc=com"
####################11. tukar rootpw secret kepada####################
rootpw {SHA}Q1tBBo6GZVE6IAcMAzsIucZuQzI=
####################12. save file tersebut dan edit rc.conf#########################
ee /etc/rc.conf
####################13. tambah 3-line###############################################
slapd_enable="YES"
slapd_flags='-h "ldapi://%252fvar%252frun%252fopenldap%252fldapi/ ldap://0.0.0.0/"'
slapd_sockets="/var/run/openldap/ldapi"
####################14. save file tersebut dan up service###########################
service slapd start
####################15. tunggu hingga keluar mesej##################################
Starting slapd.
/usr/local/etc/rc.d/slapd: WARNING: slapd: Can't find socket /var/run/openldap/ldapi
####################16. masuk balik /etc/rc.conf dan tukar #########################
slapd_flags='-h "ldapi://%252fvar%252frun%252fopenldap%252fldapi/ ldap://0.0.0.0/"' kepada
slapd_flags='-h "ldapi:///var/run/openldap/ldapi/ ldap://0.0.0.0/"'
####################17. follow sangat tutorial sebijik sebijik kan dah kena. save file dan restart service####################
service slapd restart
####################18. tunggu lagi#################################################
Stopping slapd.
Starting slapd.
####################19. test tengok#################################################
ldapsearch -x -W -D cn=admin,dc=acme,dc=com
####################20. tunggu dia minta password###################################
Enter LDAP Password: toor
# extended LDIF
#
# LDAPv3
# base <> (default) with scope subtree
# filter: (objectclass=*)
# requesting: ALL
#
# search result
search: 2
result: 32 No such object
# numResponses: 1
####################21.congratulation ldap dah boleh guna... nantikan phpldapadmin pulak esok####################
terima kasih
No comments:
Post a Comment