CentOS 6.2目录服务之LDAP(二)

简介:
LDAP Account Manager(LAM)采 用PHP4/5编写,是基于Web的LDAP用户、用户组、主机和LDAP目录的管理系统,管理员可以通过加密的方式进行操作,增强了安全性。LAM支持 管理的帐号类型有Samba2/3、Unix地址簿接口和计算机需要的信息,包括NIS映射、E-mail假名,MAC地址等。
 
LDAP Account Manager强大功能
1、使用LAM,可以通过Web接口较为直观的、简便的管理存储在LDAP目录里的用户、用户组和计算机系统账户。
2、管理Unix的用户、用户组、主机、域名。
3、强大的过滤和排序功能。
4、帐号属性管理。
5、多构造属性。
6、直观树状查看模式。
7、计划查看模式。
8、通过文件上传创建帐号。
9、所有帐号可导出为PDF文件格式。
10、管理用户、用户组、配额和自动创建删除用户的Home目录。
11、支持LDAP+SSL加密模式。
12、多国语言支持,如Catalan、Chinese(Traditional)等。
 
安装需求
1、PHP5语言环境和Perl语言环境。
2、OpenLDAP2.0或更高版本。
3、支持CSS的网页浏览器。
4、Apache WebServer,建议安装SSL、PHP-Module(PHP-Module with ldap、Gettext、XML、Mcrypt+mhash)等模块。
安装Openssl
[root@chenyi ldmp]# tar zxf openssl-1.0.0e.tar.gz 
[root@chenyi ldmp]# cd openssl-1.0.0e
[root@chenyi openssl-1.0.0e]# ./config --prefix=/software/ssl --openssldir=/software/openssl shared
[root@chenyi openssl-1.0.0e]# make && make test &&make install
安装apr
[root@chenyi ldmp]# tar zxf apr-1.4.5.tar.gz 
[root@chenyi ldmp]# cd apr-1.4.5
[root@chenyi apr-1.4.5]# ./configure --prefix=/software/apr
[root@chenyi apr-1.4.5]# make && make install
安装apr-util
[root@chenyi apr-util-1.3.12]# tar zxf apr-util-1.3.12.tar.gz
[root@chenyi apr-util-1.3.12]# cd apr-util-1.3.12
[root@chenyi apr-util-1.3.12]#  ./configure --prefix=/software/apr-util --with-apr=/software/apr/ --with-ldap-include=/software/openldap/include/ --with-ldap-lib=/software/openldap/lib/ --with-berkeley-db=/software/BerkeleyDB.5.2/ [root@chenyi apr-util-1.3.12]# make && make install
安装Apache [这里我多次尝试使用2.2.29版进行编译,但终遇到各种挫折,由于没有得到完善的解决,所以选用了2.2.21,根据你的需要,可酌情删减编译参数]
[root@chenyi httpd-2.2.21]# tar zxf httpd-2.2.21.tar.gz
[root@chenyi httpd-2.2.21]# cd httpd-2.2.21
[root@chenyi httpd-2.2.21]# ./configure --prefix=/software/apache2 --sysconfdir=/etc/httpd --enable-ssl --with-ssl=/software/openssl/ --with-z=/software/zlib/ --enable-rewrite=shared --enable-static-support --enable-deflate=shared --enable-so --enable-dav --enable-dav-fs --enable-ldap --enable-authnz-ldap --with-included-apr --with-ldap --with-ldap-include=/software/openldap/include/ --with-ldap-lib=/software/openldap/lib --with-apr=/software/apr/bin/apr-1-config --with-apr-util=/software/apr-util/bin/apu-1-config
[root@chenyi httpd-2.2.21]# make && make install
安装gettext
[root@chenyi ldmp]# tar zxf gettext-0.17.tar.gz 
[root@chenyi ldmp]# cd gettext-0.17
[root@chenyi gettext-0.17]# ./configure --prefix=/software/gettext
[root@chenyi gettext-0.17]# make && make install
加入配置库搜索路径
[root@chenyi gettext-0.17]# echo "/software/gettext/lib/" >> /etc/ld.so.conf && ldconfig -v
[root@chenyi gettext-0.17]# rpm -qa | grep zlib-devel 	检测zlib-devel 如果没安装则yum
zlib-devel-1.2.3-27.el6.i686
添加PHP支持
[root@chenyi ldmp]# tar zxf php-5.2.6.tar.gz 
[root@chenyi ldmp]# cd php-5.2.6
[root@chenyi php-5.2.6]#  ./configure --prefix=/software/php --enable-zip --with-config-file-path=/software/php/etc --with-apxs2=/software/apache2/bin/apxs --with-libxml-dir=/software/libxml2 --with-png-dir=/software/libpng --with-jpeg-dir=/software/jpeg6 --with-freetype-dir=/software/freetype/ --with-gd=/software/gd2/ --with-ldap=/software/openldap/ --with-gettext=/software/gettext/ --with-zlib-dir=/software/zlib/ --with-mcrypt=/software/libmcrypt --enable-soap --enable-mbstring=all--enable-sockets
[root@chenyi php-5.2.6]# make && make install
创建php配置文件
[root@chenyi php-5.2.6]# cp php.ini-dist /software/php/etc/php.ini		#创建配置文件
[root@chenyi php-5.2.6]# vi /etc/httpd/httpd.conf			#修改ServerName 添加相关配置
LoadModule php5_module modules/libphp5.so			#查看是否有这一行
AddType application/x-httpd-php .php .php4 .php5 .php .phtml		#查看是否有这一行,(表示以这些扩展名结尾的文件,在apache中使用php解析器解析)。
接着重启apache服务器,创建一个php文件访问则可以看到结果了!这里也没什么必要演示了
下载LAM压缩包,然后解压后修改php.ini,内容如下
[root@chenyi ldmp]# tar zxf ldap-account-manager-3.7.RC1.tar.gz
[root@chenyi ldmp]# mv ldap-account-manager-3.7.RC1 /software/apache2/htdocs/lam
[root@chenyi config]# pwd		#进入config目录,创建配置文件
/software/apache2/htdocs/lam/config
[root@chenyi config]# cp config.cfg_sample config.cfg
[root@chenyi ~]# /software/openldap/sbin/slappasswd -s itchenyi	#使用slappasswd生成密码
{SSHA}WakGiZTwkh5e2MD8vgy9AUf9h18l6YlG
新建ldif文件           注:ldif文件中,每一行中冒号后有一个空格,行尾一定不能有空格(同时也可以通过migrationtools这个组件来建立ldif文件)
dn: dc=itchenyi, dc=com
objectClass: dcObject
objectClass: organization
o: itchenyi Inc
dc: itchenyi
dn: cn=Manager, dc=itchenyi, dc=com
objectCalss: organizationalRole
cn: Manager
dn: ou=group, dc=itchenyi, dc=com
objectClass: top
objectClass: organizationalUnit
ou: group
dn: ou=it, dc=itchenyi, dc=com
objectClass: top
objectClass: organizationalUnit
ou: it
复制模版文件(如果没有,你在通过-d 256 调试时可以看到显著的错误)
[root@chenyi config]# cp /software/openldap/etc/openldap/DB_CONFIG.example /software/openldap/var/openldap-data/DB_CONFIG
关闭slapd进程,导入ldif文件
[root@chenyi config]# kill -INT `cat /software/openldap/var/run/slapd.pid`
[root@chenyi config]# /software/openldap/sbin/slapadd -v -l ./itchenyi.ldif
几个常用选项:
1: -v选项表示启用verbose模式,即输出执行中的具体信息。
2: -l表示后面附加ldif文件。
3:-d  指定debug向日志文件输出信息,后面跟日志级别。
4: -f  指定要读取的配置文件。
启动服务进程
[root@chenyi config]# /software/openldap/libexec/slapd -d 256
 
通过 http://ip/lam 进行访问
创建配置文件可以通过默认密码lam 进行编辑创建
LDAP access Manager









本文转自 lgpqdwjh 51CTO博客,原文链接:http://blog.51cto.com/itchenyi/1189008,如需转载请自行联系原作者
目录
相关文章
|
2月前
|
Java Linux Shell
linux自动部署jar包,注册系统服务(基于Centos7)
linux自动部署jar包,注册系统服务(基于Centos7)
87 0
|
4月前
|
网络协议 Linux Shell
CentOS 7系统下DHCP及中继服务部署
设备 IP地址 主DNS服务器 192.168.100.254 从DNS服务器 192.168.100.1 客户端 192.168.200.2 一、DHCP服务器的部署
118 0
|
6月前
|
JSON Linux 数据格式
百度搜索:蓝易云【Centos 7 通过 targz 文件安装 Elastic Search 服务教程!】
请注意,本教程提供了基本的安装步骤,并且可以根据实际需求进行定制和配置。如果需要更深入的了解和配置,请参考Elasticsearch官方文档或其他权威资源。
283 0
|
6月前
|
安全 Linux 网络安全
Centos 6.8下修改SSH服务默认端口,看这一篇就够了
Centos 6.8下修改SSH服务默认端口,看这一篇就够了
125 0
|
2月前
|
Java Shell Linux
解决 centos下执行sh文件报错“/bin/bash^M: 坏的解释器:没有那个文件或目录” 问题
解决 centos下执行sh文件报错“/bin/bash^M: 坏的解释器:没有那个文件或目录” 问题
|
4月前
|
Kubernetes Ubuntu 安全
Linux|科普扫盲帖|配置网络软件源---阿里云镜像仓库服务使用(centos,Ubuntu)
Linux|科普扫盲帖|配置网络软件源---阿里云镜像仓库服务使用(centos,Ubuntu)
552 0
|
1天前
|
运维 网络协议 Linux
【运维系列】Centos7安装并配置PXE服务
PXE是Intel开发的预启动执行环境,允许工作站通过网络从远程服务器启动操作系统。它依赖DHCP分配IP,DNS服务分配主机名,TFTP提供引导程序,HTTP/FTP/NFS提供安装源。要部署PXE服务器,需关闭selinux和防火墙,安装dhcpd、httpd、tftp、xinetd及相关服务,配置引导文件和Centos7安装源。最后,通过syslinux安装引导文件,并创建pxelinux.cfg/default配置文件来定义启动参数。
5 0
|
1天前
|
运维 网络协议 Linux
【运维系列】Centos7安装并配置postfix服务
安装CentOS7的Postfix和Dovecot,配置Postfix的`main.cf`文件,包括修改完全域名、允许所有IP、启用邮箱等。然后,配置Dovecot的多个配置文件以启用auth服务和调整相关设置。重启Postfix和Dovecot,设置开机自启,并关闭防火墙进行测试。最后,创建邮箱账户并在Windows邮箱客户端中添加账户设置。
9 0
|
1天前
|
Linux 网络安全
Centos6.5安装并配置NFS服务
该内容描述了在Linux系统中设置NFS服务的步骤。首先挂载yum源,然后安装NFS服务,并编辑配置文件。接着,重启rpcbind和NFS服务,可能需要重复此过程以解决初始可能出现的问题。此外,关闭防火墙策略,并再次重启服务。最终,根目录被共享,特定IP网段被允许访问。
8 0
|
4月前
|
Linux
centos之--目录权限配置
CentOS中,可以使用chmod命令来设置文件夹的权限
171 0