[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
muddling through install w/ MySQL
Hello,
I've been reading the archives, trying to follow Q&A from other people, and
follow the servers/slapd/back-sql/docs/install file, but I have to admit to
being considerably lost. Hopefully somebody can point me in the right
direction, either to better install guidance, or simply help answer my
questions.
For starters, I've done the following thus far:
-un-tar/-gzip distro
-ran ./configure --prefix=/usr --enable-sql
-make depend
-make
-mysqladmin create openldap
-mysql < backsql_create.sql
-mysql < testdb_create.sql
-mysql < testdb_data.sql
-mysql < testdb_metadata.sql
-make test
(ends in some errors, though pertaining to ldbms???)
-------------- make test errors --------------
>>>>> Starting test016-subref ...
running defines.sh
Cleaning up in ./test-db...
Running slapadd to build slapd database...
Starting slapd on TCP/IP port 9009...
Testing slapd searching...
Waiting 5 seconds for slapd to start...
Testing ManageDsaIT searching at c=US...
Testing ManageDsaIT searching at referral object...
Testing ManageDsaIT searching below referral object...
Testing base searching at c=US...
Testing one-level searching at c=US...
Testing subtree searching at c=US...
Testing base searching at o=abc,c=US...
Testing one-level searching at o=abc,c=US...
Testing subtree searching at o=abc,c=US...
Testing base searching at uid=xxx,o=abc,c=US...
Testing one-level searching at uid=xxx,o=abc,c=US...
Testing subtree searching at uid=xxx,o=abc,c=US...
Filtering ldapsearch results...
Filtering expected LDIF for comparison...
Comparing filter output...
>>>>> Test succeeded
>>>>> ./scripts/test016-subref completed OK.
>>>>> waiting 10 seconds for things to exit
ln: `./data': cannot overwrite directory
make[1]: [test-ldbm] Error 1 (ignored)
ln: `./schema': File exists
make[1]: [test-ldbm] Error 1 (ignored)
ln: `ucdata/liblunicode': File exists
make[1]: [test-ldbm] Error 1 (ignored)
run configure with --enable-ldbm
make[1]: Leaving directory `/root/openldap/openldap-2.1.12/tests'
-------------- end of make test errors --------------
-make install
I'm using unixODBC and MyODBC, and my /etc/odbc.ini file looks like:
-------------- /etc/odbc.ini --------------
# From the MyODBC package
[MySQL]
Description = ODBC for MySQL
Driver = /usr/lib/libmyodbc.so
FileUsage = 1
-------------- end of /etc/odbc.ini --------------
I'm definitely not sure what all should be setup in the slapd.conf file,
because there did not appear to be a sql section in the online docs at
openldap.org. So, I simply copied-over the slapd.conf file included in
servers/slapd/back-sql/rdbms_depend/ and modified it to read:
-------------- /usr/etc/openldap/slapd.conf --------------
# $OpenLDAP: pkg/ldap/servers/slapd/back-sql/rdbms_depend/mysql/slapd.conf,v
1.3 2001/08/02 15:28:59 mit Exp $
#
# See slapd.conf(5) for details on configuration options.
# This file should NOT be world readable.
#
include /usr/etc/openldap/schema/core.schema
include /usr/etc/openldap/schema/cosine.schema
include /usr/etc/openldap/schema/inetorgperson.schema
# Define global ACLs to disable default read access.
# Do not enable referrals until AFTER you have a working directory
# service AND an understanding of referrals.
#referral ldap://root.openldap.org
pidfile /var/lib/openldap/slapd.pid
argsfile /var/lib/openldap/slapd.args
#######################################################################
# sql database definitions
#######################################################################
database sql
suffix "o=sql,c=RU"
rootdn "cn=root,o=sql,c=RU"
rootpw secret
dbname ldap_mysql
dbuser root
dbpasswd ""
subtree_cond "ldap_entries.dn LIKE CONCAT('%',?)"
insentry_query "INSERT INTO ldap_entries (dn,oc_map_id,parent,keyval)
VALUES (?,?,?,?)"
-------------- end of /usr/etc/openldap/slapd.conf --------------
Now, I think it's pretty obvious that this is not necessarily the
configuration. I'm at a complete loss what to put there, frankly. I'm not
sure what all I should be doing for setup. Frankly, I'm at quite a loss
here.
Finally, I try to startup "slapd -d 5" and I receive the following errors:
-------------- "slapd -d 5" output --------------
@(#) $OpenLDAP: slapd 2.1.12 (Tue Feb 11 17:04:46 MST 2003) $
root@fool.sofast.net:/root/openldap/openldap-2.1.12/servers/slapd
daemon_init: <null>
daemon_init: listen on ldap:///
daemon_init: 1 listeners to open...
ldap_url_parse_ext(ldap:///)
daemon: socket() failed errno=97 (Address family not supported by protocol)
daemon: initialized ldap:///
daemon_init: 2 listeners opened
slapd init: initiated server.
slap_sasl_init: initialized!
bdb_initialize: initialize BDB backend
bdb_initialize: Sleepycat Software: Berkeley DB 4.0.14: (November 18, 2001)
==>backsql_initialize()
<==backsql_initialize()
>>> dnNormalize: <cn=Subschema>
=> ldap_bv2dn(cn=Subschema,0)
<= ldap_bv2dn(cn=Subschema,0)=0
=> ldap_dn2bv(272)
<= ldap_dn2bv(cn=subschema,272)=0
<<< dnNormalize: <cn=subschema>
==>backsql_db_init()
==>backsql_init_db_env()
<==backsql_init_db_env()
<==backsql_db_init()
>>> dnPrettyNormal: <o=sql,c=RU>
=> ldap_bv2dn(o=sql,c=RU,0)
<= ldap_bv2dn(o=sql,c=RU,0)=0
=> ldap_dn2bv(272)
<= ldap_dn2bv(o=sql,c=RU,272)=0
=> ldap_dn2bv(272)
<= ldap_dn2bv(o=sql,c=ru,272)=0
<<< dnPrettyNormal: <o=sql,c=RU>, <o=sql,c=ru>
>>> dnPrettyNormal: <cn=root,o=sql,c=RU>
=> ldap_bv2dn(cn=root,o=sql,c=RU,0)
<= ldap_bv2dn(cn=root,o=sql,c=RU,0)=0
=> ldap_dn2bv(272)
<= ldap_dn2bv(cn=root,o=sql,c=RU,272)=0
=> ldap_dn2bv(272)
<= ldap_dn2bv(cn=root,o=sql,c=ru,272)=0
<<< dnPrettyNormal: <cn=root,o=sql,c=RU>, <cn=root,o=sql,c=ru>
==>backsql_db_config()
<==backsql_db_config(): dbname=ldap_mysql
==>backsql_db_config()
<==backsql_db_config(): dbuser=root
==>backsql_db_config()
<==backsql_db_config(): dbpasswd=xxxx
==>backsql_db_config()
<==backsql_db_config(): subtree_cond=ldap_entries.dn LIKE CONCAT('%',?)
==>backsql_db_config()
<==backsql_db_config(): insentry_query=INSERT INTO ldap_entries
(dn,oc_map_id,parent,keyval) VALUES (?,?,?,?)
matching_rule_use_init
2.5.13.0 (objectIdentifierMatch): matchingRuleUse: ( 2.5.13.0 NAME
'objectIdentifierMatch' APPLIES ( objectClass $ structuralObjectClass $
supportedControl $ supportedExtension $ supportedFeatures $
supportedApplicationContext ) )
2.5.13.1 (distinguishedNameMatch): matchingRuleUse: ( 2.5.13.1 NAME
'distinguishedNameMatch' APPLIES ( creatorsName $ modifiersName $
subschemaSubentry $ namingContexts $ aliasedObjectName $ distinguishedName $
member $ owner $ roleOccupant $ seeAlso $ manager $ documentAuthor $
secretary $ associatedName $ dITRedirect ) )
2.5.13.2 (caseIgnoreMatch): matchingRuleUse: ( 2.5.13.2 NAME
'caseIgnoreMatch' APPLIES ( supportedSASLMechanisms $ vendorName $
vendorVersion $ ref $ name $ cn $ knowledgeInformation $ sn $ serialNumber $
c $ l $ st $ street $ o $ ou $ title $ description $ businessCategory $
postalCode $ postOfficeBox $ physicalDeliveryOfficeName $
destinationIndicator $ givenName $ initials $ generationQualifier $
dnQualifier $ houseIdentifier $ dmdName $ labeledURI $ uid $
textEncodedORAddress $ info $ drink $ roomNumber $ userClass $ host $
documentIdentifier $ documentTitle $ documentVersion $ documentLocation $
personalTitle $ co $ uniqueIdentifier $ organizationalStatus $ buildingName
$ documentPublisher $ carLicense $ departmentNumber $ displayName $
employeeNumber $ employeeType $ preferredLanguage ) )
2.5.13.3 (caseIgnoreOrderingMatch): matchingRuleUse: ( 2.5.13.3 NAME
'caseIgnoreOrderingMatch' APPLIES ( serialNumber $ destinationIndicator $
dnQualifier ) )
2.5.13.5 (caseExactMatch): matchingRuleUse: ( 2.5.13.5 NAME
'caseExactMatch' APPLIES ( supportedSASLMechanisms $ vendorName $
vendorVersion $ ref $ name $ cn $ knowledgeInformation $ sn $ serialNumber $
c $ l $ st $ street $ o $ ou $ title $ description $ businessCategory $
postalCode $ postOfficeBox $ physicalDeliveryOfficeName $
destinationIndicator $ givenName $ initials $ generationQualifier $
dnQualifier $ houseIdentifier $ dmdName $ labeledURI $ uid $
textEncodedORAddress $ info $ drink $ roomNumber $ userClass $ host $
documentIdentifier $ documentTitle $ documentVersion $ documentLocation $
personalTitle $ co $ uniqueIdentifier $ organizationalStatus $ buildingName
$ documentPublisher $ carLicense $ departmentNumber $ displayName $
employeeNumber $ employeeType $ preferredLanguage ) )
2.5.13.6 (caseExactOrderingMatch): matchingRuleUse: ( 2.5.13.6 NAME
'caseExactOrderingMatch' APPLIES ( serialNumber $ destinationIndicator $
dnQualifier ) )
2.5.13.7 (caseExactSubstringsMatch): matchingRuleUse: ( 2.5.13.7 NAME
'caseExactSubstringsMatch' APPLIES ( serialNumber $ destinationIndicator $
dnQualifier ) )
2.5.13.8 (numericStringMatch): matchingRuleUse: ( 2.5.13.8 NAME
'numericStringMatch' APPLIES ( x121Address $ internationaliSDNNumber ) )
2.5.13.11 (caseIgnoreListMatch): matchingRuleUse: ( 2.5.13.11 NAME
'caseIgnoreListMatch' APPLIES ( postalAddress $ registeredAddress $
homePostalAddress ) )
2.5.13.13 (booleanMatch): matchingRuleUse: ( 2.5.13.13 NAME
'booleanMatch' APPLIES hasSubordinates )
2.5.13.14 (integerMatch): matchingRuleUse: ( 2.5.13.14 NAME
'integerMatch' APPLIES ( supportedLDAPVersion $ mailPreferenceOption ) )
2.5.13.16 (bitStringMatch): matchingRuleUse: ( 2.5.13.16 NAME
'bitStringMatch' APPLIES x500UniqueIdentifier )
2.5.13.17 (octetStringMatch): matchingRuleUse: ( 2.5.13.17 NAME
'octetStringMatch' APPLIES userPassword )
2.5.13.20 (telephoneNumberMatch): matchingRuleUse: ( 2.5.13.20 NAME
'telephoneNumberMatch' APPLIES ( telephoneNumber $ homePhone $ mobile $
pager ) )
2.5.13.22 (presentationAddressMatch): matchingRuleUse: ( 2.5.13.22 NAME
'presentationAddressMatch' APPLIES presentationAddress )
2.5.13.23 (uniqueMemberMatch): matchingRuleUse: ( 2.5.13.23 NAME
'uniqueMemberMatch' APPLIES uniqueMember )
2.5.13.24 (protocolInformationMatch): matchingRuleUse: ( 2.5.13.24 NAME
'protocolInformationMatch' APPLIES protocolInformation )
2.5.13.27 (generalizedTimeMatch): matchingRuleUse: ( 2.5.13.27 NAME
'generalizedTimeMatch' APPLIES ( createTimestamp $ modifyTimestamp ) )
2.5.13.29 (integerFirstComponentMatch): matchingRuleUse: ( 2.5.13.29
NAME 'integerFirstComponentMatch' APPLIES ( supportedLDAPVersion $
mailPreferenceOption ) )
2.5.13.30 (objectIdentifierFirstComponentMatch): matchingRuleUse: (
2.5.13.30 NAME 'objectIdentifierFirstComponentMatch' APPLIES ( objectClass $
structuralObjectClass $ supportedControl $ supportedExtension $
supportedFeatures $ matchingRules $ attributeTypes $ objectClasses $
matchingRuleUse $ ldapSyntaxes $ supportedApplicationContext ) )
2.5.13.34 (certificateExactMatch): matchingRuleUse: ( 2.5.13.34 NAME
'certificateExactMatch' APPLIES ( userCertificate $ cACertificate ) )
1.3.6.1.4.1.1466.109.114.1 (caseExactIA5Match): matchingRuleUse: (
1.3.6.1.4.1.1466.109.114.1 NAME 'caseExactIA5Match' APPLIES ( altServer $
mail $ dc $ associatedDomain $ email $ aRecord $ mDRecord $ mXRecord $
nSRecord $ sOARecord $ cNAMERecord $ janetMailbox ) )
1.3.6.1.4.1.1466.109.114.2 (caseIgnoreIA5Match): matchingRuleUse: (
1.3.6.1.4.1.1466.109.114.2 NAME 'caseIgnoreIA5Match' APPLIES ( altServer $
mail $ dc $ associatedDomain $ email $ aRecord $ mDRecord $ mXRecord $
nSRecord $ sOARecord $ cNAMERecord $ janetMailbox ) )
1.2.840.113556.1.4.803 (integerBitAndMatch): matchingRuleUse: (
1.2.840.113556.1.4.803 NAME 'integerBitAndMatch' APPLIES (
supportedLDAPVersion $ mailPreferenceOption ) )
1.2.840.113556.1.4.804 (integerBitOrMatch): matchingRuleUse: (
1.2.840.113556.1.4.804 NAME 'integerBitOrMatch' APPLIES (
supportedLDAPVersion $ mailPreferenceOption ) )
slapd startup: initiated.
==>backsql_db_open(): testing RDBMS connection
backsql_db_open(): concat func not specified (use "concat_pattern" directive
in slapd.conf)
backsql_db_open(): setting 'ldap_entries.dn=?' as default
backsql_db_open(): objectclass mapping SQL statement not specified (use
"oc_query" directive in slapd.conf)
backsql_db_open(): setting 'SELECT
id,name,keytbl,keycol,create_proc,delete_proc,expect_return FROM
ldap_oc_mappings' by default
backsql_db_open(): attribute mapping SQL statement not specified (use
"at_query" directive in slapd.conf)
backsql_db_open(): setting 'SELECT
name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_r
eturn,sel_expr_u FROM ldap_attr_mappings WHERE oc_map_id=?' by default
backsql_db_open(): entry deletion SQL statement not specified (use
"delentry_query" directive in slapd.conf)
backsql_db_open(): setting 'DELETE FROM ldap_entries WHERE id=?' by default
==>backsql_get_db_conn()
==>backsql_open_db_conn()
backsql_open_db_conn: SQLConnect() to database 'ldap_mysql' as user 'root'
failed:
Return code: -1
Native error code: 0
SQL engine state: IM002
Message: [unixODBC][Driver Manager]Data source name not found, and no
default driver specified
backsql_get_db_conn(): could not get connection handle -- returning NULL
backsql_db_open(): connection failed, exiting
backend_startup: bi_db_open(0) failed! (1)
slapd shutdown: initiated
==>backsql_db_close()
<==backsql_db_close()
slapd shutdown: freeing system resources.
==>backsql_db_destroy()
==>backsql_free_db_env()
<==backsql_free_db_env()
==>destroy_schema_map()
<==destroy_schema_map()
<==backsql_db_destroy()
slapd stopped.
connections_destroy: nothing to destroy.
-------------- end of "slapd -d 5" output --------------
Thank you for your help. I apologize for the extreme length, but it seems
that most times folks like to see more info rather than less.
-ben
--------------------------------------------
Benjamin Tomhave, Senior Systems Engineer
btomhave@sofast.net
Sofast Communications www.sofast.net