LDAP服务OpenDJ 部署

OpenDJ

一、简介

OpenDJ(Open source Directory services for the Java platform) 是一个全新的 LDAPv3 兼容的目录服务,为企业提供了一个高性能,高可靠性的身份管理。它容易安装,加上Java平台优势,使得 OpenDJ 成为最简单和快速的目录服务器。
forgerock 公司开发:
https://backstage.forgerock.com/docs/opendj/3.5/admin-guide/
除了这个之外,我在的公司之前使用的是 Oracle的 ODSEE 作为LDAP服务。

选择 OpenDJ 作为企业目录服务有以下优势:
降低用户成本: 在消耗更少的资源(disks, memory and CPUs).下提供更好的性能。 通过自动化简化管理任务。
平台无关 :可运行于任何支持Java 6 平台,包括虚拟化的环境。
高可靠性:支持多主节点副本拓扑环境下多服务器部署,提供故障和灾难恢复。
数据存储安全:支持不同级别的验证和夜班。通过加密和扩展策略来保护密码。
监控和提醒:第三方程序可以使用 SNMP 和 JMX 进行监控。支持自定义提醒功能,针对服务中特定的事件。
互操作性: 支持全部l LDAPv3 标准规范,大部分 LDAPv3 标准和一些试验性的扩展,以及供应商特定的扩展,容易与应用集成。

官方下载地址:https://github.com/OpenRock/OpenDJ/releases

二、部署安装

需要准备的是:
1、安装好jdk ,我安装的是1.8_192的版本。
2、调整ulimit 的openfile到 65535。

1、单节点安装:

cd /opt/svr/
unzip OpenDJ-3.0.0.zip
cd opendj
/apps/svr/opendj/setup --cli #1、启动安装
What would you like to use as the initial root user DN for the Directory
Server? [cn=Directory Manager]: #2、提示输入root超级管理员账号名称,回车默认使用: cn=Directory Manager 作为管理员,这就直接回车了。
Please provide the password to use for the initial root user: #3、输入管理员密码 我这用 M999nb
Please re-enter the password for confirmation: #4、再次输入密码确认
Provide the fully-qualified directory server host name that will be used when
generating self-signed certificates for LDAP SSL/StartTLS, the administration
connector, and replication [testoy.lovedi.com]: #5、提供在为LDAP SSL / StartTLS,管理连接器和复制[testoy.lovedi.com]生成自签名证书时将使用的完全限定目录服务器主机名:,这个看提示是输入SSL的域名,默认是主机名,我这就直接回车了。
On which port would you like the Directory Server to accept connections from
LDAP clients? [1389]: #6、 ldap监听服务端口,默认1389 ,直接回车
On which port would you like the Administration Connector to accept
connections? [4444]: #7、管理连接器端口,默认4444,这边都是1444,我这直接回车了,没改。
Do you want to create base DNs in the server? (yes / no) [yes]: #8、是否创建基条目,默认yes,直接回车。
Provide the backend type:
1) JE Backend
2) PDB Backend
Enter choice [1]: # 9、后端类型,1.JE 2.PDB ,这个按官方文档,输入的是2;
Provide the base DN for the directory data: [dc=example,dc=com]: #10、提供目录数据的基本DN:[dc = example,dc = com] ,这个直接回车了。
Options for populating the database: #填充数据库的选项
1) Leave the database empty #仅创建基本条目
2) Only create the base entry #将数据库留空
3) Import data from an LDIF file #从LDIF文件导入数据
4) Load automatically-generated sample data #加载自动生成的样本数据
Enter choice [1]: 1 #11、这官方文档给的是3 ,不过我这没有模板数据,我就选1了。
Do you want to enable SSL? (yes / no) [no]: #12、您需要启用SSL 么? ,默认否,直接回车了。
Do you want to enable Start TLS? (yes / no) [no]: #13、是否启用TLS ,默认否,直接回车了。
Do you want to start the server when the configuration is completed? (yes /no) [yes]: #14、是否要在配置完成后启动服务器?默认是,也直接回车了。

Setup Summary #设置摘要

=============
LDAP Listener Port: 1389 #LDAP侦听器端口:1389
Administration Connector Port: 4444 #管理连接器端口:4444
JMX Listener Port: #JMX侦听器端口:
LDAP Secure Access: disabled #LDAP安全访问:已禁用
Root User DN: cn=Directory Manager #Root用户DN:cn =目录管理员
Directory Data: Backend Type: PDB Backend #目录数据:后端类型:PDB后端
Create New Base DN dc=example,dc=com #创建新的基本DN dc = example,dc = com
Base DN Data: Leave Database Empty #基本DN数据:将数据库保留为空
Start Server when the configuration is completed #配置完成后启动服务器
What would you like to do? #你想干什么?
1) Set up the server with the parameters above #使用上述参数设置服务器
2) Provide the setup parameters again #再次提供设置参数
3) Print equivalent non-interactive command-line #打印等效的非交互式命令行
4) Cancel and exit #取消并退出
Enter choice [1]: #15、Enter choice ,这个试试3就出现下边的命令,要正常运行输入1完成安装并启动。

=============

See /tmp/opendj-setup-2550310374472561261.log for a detailed log of this operation.# 查看日志:/tmp/opendj-setup-2550310374472561261.log
Configuring Directory Server … Done.#配置服务
Starting Directory Server … Done.#启动服务
To see basic server configuration status and configuration you can launch # 要查看可以启动的基本服务器配置状态和配置

/opt/svr/opendj/bin/status

/opt/svr/jdk/bin/java -Xms128m -Xmx256m -server -Dorg.opends.server.scriptName=start-ds org.opends.server.core.DirectoryServer --configClass org.opends.server.extensions.ConfigFileHandler --configFile /opt/svr/opendj/config/config.ldif --timeout 0

输入3 的打印。这个蛮好,可以直接一键搞定(密码还是要重新手工改下): 我这是: M999nb
下边是输入3的输出内容:
/opt/svr/opendj/setup
–cli
–backendType pdb
–baseDN dc=example,dc=com
–ldapPort 1389
–adminConnectorPort 4444
–rootUserDN cn=Directory\ Manager
–rootUserPassword ******
–no-prompt
–noPropertiesFile

直接一条命令安装:
/opt/svr/opendj/setup
–cli
–backendType pdb
–baseDN dc=example,dc=com
–ldapPort 1389
–adminConnectorPort 1444
–rootUserDN cn=Directory\ Manager
–rootUserPassword M999nb
–no-prompt
–noPropertiesFile

#安装
./setup
#配置,可以全部直接默认配置,然后再用这个进行配置
./bin/dsconfig
#停止命令
./bin/stop-ds
启动命令:
./bin/start-ds

2、集群安装

这个暂时还没学会,搞定再来补充了。

管理LDAP

管理LDAP工具用 Apache Directory Studio,官方地址如下:
下载地址:http://directory.apache.org/studio/download/download-windows.html
选对应系统的下载,安装直接各种下一步,安装好后打开,开源项目,无需注册。

  • 0
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 4
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值