LinuxにOpenLDAPをインストールする方法

仕事でLDAPを使用する必要があったためOpenLDAPを導入してみました。

目次

インストール環境

今回のインストール環境は以下になります。

  • CentOS:CentOS Linux release 7.0.1406 (Core)
  • OpenLDAP:openldap-2.4.44-5.el7.x86_64
  • OpenLDAP Servers:openldap-servers-2.4.44-5.el7.x86_64
  • OpenLDAP Clients:openldap-clients-2.4.44-5.el7.x86_64

OpenLDAPを使用するには、「OpenLDAP」、「OpenLDAP Servers」、「OpenLDAP Clients」と三つが必要になります。

OpenLDAP

OpenLDAP本体には、OpenLDAPライブラリやドキュメント類が含まれています。

OpenLDAPだけですとLDAP開発はできますが、LDAPサービスを提供することが出来ません。

OpenLDAP Servers

OpenLDAP Serversには、sldapd serverとそれらを起動するための関連ファイルが含まれています。

実際にLDAPサービスを提供するためにOpenLDAP Serversがプロセスを起動しています。

OpenLDAP Clients

OpenLDAP Clientsには、LDAPサービスに接続するためのクライアントプログラムとOpenLDAPの設定ツールが含まれています。

OpenLDAPと通信するためにはOpenLDAP Clientsが必要になります。

インストール手順

今回はyumを使用してOpenLDAPをインストールします。

yum install openldap
yum install openldap-servers
yum install openldap-clients

↓が実行ログになります。

[root@centos7-local ~]# yum install openldap
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: ftp.tsukuba.wide.ad.jp
* extras: ftp.tsukuba.wide.ad.jp
* updates: ftp.tsukuba.wide.ad.jp
Resolving Dependencies
--> Running transaction check
---> Package openldap.x86_64 0:2.4.39-3.el7 will be updated
---> Package openldap.x86_64 0:2.4.44-5.el7 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

==============================================================================================================
Package Arch Version Repository Size
==============================================================================================================
Updating:
openldap x86_64 2.4.44-5.el7 base 354 k

Transaction Summary
==============================================================================================================
Upgrade 1 Package

Total download size: 354 k
Is this ok [y/d/N]: y
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
openldap-2.4.44-5.el7.x86_64.rpm | 354 kB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Updating : openldap-2.4.44-5.el7.x86_64 1/2
Cleanup : openldap-2.4.39-3.el7.x86_64 2/2
Verifying : openldap-2.4.44-5.el7.x86_64 1/2
Verifying : openldap-2.4.39-3.el7.x86_64 2/2

Updated:
openldap.x86_64 0:2.4.44-5.el7

Complete!
[root@centos7-local ~]#
[root@centos7-local ~]# yum install openldap-servers
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: ftp.tsukuba.wide.ad.jp
* extras: ftp.tsukuba.wide.ad.jp
* updates: ftp.tsukuba.wide.ad.jp
Resolving Dependencies
--> Running transaction check
---> Package openldap-servers.x86_64 0:2.4.44-5.el7 will be installed
--> Processing Dependency: libltdl.so.7()(64bit) for package: openldap-servers-2.4.44-5.el7.x86_64
--> Running transaction check
---> Package libtool-ltdl.x86_64 0:2.4.2-22.el7_3 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==============================================================================================================
Package Arch Version Repository Size
==============================================================================================================
Installing:
openldap-servers x86_64 2.4.44-5.el7 base 2.2 M
Installing for dependencies:
libtool-ltdl x86_64 2.4.2-22.el7_3 base 49 k

Transaction Summary
==============================================================================================================
Install 1 Package (+1 Dependent package)

Total download size: 2.2 M
Installed size: 5.1 M
Is this ok [y/d/N]: y
Downloading packages:
(1/2): libtool-ltdl-2.4.2-22.el7_3.x86_64.rpm | 49 kB 00:00:00
(2/2): openldap-servers-2.4.44-5.el7.x86_64.rpm | 2.2 MB 00:00:00
--------------------------------------------------------------------------------------------------------------
Total 2.8 MB/s | 2.2 MB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : libtool-ltdl-2.4.2-22.el7_3.x86_64 1/2
Installing : openldap-servers-2.4.44-5.el7.x86_64 2/2
Verifying : openldap-servers-2.4.44-5.el7.x86_64 1/2
Verifying : libtool-ltdl-2.4.2-22.el7_3.x86_64 2/2

Installed:
openldap-servers.x86_64 0:2.4.44-5.el7

Dependency Installed:
libtool-ltdl.x86_64 0:2.4.2-22.el7_3

Complete!
[root@centos7-local ~]#
[root@centos7-local ~]# yum install openldap-clients
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: ftp.tsukuba.wide.ad.jp
* extras: ftp.tsukuba.wide.ad.jp
* updates: ftp.tsukuba.wide.ad.jp
Resolving Dependencies
--> Running transaction check
---> Package openldap-clients.x86_64 0:2.4.44-5.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==============================================================================================================
Package Arch Version Repository Size
==============================================================================================================
Installing:
openldap-clients x86_64 2.4.44-5.el7 base 188 k

Transaction Summary
==============================================================================================================
Install 1 Package

Total download size: 188 k
Installed size: 570 k
Is this ok [y/d/N]: y
Downloading packages:
openldap-clients-2.4.44-5.el7.x86_64.rpm | 188 kB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : openldap-clients-2.4.44-5.el7.x86_64 1/1
Verifying : openldap-clients-2.4.44-5.el7.x86_64 1/1

Installed:
openldap-clients.x86_64 0:2.4.44-5.el7

Complete!
[root@centos7-local ~]#

入門LDAP/OpenLDAPディレクトリサービス導入・運用ガイド 第3版posted with ヨメレバ

デージーネット 秀和システム 2017年11月10日

Amazon

Kindle

楽天ブックス

7net

honto

e-hon

紀伊國屋書店

  • システム開発、アプリ開発
  • マッチングアプリ開発
  • インフラ構築支援等、なんでもご相談ください。
よかったらシェアしてね!
  • URLをコピーしました!
目次