[861] | 1 | To set up a new LDAP server: |
---|
| 2 | |
---|
| 3 | - Install the RPM fedora-ds-base with yum |
---|
| 4 | - root# env NSS_NONLOCAL_IGNORE=1 useradd -r -d /var/lib/dirsrv fedora-ds |
---|
| 5 | - root# /usr/sbin/setup-ds.pl |
---|
| 6 | - Choose a typical install |
---|
| 7 | - Tell it to use the fedora-ds user and group |
---|
| 8 | - Directory server identifier: scripts |
---|
| 9 | - Suffix: dc=scripts,dc=mit,dc=edu |
---|
| 10 | - Input directory manager password |
---|
| 11 | - yum install ldapvi |
---|
| 12 | - /sbin/service dirsrv start |
---|
| 13 | - Apply ./fedora-ds-enable-ssl-and-kerberos.diff manually |
---|
| 14 | - /sbin/service dirsrv stop |
---|
[880] | 15 | - Add the scripts schemas to /var/lib/dirsrv/slapd-scripts |
---|
[861] | 16 | - wget http://web.mit.edu/geofft/Public/scripts-ca.pem |
---|
| 17 | - certutil -d /etc/dirsrv/slapd-scripts -A -n "scripts.mit.edu CA" -t CT,, -a -i scripts-ca.pem |
---|
[862] | 18 | - Generate a pkcs12 cert for the server: |
---|
[861] | 19 | - pk12util -i ldap-server-cert.p12 -d /etc/dirsrv/slapd-scripts |
---|
| 20 | - Put LDAP keytab in /etc/dirsrv/keytab |
---|
| 21 | - Uncomment and modify in /etc/syscnfig/dirsrv: KRB5_KTNAME=/etc/dirsrv/keytab ; export KRB5_KTNAME |
---|
| 22 | - mkdir -p /var/tmp/dirsrv |
---|
| 23 | - chown fedora-ds:fedora-ds /var/tmp/dirsrv |
---|
[951] | 24 | - chmod 755 /var/run/dirsrv |
---|
[861] | 25 | - /sbin/service dirsrv restart |
---|
[880] | 26 | - Use ldapvi -b cn=config to add these indexes: |
---|
[861] | 27 | |
---|
[880] | 28 | add cn=apacheServerName, cn=index, cn=userRoot, cn=ldbm database, cn=plugins, cn=config |
---|
| 29 | objectClass: top |
---|
| 30 | objectClass: nsIndex |
---|
| 31 | cn: apacheServerName |
---|
| 32 | nsSystemIndex: false |
---|
| 33 | nsIndexType: eq |
---|
| 34 | nsIndexType: pres |
---|
| 35 | |
---|
| 36 | add cn=apacheServerAlias, cn=index, cn=userRoot, cn=ldbm database, cn=plugins, cn=config |
---|
| 37 | objectClass: top |
---|
| 38 | objectClass: nsIndex |
---|
| 39 | cn: apacheServerAlias |
---|
| 40 | nsSystemIndex: false |
---|
| 41 | nsIndexType: eq |
---|
| 42 | nsIndexType: pres |
---|
| 43 | |
---|
| 44 | - Build the indexes with: |
---|
| 45 | - /usr/lib64/dirsrv/slapd-scripts/db2index.pl -D "cn=Directory Manager" -j /etc/signup-ldap-pw -n userRoot -t apacheServerName |
---|
| 46 | - Watch the progress with: ldapsearch -x -y /etc/signup-ldap-pw -D 'cn=Directory Manager' -b cn=tasks,cn=config |
---|
| 47 | - Wait for it to finish before: |
---|
| 48 | - /usr/lib64/dirsrv/slapd-scripts/db2index.pl -D "cn=Directory Manager" -j /etc/signup-ldap-pw -n userRoot -t apacheServerAlias |
---|
| 49 | |
---|
[862] | 50 | - Set up replication: |
---|
| 51 | (basically, execute |
---|
| 52 | http://directory.fedoraproject.org/sources/contrib/mmr.pl |
---|
[951] | 53 | manually) |
---|