Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

Installation method of openldap-2.4.44

Shulou Source: shulou.com Published: 2022-06-02 07:24:06 11月14日 Update

This article introduces the relevant knowledge of "the installation method of openldap-2.4.44". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

First, install base-repo

# # install the corresponding base reporpm-Uvh http://mirror.centos.org/centos/7/os/x86_64/Packages/centos-release-7-6.1810.2.el7.centos.x86_64.rpmls-l / etc/yum.repo/total 44murr Murray according to your own OS version. 1 root root 1664 Nov 23 2018 CentOS-Base.repo-rw-r--r--. 1 root root 1309 Nov 23 2018 CentOS-CR.repo-rw-r--r--. 1 root root 649 Nov 23 2018 CentOS-Debuginfo.repo-rw-r--r--. 1 root root 314 Nov 23 2018 CentOS-fasttrack.repo-rw-r--r--. 1 root root 630 Nov 23 2018 CentOS-Media.repo-rw-r--r--. 1 root root 1331 Nov 23 2018 CentOS-Sources.repo-rw-r--r--. 1 root root 5701 Nov 23 2018 CentOS-Vault.repo-rw-r--r--. 1 root root 951 Oct 2 2017 epel.repo-rw-r--r--. 1 root root 1050 Oct 2 2017 epel-testing.repo-rw-r--r--. 1 root root 2003 Jul 8 07:44 READMEyum install epel-release*

Second, install openldap-server/devel/clients

Yum install-y openldap-servers openldap-clients openldap-develrpm-qa | grep openldap*openldap-servers-sql-2.4.44-21.el7_6.x86_64openldap-2.4.44-21.el7_6.x86_64openldap-clients-2.4.44-21.el7_6.x86_64openldap-devel-2.4.44-21.el7_6.x86_64openldap-servers-2.4.44-21.el7_6.x86_64

3. Configure openldap-server

Configure slappasswd

Slappasswd-s 123456 {SSHA} NRWg5Ig47XVGHZq0eX/ayx8NSCSbiIw8

Modify basedn

Vi / etc/openldap/slapd.d/cn\ = config/olcDatabase\ = hdb.ldif...olcSuffix: dc=harry,dc=comolcRootDN: cn=Manager,dc=harry,dc=comolcRootPW: {SSHA} NRWg5Ig47XVGHZq0eX/ayx8NSCSbiIw8...vi / etc/openldap/slapd.d/cn\ = config/olcDatabase\ =\ {1\} monitor.ldif...olcAccess: {0} to * by dn.base= "gidNumber=0+uidNumber=0,cn=peercred,cn=extern al,cn=auth" read by dn.base= "cn=Manager,dc=harry,dc=com" read by * none...

Configure SSL

Cd / etc/openldap/certs/rm-rf / etc/openldap/certs/*openssl genrsa-out cert.key 1024openssl req-new-key cert.key-out cert.csropenssl x509-req-days 3650-in cert.csr-signkey cert.key-out cert.crtvi SLAPD_URLS= "ldapi:/// ldap:///"... olcTLSCACertificatePath: / etc/openldap/certsolcTLSCertificateFile: / etc/openldap/certs/cert.crtolcTLSCertificateKeyFile: / etc/openldap/certs/cert.key...cp / usr/share / openldap-servers/DB_CONFIG.example / var/lib/ldap/DB_CONFIGchown ldap:ldap-R / etc/openldap### vi / etc/sysconfig/slapd...SLAPD_URLS= "ldapi:/// ldap:/// ldaps:///"...

Enable memberof

Vi add_module_group.ldif...dn: cn=module,cn=configcn: moduleobjectClass: olcModuleListobjectClass: topolcModuleLoad: memberof.laolcModulePath: / usr/lib64/openldap...vi add_module_group-2.ldif...dn: olcOverlay= {0} memberof,olcDatabase= {2} hdb,cn=configobjectClass: olcConfigobjectClass: olcMemberOfobjectClass: olcOverlayConfigobjectClass: topolcOverlay: memberofolcMemberOfDangling: ignoreolcMemberOfRefInt: TRUEolcMemberOfGroupOC: groupOfUniqueNamesolcMemberOfMemberAD: uniqueMemberolcMemberOfMemberOfAD: memberOf...vi add-refin1.ldif...dn: cn=module {0}, cn=configadd: olcmoduleloadolcmoduleload: refint...vi add-refin2.ldif...dn: olcOverlay=refint,olcDatabase= {2} hdb Cn=configobjectClass: olcConfigobjectClass: olcOverlayConfigobjectClass: olcRefintConfigobjectClass: topolcOverlay: refintolcRefintAttribute: memberof uniqueMember manager owner...

Detect the configuration and start

Slaptest-uservice slapd restartnetstat-tunpl | grep 389netstat-tunpl | grep 636

Fourth, install phpldapadmin

Yum install phpldapadmin*

Configure phpldapadmin

Vi / etc/httpd/conf.d/phpldapadmin.conf... # Apache 2.4 # Require local Require all granted... vi / etc/phpldapadmin/config.php...#$servers- > setValue ('login','attr','uid'); $servers- > setValue (' server','host','127.0.0.1'); $servers- > setValue ('server','port',389); $servers- > setValue (' server','base',array ('dc=harry,dc=com')); $servers- > setValue (' login','auth_type','session') $servers- > setValue ('login','bind_id','cn=Manager,dc=harry,dc=com'); $servers- > setValue (' login','bind_pass','123456');

Add base.ldif

# This base cannot be created with PLA.vi base.ldifdn: dc=harry,dc=como: ldapobjectclass: dcObjectobjectclass: organizationldapadd-f base.ldif-x-D 'cn=Manager,dc=harry,dc=com'-W

Add memberof

1New Group of UniqueNamesldap-ou.png0cnGeneric: Group of UniqueNames1 GroupOf UniqueNames1 1 "how to install openldap-2.4.44" ends here. Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Tags: Configuration method content more knowledge practicality achievement next dilemma reality situation article case version editing website industry process high quality learning Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology Shulou Information Linux Docker Xiaomi