The implementation that the catalog that is based on Linux operating system serves (1)
Tuesday, March 03, 2009 by rain
? ? the purpose of the article is the application software package that supports through using Linux system (Openldap) ,The user in realizing the catalog that is based on LDAP agreement to serve a system to support Windows message book quickly inquires a function.The characteristic that the author introduced catalog to serve from the viewpoint of the user,The difference that compared its and the relation database that use normally to go up in processing data,The lover that the author is common Linux only,The knowledge of a bit of Linux that the attempt acquires place undertakes applied integratedly,The hope is inspired somewhat to everybody.
If ? ? needs to develop a kind of system that provides public information inquiry,If pass user full name to be able to obtain the mailing address of this user, home address,wait for information,The message book function that the People Search that offers like Yahoo serves and provides in Windows Outlook.Common design method may be to use the database that is based on WEB to devise way,Namely front uses a browser and server of back end use WEB increases relation database.Back end realizes a likelihood in the model of Windows is database of Windows NT + IIS + Acess or SQL server,Through ASP technology use ODBC has link between IIS and database,Achieve the function that expresses odd inquiry data through filling in;Back end realizes a likelihood in the model of Linux system is Linux + Apache + Postgresql,The function that provides through PHP3 between Apache and database has link.Use the defect of afore-mentioned methods is database of back end relation to introduce the function that causes systematic whole to reduce the government with the system trivaller,Because need the integrality of the ceaseless test and verify that has data kind and general affairs,admit really;And front user is opposite the control of data is not quite quick,The setting of user attributive can be a setting only commonly express one degree and not be a setting in the record one class.
? ? catalog serves the problem that rolling out basically is the existence in solving afore-mentioned databases.Catalog and relation database are similar,It is the record gather that points to those who have descriptive sex to be based on attribute,But its data type basically is character model,Added data of BIN(binary system for retrieval need) , CIS(oversight size is written) , CES(big the ordinary form of a Chinese numeral is sensitive) , TEL(phone) wait for grammar (Syntax) ,is not the type such as check the number of the integer that relation database offers, float, date, money,The includes generally many function in also offerring elephantine relation database likewise,The inquiry that it basically faces data serves (inquiry is compared with modification operation is to be more than 10:1 commonly) ,Do not provide work time boil (Rollback) mechanism,Its data is revised use simple lock to decide a mechanism to realize All-or-Nothing,Its target is the information that be answered quickly and provides much catalog server duplicate function.
? ? LDAP(Lightweight Directory Acess Protocol) is the implementation that catalog serves to go up in TCP/IP (edition of RFC 1777 V2 and edition of RFC 2251 V3) .The transplanting of the catalog agreement that it is pair of X500,But simplified to implement a method,The list that calls lightweight so serves.In LDAP catalog is according to tree structure organization,Catalog by entry (Entry) is comprised,The record that entry is equivalent to closing the watch in fastening a database;Entry is the property that has area alias DN(Distinguished Name) (Attribute) assembles,DN is equivalent to relation database expressing medium key word (Primary Key) ;Attribute by the type (Type) and many values (Values) is comprised,The region in be equivalent to relation database (Field) is comprised by domain name and data type,The need that just retrieves to go to the lavatory,The Type in LDAP can have many Value,is not each region that ask to come true to reduce the redundancy of data in relation database must be irrelvant.The organization of the entry in LDAP has an organization according to situation and constituent concern commonly,Exceedingly intuitionistic.LDAP deposits data in the file,To raise efficiency to be able to use the file database that is based on index,is not relation database.LDAP agreement part returns those who set DN to name a method, access interface of format of format of control method, search, duplicate method, URL, development to wait.
The Openldap freeware or public domain software that the development kit that the package of freeware or public domain software that the LDAP server that ? ? Linux supports has Michigan university to develop commonly and Openldap organization are based on Michigan university provides issues a package,Among them configuration of installation of Openldap hair luggage is more simple.RedHat 6.1 Linux is issued Openldap software was included to wrap in edition,Should issue edition can get from service center of information of computer world cable,It is to the support of LDAP Redhat6.1 offers a important and patulous,(Refer to Redhat 6.1 product to introduce) ,The method that detailed introduction is installed in Linux under and deploys Openldap,And the back end that uses this software to wrap the account in be Windows Outlook to supply message book.
? ? 1. Install Openldap-1.2.7-2.rpm software package
If ? ? is not used RedHat 6.1 undertakes the system is installed directly,OK and independent use government implement Rpm undertakes becoming independent installing,Its format is:
? ? Rpm - I Openldap-1.2.7-2.rpm
? ? Rpm - I Openldap-devel-1.2.7-2.rpm
? ? 2. Relevant file
After ? ? installation ends,Corresponding executive file basically has:
? ? / Usr/sbin/slapd is the LDAP guard course that runs alone,Its listening client carries a request,Port date is commonly 389.
? ? / Usr/sbin/slurpd is the LDAP that moves alone is updated with duplicate process,It can inform relevant server undertakes updating the change of this locality database.
? ? / Usr/sbin/ldifldbm, / Usr/sbin/ldbmcat file of LDIF(LDAP Directory Interchange Format) (actual the file that is simple text form) the binary data file of form of translate into Gdbm and relevant tool.
? ? ?
? ? / Usr/bin/ldapsearch, / Usr/bin/ldapdelete, / Usr/bin/ldapmodify, / the client that Usr/bin/ud is LDAP carries software,The search that can complete pair of catalog, add, revise, delete wait for a function.
The configuration file that ? ? makes is in / below Etc/openldap catalog,Main configuration file has:
The configuration file that ? ? Slapd.conf is Slapd and Slurpd,Its are general the form is as follows:
? ? Defaultaccess Read
? ? Access To Attr=userpassword By Self Write By * Compare
? ? Access To Attr=mail By Self Write By * Read
? ? Include /etc/openldap/slapd.at.conf
? ? Include /etc/openldap/slapd.oc.conf
? ? Schemacheck Off
? ? #referral Ldap://sunshine.mccc.net
? ? Pidfile /var/run/slapd.pid
? ? Argsfile /var/run/slapd.args
? ? ########################################
? ? # Ldbm Database Definitions
? ? ########################################
? ? Database Ldbm
? ? #suffix "dc=your-domain, dc=com "
? ? #suffix "o=Your Organization Name, c=US "
? ? Suffix "o=mccc, c=US "
? ? Directory /usr/tmp
? ? Rootdn "cn=root, o=mccc, c=US "
? ? Rootpw Secret
? ? #replica Host=zx.mccc.net:389
? ? Binddn="ou=people, o=mccc, c=US" Bindmethod=simple