2015-12-18 19:23:36 +01:00
< !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
< html xmlns = "http://www.w3.org/1999/xhtml" xml:lang = "en"
lang="en" dir="ltr">
< head >
< meta http-equiv = "Content-Type" content = "text/html; charset=utf-8" / >
< title > < / title >
<!-- metadata -->
< meta name = "generator" content = "Offline" / >
< meta name = "version" content = "Offline 0.1" / >
<!-- style sheet links -->
< link rel = "stylesheet" media = "all" type = "text/css" href = "../../../css/all.css" / >
< link rel = "stylesheet" media = "screen" type = "text/css" href = "../../../css/screen.css" / >
< link rel = "stylesheet" media = "print" type = "text/css" href = "../../../css/print.css" / >
< / head >
< body >
< div class = "dokuwiki export" >
< h1 class = "sectionedit1" id = "mongodb_configuration_backends" > MongoDB configuration backends< / h1 >
< div class = "level1" >
< p >
2016-03-22 12:19:17 +01:00
< a href = "https://www.mongodb.org/" class = "urlextern" title = "https://www.mongodb.org/" rel = "nofollow" > MongoDB< / a > is a NoSQL database that can be used both for storing configuration and < a href = "../../documentation/2.0/mongodbsessionbackend.html" class = "wikilink1" title = "documentation:2.0:mongodbsessionbackend" > sessions< / a > . You need to install Perl MongoDB module to be able to use this backend.
2015-12-18 19:23:36 +01:00
< / p >
< p >
2016-03-22 12:19:17 +01:00
See < a href = "../../documentation/2.0/changeconfbackend.html" class = "wikilink1" title = "documentation:2.0:changeconfbackend" > how to change configuration backend< / a > to change your configuration database.
2015-12-18 19:23:36 +01:00
< / p >
< / div >
2016-02-10 11:17:35 +01:00
<!-- EDIT1 SECTION "MongoDB configuration backends" [1 - 366] -->
< h2 class = "sectionedit2" id = "configuration" > Configuration< / h2 >
2015-12-18 19:23:36 +01:00
< div class = "level2" >
< p >
To use a MongoDB backend, configure your < code > lemonldap-ng.ini< / code > file (section configuration) :
< / p >
< ul >
< li class = "level1" > < div class = "li" > Choose MongoDB as type< / div >
< / li >
< li class = "level1" > < div class = "li" > Set dbName and collectionName parameters if different than default values (llConfDB and configuration)< / div >
< / li >
2016-02-10 11:17:35 +01:00
< li class = "level1" > < div class = "li" > Set host and if needed db_name username, password and ssl fields as follow.< / div >
2015-12-18 19:23:36 +01:00
< / li >
< / ul >
< p >
Example :
< / p >
< pre class = "code ini" > < span class = "re0" > < span class = "br0" > [ < / span > configuration< span class = "br0" > ] < / span > < / span >
< span class = "re1" > type< / span > < span class = "sy0" > =< / span > < span class = "re2" > MongoDB< / span >
< span class = "re1" > dbName< / span > < span class = "sy0" > =< / span > < span class = "re2" > llConfDB< / span >
< span class = "re1" > collectionName< / span > < span class = "sy0" > =< / span > < span class = "re2" > configuration< / span >
2015-12-28 15:51:32 +01:00
< span class = "re1" > host< / span > < span class = "sy0" > =< / span > < span class = "re2" > 127.0.0.1:27017< / span >
< span class = "re1" > ssl< / span > < span class = "sy0" > =< / span > < span class = "re2" > 1< / span >
< span class = "co0" > ; authentication parameters< / span >
< span class = "re1" > db_name< / span > < span class = "sy0" > =< / span > < span class = "re2" > admin< / span >
2015-12-18 19:23:36 +01:00
< span class = "re1" > user< / span > < span class = "sy0" > =< / span > < span class = "re2" > lluser< / span >
2015-12-28 15:51:32 +01:00
< span class = "re1" > password< / span > < span class = "sy0" > =< / span > < span class = "re2" > llpassword< / span > < / pre >
< div class = "table sectionedit3" > < table class = "inline" >
< thead >
< tr class = "row0 roweven" >
2016-02-10 11:17:35 +01:00
< th class = "col0 centeralign" colspan = "3" > Optional parameters (see < a href = "http://search.cpan.org/perldoc?MongoDB%3A%3AMongoClient" class = "urlextern" title = "http://search.cpan.org/perldoc?MongoDB%3A%3AMongoClient" rel = "nofollow" > MongoDB::MongoClient< / a > man page) < / th >
2015-12-28 15:51:32 +01:00
< / tr >
< tr class = "row1 rowodd" >
< th class = "col0 centeralign" > Name < / th > < th class = "col1 centeralign" > Comment < / th > < th class = "col2 centeralign" > Example < / th >
< / tr >
< / thead >
< tr class = "row2 roweven" >
< td class = "col0 leftalign" > db_name < / td > < td class = "col1 leftalign" > Admin database (dafault: admin) < / td > < td class = "col2 leftalign" > admin < / td >
< / tr >
< tr class = "row3 rowodd" >
< td class = "col0 leftalign" > auth_mechanism < / td > < td class = "col1 leftalign" > Authentication mechanism < / td > < td class = "col2 leftalign" > PLAIN < / td >
< / tr >
< tr class = "row4 roweven" >
< td class = "col0" > auth_mechanism_properties < / td > < td class = "col1 leftalign" > < / td > < td class = "col2 leftalign" > < / td >
< / tr >
< tr class = "row5 rowodd" >
< td class = "col0 leftalign" > connect_timeout < / td > < td class = "col1 leftalign" > Connection timeout < / td > < td class = "col2 leftalign" > 10000 < / td >
< / tr >
< tr class = "row6 roweven" >
< td class = "col0 leftalign" > ssl < / td > < td class = "col1" > Boolean or hash ref (default: 0) < / td > < td class = "col2 leftalign" > 1 < / td >
< / tr >
< tr class = "row7 rowodd" >
< td class = "col0 leftalign" > username < / td > < td class = "col1 leftalign" > Username to use to connect < / td > < td class = "col2 leftalign" > lluser < / td >
< / tr >
< tr class = "row8 roweven" >
< td class = "col0 leftalign" > password < / td > < td class = "col1 leftalign" > Password < / td > < td class = "col2" > llpassword < / td >
< / tr >
< / table > < / div >
2016-02-10 11:17:35 +01:00
<!-- EDIT3 TABLE [922 - 1688] -->
< / div >
<!-- EDIT2 SECTION "Configuration" [367 - 1689] -->
< h1 class = "sectionedit4" id = "mini_mongodb_howto" > Mini MongoDB howto< / h1 >
< div class = "level1" >
< p >
Just some commands needed to create collection and user:
< / p >
< pre class = "code" > $ mongo
connecting to: test
> use configuration
switched to db configuration
> db.createCollection(" configuration" )
...
> db.addUser({user:" lluser" ,pwd:" llpassword" ,roles:[" readWrite" ]})
...
> exit
bye
$< / pre >
2015-12-18 19:23:36 +01:00
< / div >
< / div > <!-- closes <div class="dokuwiki export"> -->