1. 环境要求
u Linux系统:
u Ldap版本:DSEE.7.0.Linux-X86-64-zip.tar.gz
u JVM版本:jdk-1_5_0_22-linux-amd64-rpm.bin
u 额外所需jar包:jsse.jar(放到jdk安装路径下的jar目录下)
u Web服务器:resin-3.1.9.tar.gz
2. 安装步骤
2.1 概要步骤
1) 环境准备
2) 安装JVM
3) 安装Web服务
4) 安装ldap
5) 创建suffix
6) 初始化属性及对象
7) 设置开机自启动
3. 具体安装过程
3.1 环境准备
Ø 在/usr/local/目录下建立文件夹ldap,把所有需要的软件放到此处,利用“chmod 777 *”命令修改权限 。
Ø 用于初始化的ldif文件
ctcSuffix.ldif、hqSuffix.ldif、usersSuffix.ldif、organizationsSuffix.ldif、99user.ldif
1.1 安装JVM
1. 进入/usr/local/ldap目录
2. 安装
./jdk-1_5_0_19-linux-i586-rpm.bin
执行过程中需要选择
y
jdk的环境变量配置
进入目录
vi /etc/profile
添加如下信息到末尾
export JAVA_HOME=/usr/java/jdk1.5.0_22
export CLASSPATH=.:$JAVA_HOME/lib:$JAVA_HOME/jre/lib
export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH
重新启动linux。
1.2 安装Web服务器
安装步骤:
进入/usr/local/ldap目录
解压缩
tar zxvf resin-3.1.9.tar.gz
进入解压缩目录
cd resin-3.1.9
配置安装路径及其相关参数
./configure --prefix=/usr/local/resin --with-java-home=/usr/java/jdk1.5.0_22 --enable-linux-smp --enable-64bit
编译
make
安装
make install
启动resin(启动到后台):
/usr/local/resin/bin/nohup ./httpd.sh &
1.3 安装LDAP
安装步骤:
进入/usr/local/ldap目录
1. 解压:
# mkdir -p install-path
# gunzip DSEE.7.0.Linux-X86-64-zip.tar.gz
# tar xf DSEE.7.0.Linux-X86-64-zip.tar
# unzip -qq ./DSEE_ZIP_Distribution/sun-dsee7.zip -d install-path
2. Create theWAR file for DSCC.
$ install-path/bin/dsccsetup war-file-create
Created dscc-war-file-path
Make a note of the dscc-war-file-path, which is the path of the DSCC war file.
3. Initialize the DSCC registry.
$ install-path/bin/dsccsetup ads-create
Choose password for Directory Service Manager:secret12
Confirm password for Directory Service Manager: secret12
3. Note the port and the path assigned to DSCC registry.
# install-path/bin/dsccsetup status
...
Path of DSCC registry is dscc-registry-path
Port of DSCC registry is dscc-registry-port
...
The dscc-registry-port is the port assigned to the DSCC registry by dsccsetup ads-create. The
default port that is assigned to the DSCC registry is 3998.
4.把/usr/local/ldap/install-path/dsee7/var下的dscc7.war放到resin的webapps下
5. Register the DSCC agent in CommonAgent Container.
$install-path/bin/dsccsetup cacao-reg
Configuring Cacao...
Cacao will listen on port dscc-agent-port
The dscc-agent-port specifies the port of the DSCC agent.
6.Create a new Directory Server instance.
$ dsadm create -p 1389 -P 1636 /usr/local/ldap/install-path/dsee7/dsInst
Choose the Directory Manager password:secret12
Confirm the Directory Manager password:secret12
Use ’dsadm start /usr/local/ldap/install-path/dsee7/dsInst’ to start the instance
The dsInst instance is created under the existing directory, /usr/local/ldap/install-path/dsee7 and secret12 is assigned
as the DirectoryManager password.
7.Start the instance.
$ dsadm start /usr/local/ldap/install-path/dsee7/dsInst
Server started: pid=2845
1.1 创建suffix
安装步骤:
进入/usr/local/ldap/install-path/dsee7/bin目录
准备工作:在/usr/local/ldap/install-path/dsee7目录下建立ldif目录,把事先准备好的所有ldif文件放到此处。
一、
1.Create an empty suffix.
$ dsconf create-suffix -p 1389 -e dc=ctc,dc=com
Enter "cn=Directory Manager" password:secret12
A suffix with root dc=ctc,dc=com is created.
2.Populate the suffix with LDIF data.
$ dsconf import -p 1389 -e\
/usr/local/ldap/install-path/dsee7/ldif/ctcSuffix.ldif dc=ctc,dc=com
Enter "cn=Directory Manager" password:secret12
3. Register the server instance with DSCC:
$ dsccreg add-server -h localhost -p 3998 \
/usr/local/ldap/install-path/dsee7/dsInst
中间输入y.
4.List the server that are currently registered into DSCC
# dsccreg list-servers -h localhost -p 3998
Enter DSCC administrator’s password: secret
Hostname Port sPort Type Owner Flags iPath Description
-------------- -------- ----- ---- ----- ----- ---------- -----------
current-host 1389 1636 DS uid /usr/local/ldap/install-path/dsee7/dsInst
二、创建subSuffix
1.dc=hq,dc=ctc,dc=com
$./dsconf create-suffix -h localhost -p 1389 dc=hq,dc=ctc,dc=com
$./dsconf set-suffix-prop -h localhost -p 1389 dc=hq,dc=ctc,dc=com \
parent-suffix-dn:dc=ctc,dc=com
$ ./dsconf import -p 1389 -e\
/usr/local/ldap/install-path/dsee7/ldif/hqSuffix.ldif\ dc=hq,dc=ctc,dc=com
重启实例:
$./dsadm restart /usr/local/ldap/install-path/dsee7/dsInst
2. ou=organizations,dc=hq,dc=ctc,dc=com
$./dsconf create-suffix -h localhost -p 1389 ou=organizations,dc=hq,dc=ctc,dc=com
$./dsconf set-suffix-prop -h localhost -p 1389 ou=organizations,dc=hq,dc=ctc,dc=com \
parent-suffix-dn:dc=hq,dc=ctc,dc=com
$ ./dsconf import -p 1389 -e\
/usr/local/ldap/install-path/dsee7/ldif/organizationsSuffix.ldif\ ou=organizations,dc=hq,dc=ctc,dc=com
重启实例:
$./dsadm restart /usr/local/ldap/install-path/dsee7/dsInst
3. cn=users,dc=hq,dc=ctc,dc=com
$./dsconf create-suffix -h localhost -p 1389 cn=users,dc=hq,dc=ctc,dc=com
$./dsconf set-suffix-prop -h localhost -p 1389 cn=users,dc=hq,dc=ctc,dc=com \
parent-suffix-dn:dc=hq,dc=ctc,dc=com
$./dsconf import -p 1389 -e\
/usr/local/ldap/install-path/dsee7/ldif/usersSuffix.ldif\ cn=users,dc=hq,dc=ctc,dc=com
1.2 初始化属性及对象
1、shema内容覆盖:把/usr/local/ldap/install-path/dsee7/ldif下的99user.ldif内容覆盖
/usr/local/ldap/install-path/dsee7/dsInst/config/schema/99user.ldif
2、重新启动dsInst实例对象:
$/usr/local/ldap/install-path/dsee7/bin/dsadm stop /usr/local/ldap/install-path/dsee7/dsInst
$/usr/local/ldap/install-path/dsee7/bin/dsadm start /usr/local/ldap/install-path/dsee7/dsInst
或
$/usr/local/ldap/install-path/dsee7/bin/dsadm\ restart/usr/local/ldap/install-path/dsee7/dsInst
1.3 设置开机自启动
Ø 设置LDAP相关启动,向/etc/rc.local文件中加入以下内容:
cd /usr/local/ldap/install-path/dsee7/ext/cacao_2/cacao/bin
./cacaoadm start
cd /usr/local/ldap/install-path/dsee7/bin
./dsadm start /usr/local/ldap/install-path/dsee7/var/dcc/ads
cd /usr/local/ldap/install-path/dsee7/bin
./dsadm start /usr/local/ldap/install-path/dsee7/dsInst
Ø 设置resin开机启动
把/usr/local/ldap/resin-3.1.9/contrib/init.resin文件放到/etc/rc.d/init.d 下,并改名为resin,chmod 777 *;
更改RESIN_HOME为:RESIN_HOME=/usr/local/resin
然后执行以下命令:
# /sbin/chkconfig resin reset
u Linux系统:
u Ldap版本:DSEE.7.0.Linux-X86-64-zip.tar.gz
u JVM版本:jdk-1_5_0_22-linux-amd64-rpm.bin
u 额外所需jar包:jsse.jar(放到jdk安装路径下的jar目录下)
u Web服务器:resin-3.1.9.tar.gz
2. 安装步骤
2.1 概要步骤
1) 环境准备
2) 安装JVM
3) 安装Web服务
4) 安装ldap
5) 创建suffix
6) 初始化属性及对象
7) 设置开机自启动
3. 具体安装过程
3.1 环境准备
Ø 在/usr/local/目录下建立文件夹ldap,把所有需要的软件放到此处,利用“chmod 777 *”命令修改权限 。
Ø 用于初始化的ldif文件
ctcSuffix.ldif、hqSuffix.ldif、usersSuffix.ldif、organizationsSuffix.ldif、99user.ldif
1.1 安装JVM
1. 进入/usr/local/ldap目录
2. 安装
./jdk-1_5_0_19-linux-i586-rpm.bin
执行过程中需要选择
y
jdk的环境变量配置
进入目录
vi /etc/profile
添加如下信息到末尾
export JAVA_HOME=/usr/java/jdk1.5.0_22
export CLASSPATH=.:$JAVA_HOME/lib:$JAVA_HOME/jre/lib
export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH
重新启动linux。
1.2 安装Web服务器
安装步骤:
进入/usr/local/ldap目录
解压缩
tar zxvf resin-3.1.9.tar.gz
进入解压缩目录
cd resin-3.1.9
配置安装路径及其相关参数
./configure --prefix=/usr/local/resin --with-java-home=/usr/java/jdk1.5.0_22 --enable-linux-smp --enable-64bit
编译
make
安装
make install
启动resin(启动到后台):
/usr/local/resin/bin/nohup ./httpd.sh &
1.3 安装LDAP
安装步骤:
进入/usr/local/ldap目录
1. 解压:
# mkdir -p install-path
# gunzip DSEE.7.0.Linux-X86-64-zip.tar.gz
# tar xf DSEE.7.0.Linux-X86-64-zip.tar
# unzip -qq ./DSEE_ZIP_Distribution/sun-dsee7.zip -d install-path
2. Create theWAR file for DSCC.
$ install-path/bin/dsccsetup war-file-create
Created dscc-war-file-path
Make a note of the dscc-war-file-path, which is the path of the DSCC war file.
3. Initialize the DSCC registry.
$ install-path/bin/dsccsetup ads-create
Choose password for Directory Service Manager:secret12
Confirm password for Directory Service Manager: secret12
3. Note the port and the path assigned to DSCC registry.
# install-path/bin/dsccsetup status
...
Path of DSCC registry is dscc-registry-path
Port of DSCC registry is dscc-registry-port
...
The dscc-registry-port is the port assigned to the DSCC registry by dsccsetup ads-create. The
default port that is assigned to the DSCC registry is 3998.
4.把/usr/local/ldap/install-path/dsee7/var下的dscc7.war放到resin的webapps下
5. Register the DSCC agent in CommonAgent Container.
$install-path/bin/dsccsetup cacao-reg
Configuring Cacao...
Cacao will listen on port dscc-agent-port
The dscc-agent-port specifies the port of the DSCC agent.
6.Create a new Directory Server instance.
$ dsadm create -p 1389 -P 1636 /usr/local/ldap/install-path/dsee7/dsInst
Choose the Directory Manager password:secret12
Confirm the Directory Manager password:secret12
Use ’dsadm start /usr/local/ldap/install-path/dsee7/dsInst’ to start the instance
The dsInst instance is created under the existing directory, /usr/local/ldap/install-path/dsee7 and secret12 is assigned
as the DirectoryManager password.
7.Start the instance.
$ dsadm start /usr/local/ldap/install-path/dsee7/dsInst
Server started: pid=2845
1.1 创建suffix
安装步骤:
进入/usr/local/ldap/install-path/dsee7/bin目录
准备工作:在/usr/local/ldap/install-path/dsee7目录下建立ldif目录,把事先准备好的所有ldif文件放到此处。
一、
1.Create an empty suffix.
$ dsconf create-suffix -p 1389 -e dc=ctc,dc=com
Enter "cn=Directory Manager" password:secret12
A suffix with root dc=ctc,dc=com is created.
2.Populate the suffix with LDIF data.
$ dsconf import -p 1389 -e\
/usr/local/ldap/install-path/dsee7/ldif/ctcSuffix.ldif dc=ctc,dc=com
Enter "cn=Directory Manager" password:secret12
3. Register the server instance with DSCC:
$ dsccreg add-server -h localhost -p 3998 \
/usr/local/ldap/install-path/dsee7/dsInst
中间输入y.
4.List the server that are currently registered into DSCC
# dsccreg list-servers -h localhost -p 3998
Enter DSCC administrator’s password: secret
Hostname Port sPort Type Owner Flags iPath Description
-------------- -------- ----- ---- ----- ----- ---------- -----------
current-host 1389 1636 DS uid /usr/local/ldap/install-path/dsee7/dsInst
二、创建subSuffix
1.dc=hq,dc=ctc,dc=com
$./dsconf create-suffix -h localhost -p 1389 dc=hq,dc=ctc,dc=com
$./dsconf set-suffix-prop -h localhost -p 1389 dc=hq,dc=ctc,dc=com \
parent-suffix-dn:dc=ctc,dc=com
$ ./dsconf import -p 1389 -e\
/usr/local/ldap/install-path/dsee7/ldif/hqSuffix.ldif\ dc=hq,dc=ctc,dc=com
重启实例:
$./dsadm restart /usr/local/ldap/install-path/dsee7/dsInst
2. ou=organizations,dc=hq,dc=ctc,dc=com
$./dsconf create-suffix -h localhost -p 1389 ou=organizations,dc=hq,dc=ctc,dc=com
$./dsconf set-suffix-prop -h localhost -p 1389 ou=organizations,dc=hq,dc=ctc,dc=com \
parent-suffix-dn:dc=hq,dc=ctc,dc=com
$ ./dsconf import -p 1389 -e\
/usr/local/ldap/install-path/dsee7/ldif/organizationsSuffix.ldif\ ou=organizations,dc=hq,dc=ctc,dc=com
重启实例:
$./dsadm restart /usr/local/ldap/install-path/dsee7/dsInst
3. cn=users,dc=hq,dc=ctc,dc=com
$./dsconf create-suffix -h localhost -p 1389 cn=users,dc=hq,dc=ctc,dc=com
$./dsconf set-suffix-prop -h localhost -p 1389 cn=users,dc=hq,dc=ctc,dc=com \
parent-suffix-dn:dc=hq,dc=ctc,dc=com
$./dsconf import -p 1389 -e\
/usr/local/ldap/install-path/dsee7/ldif/usersSuffix.ldif\ cn=users,dc=hq,dc=ctc,dc=com
1.2 初始化属性及对象
1、shema内容覆盖:把/usr/local/ldap/install-path/dsee7/ldif下的99user.ldif内容覆盖
/usr/local/ldap/install-path/dsee7/dsInst/config/schema/99user.ldif
2、重新启动dsInst实例对象:
$/usr/local/ldap/install-path/dsee7/bin/dsadm stop /usr/local/ldap/install-path/dsee7/dsInst
$/usr/local/ldap/install-path/dsee7/bin/dsadm start /usr/local/ldap/install-path/dsee7/dsInst
或
$/usr/local/ldap/install-path/dsee7/bin/dsadm\ restart/usr/local/ldap/install-path/dsee7/dsInst
1.3 设置开机自启动
Ø 设置LDAP相关启动,向/etc/rc.local文件中加入以下内容:
cd /usr/local/ldap/install-path/dsee7/ext/cacao_2/cacao/bin
./cacaoadm start
cd /usr/local/ldap/install-path/dsee7/bin
./dsadm start /usr/local/ldap/install-path/dsee7/var/dcc/ads
cd /usr/local/ldap/install-path/dsee7/bin
./dsadm start /usr/local/ldap/install-path/dsee7/dsInst
Ø 设置resin开机启动
把/usr/local/ldap/resin-3.1.9/contrib/init.resin文件放到/etc/rc.d/init.d 下,并改名为resin,chmod 777 *;
更改RESIN_HOME为:RESIN_HOME=/usr/local/resin
然后执行以下命令:
# /sbin/chkconfig resin reset