﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>C++博客-zhiye_wang-随笔分类-LDAP</title><link>http://www.cppblog.com/zhiyewang/category/21210.html</link><description>向星空仰望的越深，越发现自己的渺小</description><language>zh-cn</language><lastBuildDate>Wed, 20 Apr 2016 09:45:12 GMT</lastBuildDate><pubDate>Wed, 20 Apr 2016 09:45:12 GMT</pubDate><ttl>60</ttl><item><title>ubuntu安装OpenLDAP(二) 配置LDAP</title><link>http://www.cppblog.com/zhiyewang/archive/2016/04/20/213312.html</link><dc:creator>zhiye_wang</dc:creator><author>zhiye_wang</author><pubDate>Wed, 20 Apr 2016 09:31:00 GMT</pubDate><guid>http://www.cppblog.com/zhiyewang/archive/2016/04/20/213312.html</guid><wfw:comment>http://www.cppblog.com/zhiyewang/comments/213312.html</wfw:comment><comments>http://www.cppblog.com/zhiyewang/archive/2016/04/20/213312.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/zhiyewang/comments/commentRss/213312.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/zhiyewang/services/trackbacks/213312.html</trackback:ping><description><![CDATA[<p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><span style="font-family: 微软雅黑, sans-serif;"><a href="http://blog.chinaunix.net/uid-29757900-id-5705855.html" _href="http://blog.chinaunix.net/uid-29757900-id-5705855.html" style="text-decoration: none; color: #19599b; font-family: 微软雅黑, 黑体, Verdana; font-size: 20px;"><span>ubuntu安装OpenLDAP(二) 配置LDAP</span></a></span><br /></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;">上一篇博文中，我们成功的安装了OpenLDAP-2.4.4到系统中，这篇文章介绍如何配置一个我</p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;">们自己的ldap服务器来使用。</p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;">1 配置ldap的dc和cn</p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><span style="color: red;">vim&nbsp;/usr/local/etc/openldap/slapd.conf</span></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;">修改其中的下面两行：</p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><span style="color: red;">suffix&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"dc=example,dc=com"</span></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><span style="color: red;">rootdn&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"cn=Manager,dc=example,dc=com"</span></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;">我修改后的效果如图：</p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><img src="http://www.cppblog.com/images/cppblog_com/zhiyewang/09.png" width="540" height="149" alt="" /><br /></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;">2&nbsp;<span style="font-family: 宋体;">启动</span>slapd</p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><span style="color: red;"># su root -c /usr/local/libexec/slapd</span></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><span style="font-family: 宋体;">验证一下能不能使用：</span></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><span style="color: red;"># ldapsearch -x -b '' -s base'(objectclass=*)'</span></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><img src="http://www.cppblog.com/images/cppblog_com/zhiyewang/10.png" width="796" height="378" alt="" /><br /></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><span style="font-family: 宋体;">说明</span>ldap<span style="font-family: 宋体;">服务器已经可以使用了。</span></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><span style="font-family: 宋体;">3 新建管理账号<br />建立一个</span>cloudsoar.ldif&nbsp;<span style="font-family: 宋体;">文件</span></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><span style="color: red;"># vim cloudsoar.ldif</span></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><span style="color: red;">dn: dc=cloudsoar,dc=com</span></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><span style="color: red;">objectclass: dcObject</span></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><span style="color: red;">objectclass: organization</span></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><span style="color: red;">o: cloudsoar company</span></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><span style="color: red;">dc: cloudsoar</span></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;">&nbsp;</p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><span style="color: red;">dn:cn=Manager,dc=cloudsoar,dc=com</span></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><span style="color: red;">objectclass:organizationalRole</span></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><span style="color: red;">cn: Manager</span></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><span style="font-family: 宋体;">将文件中的内容插入数据库</span></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><span style="color: #ff0000;">ldapadd -x -D "cn=Manager,dc=cloudsoar,dc=com"-W -f cloudsoar.ldif&nbsp;</span></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><span style="font-family: 宋体;">如果需要密码，我们的默认密码是：</span><span style="font-family: Calibri, sans-serif;">secret</span><span style="font-family: 宋体;">（位于</span><span style="font-family: Calibri, sans-serif;">/usr/local/etc/openldap/slapd.conf</span><span style="font-family: 宋体;">）</span></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><img src="http://www.cppblog.com/images/cppblog_com/zhiyewang/11.1.png" width="781" height="111" alt="" /><br /></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><span style="font-family: 宋体;">这里可以看到节点已经插入到</span>ldap<span style="font-family: 宋体;">了。这里的</span>cloudsoar<span style="font-family: 宋体;">是我起的域名，您也可以根据需要设置一个自己喜欢的域名。</span></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><span style="font-family: 宋体;">查询一下：</span></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><span style="color: #ff0000;"># ldapsearch -x -b 'dc=cloudsoar,dc=com''(objectclass=*)'</span></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><img src="http://www.cppblog.com/images/cppblog_com/zhiyewang/12.1.png" width="791" height="377" alt="" /><br /></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><span style="font-family: 宋体;">这里我还是不放心，从另外一台安装了</span>windows<span style="font-family: 宋体;">操作系统的电脑上，使用</span>LDAPAdmin.exe&nbsp;<span style="font-family: 宋体;">来连接试试。</span></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><img src="http://www.cppblog.com/images/cppblog_com/zhiyewang/13.png" width="456" height="421" alt="" /><br /></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><img src="http://www.cppblog.com/images/cppblog_com/zhiyewang/14.png" width="958" height="204" alt="" /><br /></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><span style="font-family: 宋体;">可以看到我的</span>ldap<span style="font-family: 宋体;">已经可以使用了。</span></p><div><span style="font-family: 宋体;"><br /></span></div><img src ="http://www.cppblog.com/zhiyewang/aggbug/213312.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/zhiyewang/" target="_blank">zhiye_wang</a> 2016-04-20 17:31 <a href="http://www.cppblog.com/zhiyewang/archive/2016/04/20/213312.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title> ubuntu安装OpenLDAP(附错误的详细解决办法)</title><link>http://www.cppblog.com/zhiyewang/archive/2016/04/20/213311.html</link><dc:creator>zhiye_wang</dc:creator><author>zhiye_wang</author><pubDate>Wed, 20 Apr 2016 09:27:00 GMT</pubDate><guid>http://www.cppblog.com/zhiyewang/archive/2016/04/20/213311.html</guid><wfw:comment>http://www.cppblog.com/zhiyewang/comments/213311.html</wfw:comment><comments>http://www.cppblog.com/zhiyewang/archive/2016/04/20/213311.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/zhiyewang/comments/commentRss/213311.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/zhiyewang/services/trackbacks/213311.html</trackback:ping><description><![CDATA[<div></div><div><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><strong>ubuntu安装OpenLDAP(附错误的详细解决办法)</strong></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><strong>1&nbsp;<span style="font-family: 宋体;">下载</span>OpenLDAP<span style="font-family: 宋体;">源码</span></strong></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><span style="font-family: 宋体;"><br /></span></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;">&nbsp;<a href="http://www.openldap.org/software/download/" _href="http://www.openldap.org/software/download/">http://www.openldap.org/software/download/</a></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;">或者</p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;">&nbsp;<a href="ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release.tgz" _href="ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release.tgz">ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release.tgz</a></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><br /></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><strong>2&nbsp;<span style="font-family: 宋体;">解压到本地</span></strong></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;">&nbsp;# gunzip-c openldap-VERSION.tgz | tar xf -</p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto; text-indent: 7px;"><span style="color: #ff0000;"># cd openldap-2.4.44</span></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto; text-indent: 7px;"><span style="color: #ff0000;"># ./configure</span></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;">&nbsp;configure: error: BDB/HDB: BerkeleyDB notavailable</p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><span style="font-family: 宋体;">提示本地没有安装</span>BerkeleyDB<span style="font-family: 宋体;">数据库</span></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><strong>3&nbsp;<span style="font-family: 宋体;">安装</span>BerkeleyDB</strong></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;">&nbsp;<span style="font-family: 宋体;">去</span>Oracle<span style="font-family: 宋体;">官网下载：</span></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;">&nbsp;http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/downloads/index.html</p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><span style="font-family: 宋体;">解压到本地</span></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><img src="http://www.cppblog.com/images/cppblog_com/zhiyewang/01.png" width="743" height="54" alt="" /><br /></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><span style="font-family: 宋体;">切换到</span>build_unix&nbsp;<span style="font-family: 宋体;">目录</span></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><span style="color: #ff0000;"># cd build_unix</span></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><span style="color: #ff0000;"># ../dist/configure</span></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><span style="color: #ff0000;"># make</span></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><span style="color: #ff0000;"># make install</span></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;">root@cloudsoar-virtual-machine:/home/cloudsoar/db-6.2.23/build_unix#<span style="color: red;">make install</span></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;">Installing DB include files:/usr/local/BerkeleyDB.6.2/include ...</p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;">Installing DB library:/usr/local/BerkeleyDB.6.2/lib ...</p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;">libtool: install: cp -p .libs/libdb-6.2.so/usr/local/BerkeleyDB.6.2/lib/libdb-6.2.so</p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;">libtool: install: cp -p .libs/db_upgrade/usr/local/BerkeleyDB.6.2/bin/db_upgrade</p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;">libtool: install: cp -p .libs/db_verify/usr/local/BerkeleyDB.6.2/bin/db_verify</p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;">Installing documentation:/usr/local/BerkeleyDB.6.2/docs ...</p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><strong>4&nbsp;<span style="font-family: 宋体;">查看安装</span></strong></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><img src="http://www.cppblog.com/images/cppblog_com/zhiyewang/02.png" width="780" height="57" alt="" /><br /></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><strong>5&nbsp;<span style="font-family: 宋体;">设置到系统变量</span></strong></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><span style="font-family: 宋体;">不设置的话，等下安装</span>OpenLDAP<span style="font-family: 宋体;">时候执行</span>./configure<span style="font-family: 宋体;">检查时候还会报同样的错</span></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><span style="color: #ff0000;"># vim /etc/ld.so.conf</span></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><span style="font-family: 宋体;">添加一行：</span>/usr/local/BerkeleyDB.6.2/lib/</p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><span style="font-family: 宋体;">保存退出。</span></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><span style="font-family: 宋体;">执行生效：<span style="color: #ff0000;">#&nbsp;</span></span><span style="color: #ff0000;">ldconfig &#8211;v</span></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><strong>6&nbsp;<span style="font-family: 宋体;">继续安装</span>openldap-2.4.44</strong></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><img src="http://www.cppblog.com/images/cppblog_com/zhiyewang/03.png" width="783" height="126" alt="" /><br /></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><span style="font-family: 宋体;">切换到</span>openldap<span style="font-family: 宋体;">的源码目录下，重新执行</span>configure<span style="font-family: 宋体;">文件</span></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;">#&nbsp;<span style="color: red;">./configure CPPFLAGS="-I/usr/local/BerkeleyDB.6.2/include-D_GNU_SOURCE" LDFLAGS="-L/usr/local/BerkeleyDB.6.2/lib"</span></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><span style="font-family: 宋体;">执行后报错</span></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;">error: BerkeleyDB version incompatible withBDB/HDB backends</p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><span style="font-family: 宋体;">这里找不到原因，后来查看</span>openladp-2.4.44,<span style="font-family: 宋体;">目录的</span>README<span style="font-family: 宋体;">文件发现如下内容：</span></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><img src="http://www.cppblog.com/images/cppblog_com/zhiyewang/04.png" width="574" height="86" alt="" /><br /></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><span style="font-family: 宋体;">郁闷，原来</span>openldap-2.4.44<span style="font-family: 宋体;">要求用</span>Oracle Berkeley 4.4-4.8<span style="font-family: 宋体;">或者</span>5.0-5.1<span style="font-family: 宋体;">版本的，而我用的是</span>db-6.2.23.tar.gz<span style="font-family: 宋体;">版本的。</span></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><span style="font-family: 宋体;">没办法，只有重新去</span>Oracle<span style="font-family: 宋体;">官网下载一个</span>db-5.1.29.tar.gz<span style="font-family: 宋体;">版本的。</span></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><span style="font-family: 宋体;">按照安装</span>Berkeley 6.2<span style="font-family: 宋体;">的方法再次安装</span>Berkeley DB 5.1<span style="font-family: 宋体;">。</span></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"># cd build_unix</p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"># ../dist/configure</p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"># make</p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"># make install</p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"># vim /etc/ld.so.conf</p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><span style="font-family: 宋体;">添加一行：</span>/usr/local/BerkeleyDB.5.1/lib/</p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><span style="font-family: 宋体;">保存退出。</span></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><span style="font-family: 宋体;">执行生效：</span>ldconfig &#8211;v</p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;">&nbsp;</p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><strong>8&nbsp;<span style="font-family: 宋体;">安装</span>openldap&nbsp;&nbsp;</strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><span style="font-family: 宋体;">切换到</span>openldap-2.4.44<span style="font-family: 宋体;">目录</span></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;">#&nbsp;<span style="color: red;">./configure CPPFLAGS="-I/usr/local/BerkeleyDB.5.1/include-D_GNU_SOURCE" LDFLAGS="-L/usr/local/BerkeleyDB.5.1/lib"</span></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><span style="font-family: 宋体;">执行完毕可以看到提示我执行</span>make depand<span style="font-family: 宋体;">了</span></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><img src="http://www.cppblog.com/images/cppblog_com/zhiyewang/05.png" width="615" height="218" alt="" /><br /></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><strong>9&nbsp;<span style="font-family: 宋体;">编译软件</span></strong></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><span style="font-family: 宋体;">根据</span><a href="http://www.openldap.org/doc/admin24/install.html" _href="http://www.openldap.org/doc/admin24/install.html">http://www.openldap.org/doc/admin24/install.html</a><span style="font-family: 宋体;">的安装步骤继续执行</span></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><span style="font-family: 宋体;">执行命令：</span>#&nbsp;<span style="color: red;">make depend</span></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><img src="http://www.cppblog.com/images/cppblog_com/zhiyewang/06.png" width="692" height="77" alt="" /><br /></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><span style="font-family: 宋体;">执行命令：</span>#&nbsp;<span style="color: red;">make</span></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><strong>10&nbsp;<span style="font-family: 宋体;">测试软件</span></strong></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><span style="font-family: 宋体;">根据官方文档说明：</span>Once the software has been properly configured and successfullymade, you should run the test suite to verify the build.</p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><span style="font-family: 宋体;">我们也需要测试一下安装是否成功，执行命令：</span>#&nbsp;<span style="color: red;">make test</span></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><img src="http://www.cppblog.com/images/cppblog_com/zhiyewang/07.png" width="669" height="169" alt="" /><br /></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><span style="font-family: 宋体;">说明安装环境是没问题了。</span></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><strong>11&nbsp;<span style="font-family: 宋体;">安装</span>openldap<span style="font-family: 宋体;">到系统</span></strong></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><span style="font-family: 宋体;">根据官方文档说明：</span>By default OpenLDAP Software is installed in /usr/local. If youchanged this setting with the --prefix configure option, it will be installedin the location you provided.</p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><span style="font-family: 宋体;">我们可以加</span>&#8211;prefix&nbsp;<span style="font-family: 宋体;">参数来指定我们自己想要安装的位置。默认是安装到</span>&nbsp;/usr/local<span style="font-family: 宋体;">目录下。</span></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><span style="font-family: 宋体;">执行命令：</span>#&nbsp;<span style="color: red;">su root -c 'make install'</span></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><img src="http://www.cppblog.com/images/cppblog_com/zhiyewang/08.png" width="779" height="109" alt="" /><br /></p><p style="margin-right: 0px; margin-left: 0px; font-family: 微软雅黑; widows: auto;"><span style="font-family: 宋体;">到这里</span>openldap-2.4.44<span style="font-family: 宋体;">已经成功的安装到我的系统当中。默认的配置文件在</span>&nbsp;<span style="color: #ff0000;">/usr/local/etc/openldap</span>&nbsp;<span style="font-family: 宋体;">下。</span></p></div><div><span style="font-family: 宋体;"><br /></span></div><img src ="http://www.cppblog.com/zhiyewang/aggbug/213311.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/zhiyewang/" target="_blank">zhiye_wang</a> 2016-04-20 17:27 <a href="http://www.cppblog.com/zhiyewang/archive/2016/04/20/213311.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>