首页 > 学院 > 操作系统 > 正文

httpd使用mod_authnz_ldap模块

2024-06-28 16:02:35
字体:
来源:转载
供稿:网友
系统版本:Red Hat EnterPRise linux Server release 7.2 (Maipo)apache版本:Server version: Apache/2.4.6 (CentOS)apache的ldap模块使用1. 安装mod_authnz_ldap模块百度了很久,都说是通过yum直接安装即可。但国内找了很久,均没有找到yum源。最终通过google找到了yum源仓库。https://rpmfind.net/linux/rpm2html/search.php?query=mod_authnz_ldap.so包名:apache-mod_authnz_ldap-2.4.2-0.1.i586.rpm2. 安装rpm包的过程中仍然存在许多问题[root@system2 tmp]# rpm -ivh apache-mod_authnz_ldap-2.4.2-0.1-mdv2012.0.i586.rpmwarning: apache-mod_authnz_ldap-2.4.2-0.1-mdv2012.0.i586.rpm: Header V3 DSA/SHA1 Signature, key ID 26752624: NOKEYerror: Failed dependencies:libc.so.6 is needed by apache-mod_authnz_ldap-2.4.2-0.1.i586libc.so.6(GLIBC_2.0) is needed by apache-mod_authnz_ldap-2.4.2-0.1.i586libc.so.6(GLIBC_2.1.3) is needed by apache-mod_authnz_ldap-2.4.2-0.1.i586libc.so.6(GLIBC_2.3) is needed by apache-mod_authnz_ldap-2.4.2-0.1.i586libc.so.6(GLIBC_2.4) is needed by apache-mod_authnz_ldap-2.4.2-0.1.i586libldap-2.4.so.2 is needed by apache-mod_authnz_ldap-2.4.2-0.1.i586libpthread.so.0 is needed by apache-mod_authnz_ldap-2.4.2-0.1.i5863. 查询文档后发现从Red Hat Enterprise Linux 6开始,默认只安装主架构所需要的包,而不安装兼容架构的包,也就是说,64位系统默认只安装64位的软件包。为避免这种问题,在64位系统中,要同时安装64位的包和32位的兼容包。[root@system2 tmp]# yum install glibc.i686......Installed: glibc.i686 0:2.17-157.el7_3.1Dependency Installed: nss-softokn-freebl.i686 0:3.16.2.3-14.4.el7Dependency Updated: nss-softokn-freebl.x86_64 0:3.16.2.3-14.4.el7Complete!4. 在此安装rpm包,验证结果,此时,只剩下libldap一个库文件未解决问题![root@system2 tmp]# rpm -ivh apache-mod_authnz_ldap-2.4.2-0.1-mdv2012.0.i586.rpmwarning: apache-mod_authnz_ldap-2.4.2-0.1-mdv2012.0.i586.rpm: Header V3 DSA/SHA1 Signature, key ID 26752624: NOKEYerror: Failed dependencies:libldap-2.4.so.2 is needed by apache-mod_authnz_ldap-2.4.2-0.1.i5865. 查阅文档发现libldap在centos7中的对应包名是openldap,依照上述方式再次安装[root@system2 tmp]# yum install openldap.i686Installed:openldap.i686 0:2.4.40-13.el7Dependency Installed:cyrus-sasl-lib.i686 0:2.1.26-20.el7_2 libdb.i686 0:5.3.21-19.el7libgcc.i686 0:4.8.5-11.el7 libstdc++.i686 0:4.8.5-11.el7ncurses-libs.i686 0:5.9-13.20130511.el7 nspr.i686 0:4.11.0-1.el7_2nss.i686 0:3.21.3-2.el7_3 nss-softokn.i686 0:3.16.2.3-14.4.el7nss-util.i686 0:3.21.3-1.1.el7_3 readline.i686 0:6.2-9.el7sqlite.i686 0:3.7.17-8.el7 zlib.i686 0:1.2.7-17.el7Dependency Updated:cpp.x86_64 0:4.8.5-11.el7 cyrus-sasl.x86_64 0:2.1.26-20.el7_2cyrus-sasl-devel.x86_64 0:2.1.26-20.el7_2 cyrus-sasl-lib.x86_64 0:2.1.26-20.el7_2 cyrus-sasl-md5.x86_64 0:2.1.26-20.el7_2 cyrus-sasl-plain.x86_64 0:2.1.26-20.el7_2cyrus-sasl-scram.x86_64 0:2.1.26-20.el7_2 gcc.x86_64 0:4.8.5-11.el7gcc-c++.x86_64 0:4.8.5-11.el7 gcc-gfortran.x86_64 0:4.8.5-11.el7 libgcc.x86_64 0:4.8.5-11.el7 libgfortran.x86_64 0:4.8.5-11.el7libgomp.x86_64 0:4.8.5-11.el7 libquadmath.x86_64 0:4.8.5-11.el7 libquadmath-devel.x86_64 0:4.8.5-11.el7 libstdc++.x86_64 0:4.8.5-11.el7 libstdc++-devel.x86_64 0:4.8.5-11.el7 nspr.x86_64 0:4.11.0-1.el7_2nss.x86_64 0:3.21.3-2.el7_3 nss-softokn.x86_64 0:3.16.2.3-14.4.el7nss-sysinit.x86_64 0:3.21.3-2.el7_3 nss-tools.x86_64 0:3.21.3-2.el7_3nss-util.x86_64 0:3.21.3-1.1.el7_3Complete!6. 在此尝试安装mod_authnz_ldap安装包,终于成功安装。[root@system2 tmp]# rpm -ivh apache-mod_authnz_ldap-2.4.2-0.1-mdv2012.0.i586.rpmwarning: apache-mod_authnz_ldap-2.4.2-0.1-mdv2012.0.i586.rpm: Header V3 DSA/SHA1 Signature, key ID 26752624: NOKEYPreparing... ################################# [100%]Updating / installing...1:apache-mod_authnz_ldap-2.4.2-0.1 ################################# [100%]7. 查看conf配置文件,模块位置信息[root@system2 apache]# cat /etc/httpd/modules.d/014_mod_authnz_ldap.confLoadModule authnz_ldap_module /usr/lib/apache/mod_authnz_ldap.so8. 将.so文件放到modules中,修改配置文件信息后,安装完成!
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表