########################################
########################################
相关软件下载
openldap下载
http://www.openldap.org/software/download/
参考资料
https://www.cnblogs.com/littlehb/p/7883302.html
下载地址:
ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/openldap-2.4.48.tgz
berkeley-db下载
https://download.oracle.com/berkeley-db/db-5.1.29.tar.gz
ldap admin下载
http://www.ldapbrowser.com/download.htm
下载地址:
https://downloads.softerra.com/ldapadmin/ldapadmin-4.17.20304.0-x64-eng.msi
##############################
tar -zxvf db-5.1.29.tar.gz
cd build_unix/
…/dist/configure --prefix=/usr/local/berkeleydb-5.1.29
make
make install
ls /usr/local/berkeleydb-5.1.29/
echo “/usr/local/berkeleydb-5.1.29/lib/” > /etc/ld.so.conf
ldconfig -v
##############################
##############################
tar -zxvf openldap-2.4.48.tgz
cd openldap-2.4.48
./configure --prefix=/usr/local/openldap-2.4.48 --enable-syslog --enable-modules --enable-debug --with-tls CPPFLAGS=-I/usr/local/berkeleydb-5.1.29/include/ LDFLAGS=-L/usr/local/berkeleydb-5.1.29/lib/
make depend
make
make install
cd /usr/local/openldap-2.4.48
ln -s /usr/local/openldap-2.4.48/bin/* /usr/local/bin/
ln -s /usr/local/openldap-2.4.48/sbin/* /usr/local/sbin/
slappasswd
cd etc/openldap/
cp slapd.conf slapd.conf.bak.20190731
vi slapd.conf
include /usr/local/openldap-2.4.48/etc/openldap/schema/collective.schema
include /usr/local/openldap-2.4.48/etc/openldap/schema/corba.schema
include /usr/local/openldap-2.4.48/etc/openldap/schema/cosine.schema
include /usr/local/openldap-2.4.48/etc/openldap/schema/duaconf.schema
include /usr/local/openldap-2.4.48/etc/openldap/schema/dyngroup.schema
include /usr/local/openldap-2.4.48/etc/openldap/schema/inetorgperson.schema
include /usr/local/openldap-2.4.48/etc/openldap/schema/java.schema
include /usr/local/openldap-2.4.48/etc/openldap/schema/misc.schema
include /usr/local/openldap-2.4.48/etc/openldap/schema/nis.schema
include /usr/local/openldap-2.4.48/etc/openldap/schema/openldap.schema
include /usr/local/openldap-2.4.48/etc/openldap/schema/pmi.schema
include /usr/local/openldap-2.4.48/etc/openldap/schema/ppolicy.schema
suffix “dc=sysadmin,dc=com”
rootdn “cn=admin,dc=sysadmin,dc=com”
rootpw {SSHA}sNz4cLinT82kLGIWInVOVZ85NHfTnA8H
loglevel 256
logfile /usr/local/openldap-2.4.48/var/slapd.log
cd …/var/openldap-data/
cp DB_CONFIG.example DB_CONFIG
/usr/local/openldap-2.4.48/libexec/slapd
ps -ef | grep openldap
sudo netstat -anp | grep 389
/usr/local/openldap-2.4.48/libexec/slapd -d 256
vi sysadmin.ldif
dn: dc=sysadmin,dc=com
objectclass: dcObject
objectclass: organization
o: SYS.Inc
dc: sysadmin
dn: cn=admin,dc=sysadmin,dc=com
objectclass: organizationalRole
cn: admin
ldapadd -x -D “cn=admin,dc=sysadmin,dc=com” -W -f sysadmin.ldif
vi bigdata.ldif
dn: ou=bigdata, dc=sysadmin,dc=com
changetype: add
objectclass: top
objectclass: organizationalUnit
ou: bigdata
dn: cn=troll,ou=bigdata,dc=sysadmin,dc=com
changetype: add
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
cn: troll
sn: troll
ou: bigdata
description: sb, sx
description: sx
uid: troll
ldapmodify -xWD ‘cn=admin,dc=sysadmin,dc=com’ -f bigdata.ldif
##############################
https://www.linuxidc.com/Linux/2017-10/147559.htm
tips:部署日志和相关安装包分享
链接:https://pan.baidu.com/s/15KOK28qu5l3znQpcJj1utQ
提取码:yo5d