A instalação tem de ser realizada com o utilizador root.
1. Descarregar os seguintes pacotes
Localização dos pacotes: http://www.sunfreeware.com/indexsparc10.html
Localização dos pacotes: http://www.sunfreeware.com/indexsparc10.html
- openldap-2.4.26
- openssl-1.0.0e
- db-4.7.25.NC
- gcc-3.4.6
- libgcc-3.4.6
- sasl-2.1.25
- libiconv-1.14
- libtool-2.4
2. Instalar os pacotes
- gunzip gcc-3.4.6-sol10-sparc-local.gz
- gunzip libgcc-3.4.6-sol10-sparc-local.gz
- gunzip sasl-2.1.25-sol10-sparc-local.gz
- gunzip libiconv-1.14-sol10-sparc-local.gz
- gunzip libtool-2.4-sol10-sparc-local.gz
- gunzip db-4.7.25.NC-sol10-sparc-local.gz
- gunzip openssl-1.0.0e-sol10-sparc-local.gz
- gunzip openldap-2.4.26-sol10-sparc-local.gz
- pkgadd -d gcc-3.4.6-sol10-sparc-local
- pkgadd -d libgcc-3.4.6-sol10-sparc-local
- pkgadd -d sasl-2.1.25-sol10-sparc-local
- pkgadd -d libiconv-1.14-sol10-sparc-local
- pkgadd -d libtool-2.4-sol10-sparc-local
- pkgadd -d openssl-1.0.0e-sol10-sparc-local
- pkgadd -d db-4.7.25.NC-sol10-sparc-local
- pkgadd -d openldap-2.4.26-sol10-sparc-local
2.1
crle -c /var/ld/ld.conf -l /lib:/usr/lib -s /lib/secure:/usr/lib/secure:/usr/lib/mps:/usr/lib/mps64
3. Preparação do ambiente
export LD_NOVERSION=yes
export PATH=$PATH:/usr/local/sbin
4. Criação do grupo e utilizador LDAP
groupadd –g 55 ldap
useradd -u 55 -g 55 -d /export/home/ldap -s /bin/false ldap
mkdir /export/home/ldap
chown -R ldap:ldap /export/home/ldap/
4.1 Adicionar ldap ao grupo deamon
vi /etc/group
daemon::12:root,ldap
groupadd –g 55 ldap
useradd -u 55 -g 55 -d /export/home/ldap -s /bin/false ldap
mkdir /export/home/ldap
chown -R ldap:ldap /export/home/ldap/
4.1 Adicionar ldap ao grupo deamon
vi /etc/group
daemon::12:root,ldap
5. Preparação da pasta do OpenLDAP
mkdir –p /usr/local/var/openldap-data
chmod 700 /usr/local/var/openldap-data
chown –R ldap:daemon /usr/local/var/openldap-data
chown –R ldap:daemon /usr/local/etc/openldap
chown -R root:daemon /usr/local/var/run/
chmod -R 775 /usr/local/var/run/
6. Configuração
6.1 Editar o ficheiro slapd.conf
6.1.1 Adicionar
include /usr/local/etc/openldap/schema/cosine.schema
include /usr/local/etc/openldap/schema/inetorgperson.schema
6.1.2 Alterar
suffix "dc=pt2,dc=pt"
rootdn "cn=Manager,dc=pt2,dc=pt"
rootpw passwordDoManager
6.1.3 Adicionar
# Indices to maintain
index default pres,eq
index objectClass eq
index uid,cn,sn
6.2
cd /usr/local/etc/openldap/
cp /usr/local/etc/openldap/DB_CONFIG.example /usr/local/var/openldap-data/DB_CONFIG
7. Iniciar o OpenLDAP
cd /usr/local/libexec/
./slapd
Caso seja necessário efectuar debug para resolver eventuais problemas no arranque:
./slapd -d 100
8. Verificar se está funcional
ldapsearch -x -b '' -s base '(objectclass=*)' namingContexts
9. Criar a raíz
9.1) base.ldif
dn: dc=pt2,dc=pt
dc: pt2
objectClass: domain
9.2) ldapadd -D "cn=Manager,dc=pt2,dc=pt" -w password -f base.ldif
Referência
http://oskb.wordpress.com/2009/02/23/install%C2%A0and%C2%A0configure%C2%A0openldap%C2%A0server%C2%A0solaris10/
8. Verificar se está funcional
ldapsearch -x -b '' -s base '(objectclass=*)' namingContexts
9. Criar a raíz
9.1) base.ldif
dn: dc=pt2,dc=pt
dc: pt2
objectClass: domain
9.2) ldapadd -D "cn=Manager,dc=pt2,dc=pt" -w password -f base.ldif
Referência
http://oskb.wordpress.com/2009/02/23/install%C2%A0and%C2%A0configure%C2%A0openldap%C2%A0server%C2%A0solaris10/
Sem comentários:
Enviar um comentário