- 浏览: 2243263 次
- 性别:
- 来自: 北京
文章分类
- 全部博客 (423)
- FileNet相关 (3)
- 应用服务器相关 (22)
- Java综合 (77)
- 持久层 (24)
- struts (11)
- webservice (8)
- 虚拟机 (2)
- 光盘刻录 (0)
- AD及AD集群 (1)
- JS (33)
- F5 (0)
- loadrunner8.1 (0)
- Java 反编译工具 (2)
- DataBase (62)
- ant (1)
- 操作系统 (29)
- 我的任务 (3)
- 平台架构 (16)
- 业务规则引擎 (2)
- 模板 (1)
- EJB (5)
- spring (24)
- CMMI (1)
- 项目管理 (20)
- LDAP (13)
- JMS (10)
- JSP (19)
- JBPM (2)
- web MVC框架设计思想 (2)
- 第三方支付平台 (2)
- BUG管理工具 (1)
- 垃圾站 (2)
- php (1)
- swing (1)
- 书籍 (1)
- QQ qq (2)
- 移动互联网 (26)
- 爱听的歌曲 (0)
- hadoop (4)
- 数据库 (9)
- 设计模式 (1)
- 面试经验只谈 (1)
- 大数据 (9)
- sp (1)
- 缓存数据库 (8)
- storm (2)
- taobao (2)
- 分布式,高并发,大型互联网,负载均衡 (6)
- Apache Ignite (0)
- Docker & K8S (0)
最新评论
-
wangyudong:
新版本 Wisdom RESTClienthttps://gi ...
spring rest mvc使用RestTemplate调用 -
wangyudong:
很多API doc生成工具生成API文档需要引入第三方依赖,重 ...
spring rest mvc使用RestTemplate调用 -
zhaoshijie:
cfying 写道大侠,还是加载了两次,怎么解决啊?求。QQ: ...
spring容器加载完毕做一件事情(利用ContextRefreshedEvent事件) -
xinglianxlxl:
对我有用,非常感谢
spring容器加载完毕做一件事情(利用ContextRefreshedEvent事件) -
k_caesar:
多谢,学习了
利用maven的resources、filter和profile实现不同环境使用不同配置文件
#安装zlib
# tar xvfz zlib-1.2.3.tar.gz
# cd zlib-1.2.3
# ./configure --shared
# make
# make install
----------------------------------------------------------
#升级安装Openssl 不要卸载系统自带的Openssl,否则很多服务都起不来.
# tar xzvf openssl-0.9.8k.tar.gz
# cd openssl-0.9.8k
# ./config shared #注意这里是用./config 会安装到/usr/local/ssl
# make
# make install
#配置库文件搜索路径
# echo "/usr/local/ssl/lib" >> /etc/ld.so.conf
# ldconfig -v
-------------------------------------------------------------------------------------------
#升级安装Openssh
# 首先卸载系统自带的Openssh
# rpm -e --nodeps openssh-3.9p1-8.RHEL4.24
# 升级openssh
# tar xzvf openssh-5.2p1.tar.gz
# rm -rf /etc/ssh/*
# cd openssh-5.2p1
# ./configure --prefix=/usr --sysconfdir=/etc/ssh --with-ssl-dir=/usr/local/ssl --with-zlib
# make
# make install
-------------------------------------------------------------------------------------------
#安装cyrus-sasl
# tar xzvf cyrus-sasl-2.1.23.tar.gz
# cd cyrus-sasl-2.1.23
# ./configure --prefix=/usr/local/sasl2 --enable-login --with-openssl=/usr/local/ssl
# make
# make install
#把原有的sasl库文件改名或删除,并将相关符号链接指向新安装SASL的库文件
# cd /usr/lib
# mv libsasl2.so.2.0.19 libsasl2.so.2.0.19.OFF
# mv libsasl2.so.2 libsasl2.so.2.OFF
# rm -rf /usr/lib/sasl2/*
# ln -s /usr/local/sasl2/lib/sasl2/* /usr/lib/sasl2/
# ln -s /usr/local/sasl2/lib/libsasl2.so.2.0.23 /usr/lib/libsasl2.so.2
# ln -s /usr/local/sasl2/lib/libsasl2.so /usr/lib/libsasl2.so
#配置库文件搜索路径
# echo "/usr/local/sasl2/lib" >> /etc/ld.so.conf
# echo "/usr/local/sasl2/lib/sasl2" >> /etc/ld.so.conf
# ldconfig -v
#创建运行时需要的目录并调试启动
# mkdir -pv /var/state/saslauthd
#启动并测试验正
# /usr/local/sasl2/sbin/saslauthd -a shadow
# /usr/local/sasl2/sbin/testsaslauthd -u root -p root的密码
0: OK "Success."
-----------------------------------------------------------------------
#安装BerkeleyDB 不建议安装Berkeley DB 4.7.25 经测试,会出现莫名其妙的错误
# tar xzvf db-4.6.21.tar.gz
# cd db-4.6.21/build_unix
# ../dist/configure --prefix=/data/BerkeleyDB --sysconfdir=/etc
# make
# make install
#配置库文件搜索路径
# echo "/data/BerkeleyDB/lib" >> /etc/ld.so.conf
# ldconfig -v
-----------------------------------------------------------------------
#安装openldap
# tar xzvf openldap-stable-20090411.tgz
# cd openldap-2.4.16
# env CPPFLAGS="-I/data/BerkeleyDB/include -I/usr/local/sasl2/include" LDFLAGS="-L/data/BerkeleyDB/lib -L/usr/local/sasl2/lib -L/usr/local/sasl2/lib/sasl2" ./configure --prefix=/usr/local/openldap --sysconfdir=/etc --enable-passwd --enable-wrappers --enable-spasswd --enable-crypt --enable-modules --enable-ldap --enable-accesslog
# make depend
# make
# make test #这一步时间会很长
# make install
# cp /usr/local/openldap/var/openldap-data/DB_CONFIG.example /usr/local/openldap/var/openldap-data/DB_CONFIG
#配置库文件搜索路径
# echo "/usr/local/openldap/lib" >> /etc/ld.so.conf
# ldconfig -v
# chmod 700 /usr/local/openldap/var/openldap-data
# mkdir -p /usr/local/openldap/var/accesslog
==============安装apache软件=============================================================
------------------------------------------------------------------------------------------
# tar zxvf httpd-2.2.11.tar.gz
# cd httpd-2.2.11
# ./configure --prefix=/data/apache --enable-mods-shared=all --enable-so
# make
# make install
# cp /data/apache/bin/apachectl /etc/init.d/httpd
# chmod +x /etc/init.d/httpd
# vi /etc/rc.d/rc.local
#在rc.local上加入一行/data/apache/bin/apachectl –k start 系统启动时自动启动Apache服务
------------------------------------------------------------------------------------------
# tar xzvf gettext-0.17.tar.gz
# cd gettext-0.17
# ./configure --prefix=/usr/local/gettex
# make
# make install
#配置库文件搜索路径
# echo "/usr/local/gettex/lib" >> /etc/ld.so.conf
# ldconfig -v
------------------------------------------------------------------------------------------
#安装PHP
# tar xzvf php-5.2.9.tar.gz
# cd php-5.2.9
# ./configure --prefix=/data/php5 --with-config-file-path=/etc --with-apxs2=/data/apache/bin/apxs --with-zlib --enable-xml --enable-mbstring --enable-sockets --with-openssl=/usr/local/ssl --with-ldap=/usr/local/openldap --with-gettext=/usr/local/gettex
# make
# make install
# cp php.ini-dist /etc/php.ini
# vi /data/apache/conf/httpd.conf
#查找AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
在其下加入
---------------------------------------------------
AddType application/x-tar .tgz
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
AddType image/x-icon .ico
---------------------------------------------------
改DirectoryIndex 行,添加index.php
修改为DirectoryIndex index.php index.html index.html.var
------------------------------------------------------------------------------------------
#安装PhpLDAPAdmin
# tar xzvf phpldapadmin-1.1.0.7.tar.gz -C /data/apache/htdocs/
# cd /data/apache/htdocs/phpldapadmin-1.1.0.7/config
# cp config.php.example config.php
# vi /data/apache/conf/httpd.conf
# 加入以下内容:
<VirtualHost *:8080>
ServerAdmin sunbin1984@gmail.com
DocumentRoot "/data/apache/htdocs/phpldapadmin-1.1.0.7"
</VirtualHost>
-------------------------------------------------------------------------------------------------------------------------------------------------
#从和主的ldap安装完全一样,只是配置文件略有不同 配置文件位于/etc/openldap/sldap.conf
#ldap配置文件见请分别参考sldap-master.conf和sldap-slave.conf
# 启动ldap
# /usr/local/openldap/libexec/slapd
# cd /usr/local/openldap/bin/
# 将如下内容保存为.ldif文件
# vi replicator.ldif
dn: cn=replicator,dc=mydomain,dc=com
objectClass: simpleSecurityObject
objectClass: organizationalRole
cn: replicator
description: LDAP replicator
userPassword: woaiwojia
#这里的replicator是用来同步主从之间数据的用户
#导入replicator用户到数据库
# /usr/local/openldap/bin/ldapadd -x -D 'cn=admin,dc=sun,dc=com' -W -f replicator.ldif
ldap客户端配置(有三种方法,这里采取最简单的一种)
# authconfig
#选择Use LDAP, Use MD5 Password, Use Shadow Password, Use LDAP Authenticatio, Local authorization is sufficien
#然后next,填入LDAP服务器的IP和Base DN
#修改/etc/pam.d/system-auth 插入如下代码
session required pam_mkhomedir.so skel=/etc/skel umask=0077
# 添加用户:直接打开IE输入:http://ip:8080 输入slapd.conf中预先定义的用户名和密码登陆
########################################---END---##################################################################
###################################################################################################################
#ldap查询命令
#/usr/local/openldap/bin/ldapsearch -x -b 'dc=sun,dc=com'
ldap的配置文件比较特别,和别的一般的包的名字,位置都不太一样。
我是这样理解,ldap有3个配置文件,他们各自有不同的用途。
/etc/openldap/slapd.conf 这是ldap的主要的配置文件
ldap还有另外两个配置文件,名字都是 ldap.conf ,比较容易搞错。
/etc/ldap.conf :是用来作为 LDAP's Name Service Switch (NSS) interfaces,
/etc/openldap/ldap.conf :specifies defaults for various LDAP client programs
#限制用户登录
# vi /etc/ldap.conf
过滤一个用户
pam_filter gidNumber=1000
过滤多个用户
pam_filter |(gidNumber=10)(gidNumber=501)(gidNumber=500)
注:这里过滤的组是允许登录的组
-----------------------------------------------------
ldap客户机,需要将 “ldap” 添加到 /etc/nsswitch.conf
----------------------
passwd: files ldap
shadow: files ldap
group: files ldap
---------------------
本人测试结果:
file 在前 ldap在后就是 ldap失败的时候可以通过本地系统的用户登陆,相反file在后,ldap在前,就是ldap失败的话本地也无法登陆.
# tar xvfz zlib-1.2.3.tar.gz
# cd zlib-1.2.3
# ./configure --shared
# make
# make install
----------------------------------------------------------
#升级安装Openssl 不要卸载系统自带的Openssl,否则很多服务都起不来.
# tar xzvf openssl-0.9.8k.tar.gz
# cd openssl-0.9.8k
# ./config shared #注意这里是用./config 会安装到/usr/local/ssl
# make
# make install
#配置库文件搜索路径
# echo "/usr/local/ssl/lib" >> /etc/ld.so.conf
# ldconfig -v
-------------------------------------------------------------------------------------------
#升级安装Openssh
# 首先卸载系统自带的Openssh
# rpm -e --nodeps openssh-3.9p1-8.RHEL4.24
# 升级openssh
# tar xzvf openssh-5.2p1.tar.gz
# rm -rf /etc/ssh/*
# cd openssh-5.2p1
# ./configure --prefix=/usr --sysconfdir=/etc/ssh --with-ssl-dir=/usr/local/ssl --with-zlib
# make
# make install
-------------------------------------------------------------------------------------------
#安装cyrus-sasl
# tar xzvf cyrus-sasl-2.1.23.tar.gz
# cd cyrus-sasl-2.1.23
# ./configure --prefix=/usr/local/sasl2 --enable-login --with-openssl=/usr/local/ssl
# make
# make install
#把原有的sasl库文件改名或删除,并将相关符号链接指向新安装SASL的库文件
# cd /usr/lib
# mv libsasl2.so.2.0.19 libsasl2.so.2.0.19.OFF
# mv libsasl2.so.2 libsasl2.so.2.OFF
# rm -rf /usr/lib/sasl2/*
# ln -s /usr/local/sasl2/lib/sasl2/* /usr/lib/sasl2/
# ln -s /usr/local/sasl2/lib/libsasl2.so.2.0.23 /usr/lib/libsasl2.so.2
# ln -s /usr/local/sasl2/lib/libsasl2.so /usr/lib/libsasl2.so
#配置库文件搜索路径
# echo "/usr/local/sasl2/lib" >> /etc/ld.so.conf
# echo "/usr/local/sasl2/lib/sasl2" >> /etc/ld.so.conf
# ldconfig -v
#创建运行时需要的目录并调试启动
# mkdir -pv /var/state/saslauthd
#启动并测试验正
# /usr/local/sasl2/sbin/saslauthd -a shadow
# /usr/local/sasl2/sbin/testsaslauthd -u root -p root的密码
0: OK "Success."
-----------------------------------------------------------------------
#安装BerkeleyDB 不建议安装Berkeley DB 4.7.25 经测试,会出现莫名其妙的错误
# tar xzvf db-4.6.21.tar.gz
# cd db-4.6.21/build_unix
# ../dist/configure --prefix=/data/BerkeleyDB --sysconfdir=/etc
# make
# make install
#配置库文件搜索路径
# echo "/data/BerkeleyDB/lib" >> /etc/ld.so.conf
# ldconfig -v
-----------------------------------------------------------------------
#安装openldap
# tar xzvf openldap-stable-20090411.tgz
# cd openldap-2.4.16
# env CPPFLAGS="-I/data/BerkeleyDB/include -I/usr/local/sasl2/include" LDFLAGS="-L/data/BerkeleyDB/lib -L/usr/local/sasl2/lib -L/usr/local/sasl2/lib/sasl2" ./configure --prefix=/usr/local/openldap --sysconfdir=/etc --enable-passwd --enable-wrappers --enable-spasswd --enable-crypt --enable-modules --enable-ldap --enable-accesslog
# make depend
# make
# make test #这一步时间会很长
# make install
# cp /usr/local/openldap/var/openldap-data/DB_CONFIG.example /usr/local/openldap/var/openldap-data/DB_CONFIG
#配置库文件搜索路径
# echo "/usr/local/openldap/lib" >> /etc/ld.so.conf
# ldconfig -v
# chmod 700 /usr/local/openldap/var/openldap-data
# mkdir -p /usr/local/openldap/var/accesslog
==============安装apache软件=============================================================
------------------------------------------------------------------------------------------
# tar zxvf httpd-2.2.11.tar.gz
# cd httpd-2.2.11
# ./configure --prefix=/data/apache --enable-mods-shared=all --enable-so
# make
# make install
# cp /data/apache/bin/apachectl /etc/init.d/httpd
# chmod +x /etc/init.d/httpd
# vi /etc/rc.d/rc.local
#在rc.local上加入一行/data/apache/bin/apachectl –k start 系统启动时自动启动Apache服务
------------------------------------------------------------------------------------------
# tar xzvf gettext-0.17.tar.gz
# cd gettext-0.17
# ./configure --prefix=/usr/local/gettex
# make
# make install
#配置库文件搜索路径
# echo "/usr/local/gettex/lib" >> /etc/ld.so.conf
# ldconfig -v
------------------------------------------------------------------------------------------
#安装PHP
# tar xzvf php-5.2.9.tar.gz
# cd php-5.2.9
# ./configure --prefix=/data/php5 --with-config-file-path=/etc --with-apxs2=/data/apache/bin/apxs --with-zlib --enable-xml --enable-mbstring --enable-sockets --with-openssl=/usr/local/ssl --with-ldap=/usr/local/openldap --with-gettext=/usr/local/gettex
# make
# make install
# cp php.ini-dist /etc/php.ini
# vi /data/apache/conf/httpd.conf
#查找AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
在其下加入
---------------------------------------------------
AddType application/x-tar .tgz
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
AddType image/x-icon .ico
---------------------------------------------------
改DirectoryIndex 行,添加index.php
修改为DirectoryIndex index.php index.html index.html.var
------------------------------------------------------------------------------------------
#安装PhpLDAPAdmin
# tar xzvf phpldapadmin-1.1.0.7.tar.gz -C /data/apache/htdocs/
# cd /data/apache/htdocs/phpldapadmin-1.1.0.7/config
# cp config.php.example config.php
# vi /data/apache/conf/httpd.conf
# 加入以下内容:
<VirtualHost *:8080>
ServerAdmin sunbin1984@gmail.com
DocumentRoot "/data/apache/htdocs/phpldapadmin-1.1.0.7"
</VirtualHost>
-------------------------------------------------------------------------------------------------------------------------------------------------
#从和主的ldap安装完全一样,只是配置文件略有不同 配置文件位于/etc/openldap/sldap.conf
#ldap配置文件见请分别参考sldap-master.conf和sldap-slave.conf
# 启动ldap
# /usr/local/openldap/libexec/slapd
# cd /usr/local/openldap/bin/
# 将如下内容保存为.ldif文件
# vi replicator.ldif
dn: cn=replicator,dc=mydomain,dc=com
objectClass: simpleSecurityObject
objectClass: organizationalRole
cn: replicator
description: LDAP replicator
userPassword: woaiwojia
#这里的replicator是用来同步主从之间数据的用户
#导入replicator用户到数据库
# /usr/local/openldap/bin/ldapadd -x -D 'cn=admin,dc=sun,dc=com' -W -f replicator.ldif
ldap客户端配置(有三种方法,这里采取最简单的一种)
# authconfig
#选择Use LDAP, Use MD5 Password, Use Shadow Password, Use LDAP Authenticatio, Local authorization is sufficien
#然后next,填入LDAP服务器的IP和Base DN
#修改/etc/pam.d/system-auth 插入如下代码
session required pam_mkhomedir.so skel=/etc/skel umask=0077
# 添加用户:直接打开IE输入:http://ip:8080 输入slapd.conf中预先定义的用户名和密码登陆
########################################---END---##################################################################
###################################################################################################################
#ldap查询命令
#/usr/local/openldap/bin/ldapsearch -x -b 'dc=sun,dc=com'
ldap的配置文件比较特别,和别的一般的包的名字,位置都不太一样。
我是这样理解,ldap有3个配置文件,他们各自有不同的用途。
/etc/openldap/slapd.conf 这是ldap的主要的配置文件
ldap还有另外两个配置文件,名字都是 ldap.conf ,比较容易搞错。
/etc/ldap.conf :是用来作为 LDAP's Name Service Switch (NSS) interfaces,
/etc/openldap/ldap.conf :specifies defaults for various LDAP client programs
#限制用户登录
# vi /etc/ldap.conf
过滤一个用户
pam_filter gidNumber=1000
过滤多个用户
pam_filter |(gidNumber=10)(gidNumber=501)(gidNumber=500)
注:这里过滤的组是允许登录的组
-----------------------------------------------------
ldap客户机,需要将 “ldap” 添加到 /etc/nsswitch.conf
----------------------
passwd: files ldap
shadow: files ldap
group: files ldap
---------------------
本人测试结果:
file 在前 ldap在后就是 ldap失败的时候可以通过本地系统的用户登陆,相反file在后,ldap在前,就是ldap失败的话本地也无法登陆.
发表评论
-
AD新增用户默认禁用的解决办法
2013-02-21 16:56 2541ajax文件上传 博客http://aokunsang.ite ... -
LDAP成功配置一个集团组织机构案例(继续更新及深层研究中...)
2010-12-11 21:07 2730...LDAP成功配置案例(继续更新及深层研究) 正在进行 ... -
OpenLDAP 综合技术相关网站
2010-12-10 19:49 1328OpenLDAP下载 ( openldap-2.2.29 fo ... -
LDAP快速入门
2010-12-01 15:11 11731. LDAP简介 LDAP(轻 ... -
OpenLDAP讲解
2010-12-01 14:46 4407OpenLDAP是LDAP的一种开源实现 Table of ... -
解析LDAP的Schema(v3)
2010-12-01 13:59 26982. Abstract This documen ... -
LDAP之objectClass
2010-12-01 13:46 2417自定义schema的时候不仅要定义attributetype还 ... -
自定义OpenLDAP的schema
2010-12-01 13:44 2396自定义schema的时候要注意定义的名字不能和已有的名字重复, ... -
LDAP基本语法
2010-11-26 20:54 1734基本 LDAP 语法 • =(等 ... -
OpenLDAP+LdapBrowser配置
2010-11-22 09:44 14360相关软件下载: Berkeley-Db: http://dow ... -
LDAP
2010-11-07 12:52 906附件是LDAP相关jar包!!! -
Ldap安装配置
2010-10-22 21:49 2339linux下: 安装openldap ...
相关推荐
OpenLDAP安装配置文档 配置OpenLDAP服务器 关闭防火墙或清空防火墙规则 一、 安装 二、 配置 三、 迁移密码和shadow信息 配置OpenLDAP客户端 OpenLDAP客户端sudo提权设定
linux 下openldap 安装说明文档 linux 下openldap 安装说明文档
主讲OpenLdap安装及配置,OpenLdap是配置ldap的服务器。
openldap在windows安装配置.pdf
Linux下OpenLDAP安装手册
包括 BerkeleyDB-4.7.25.tar.gz cyrus-sasl-2.1.22.tar.gz openldap-2.3.31.tgz 三个软件
这是CentOS6.2下openldap安装配置详细文档
LINUX+APACHE+PHP+BDB+OPENLDAP+PHPLDAPADMIN安装配置包和步骤 2 要下全啊,太大了,分了123。
OpenLDAP安装与配置(ubuntu-12.04).docx
在CentOS8类似系统中,通过YUM方式安装OpenLDAP2.4。
db-4.7.25.tar.gz freetype-2.3.5.tar.gz ft254.zip gd-2.0.35.tar.gz gettext-0.16.1.tar.gz httpd-2.4.10.tar.gz jpegsrc.v6b.tar.gz ...包含上述安装包,都是源码包,通过编译安装,在CentOs5.0下运行通过
OpenLdap搭建配置日志索引,自己开发过程中踩的坑记录下来的。包好使。
openldap_linux openldap
LDAP是一种非关系型数据库,支持读取数据的速度远胜于老牌的mysql
centos环境 openldap环境搭建与配置
LINUX+APACHE+PHP+BDB+OPENLDAP+PHPLDAPADMIN安装配置包和步骤1 太大了,分了123,这是1
windows下OpenLdap安装及使用
本文档是参考了官网文档及网上多篇openldap安装及主从部署文档,详细描述了部署过程
openldap 资料大全,安装配置等等