Opendj

Installation

The comunity version is a bit more ancient of enterprise.
I have installed in a server so I can't use the graphical interfaces and I use the control panel in my laptop

community version

download the lastes zip from http://forgerock.org/opendj-archive.html unpack on /opt
install java oracle follow this indication http://gborgese.wikidot.com/java-ubuntu
put this

default.java-home=/usr/lib/jvm/java-7-oracle/jre

in the file /opt/OpenDJ-2.5.0-Xpress1/config# nano java.properties
and execute
/opt/OpenDJ-2.5.0-Xpress1# ./setup

the only "difficult question was this"
Provide the base DN for the directory data: dc=example,dc=com
after the configuration can be done by controll panel

you can choose to generate example data or not, I suggest to enable the ssl options are port plus to open in the firewall .

control panel

unpack the same version on your server machine, run from bin/control-panel and use remote server port 4444

Start/Stop

cd /opt/OpenDJ-2.5.0-Xpress1/bin
./start-ds
#or
./stop-ds

Backup

source http://opendj.forgerock.org/opendj-server/doc/admin-guide/index/chap-backup-restore.html
you can backup hot and cold solution. You can backup db structure and all solution
I have try the hot with all solution

rm -rf /root/temp-backup/*
/opt/OpenDJ-2.5.0-Xpress1/bin/backup --port 4444 --bindDN "cn=Directory Manager" --bindPassword clear-secret-password --backUpAll --backupDirectory /root/temp-backup --start 0
DATUM=`date +%F.%A`
tar jcvf /var/s3/backup/opendj.$DATUM.tbz /root/temp-backup/*
find /var/s3/backup/* -mtime +60 -exec rm {} \;

after this I syncronize with amazon s3

Restore

In the guide there are two way

  • Procedure 11.3. To Restore a Stand-alone Server
  • Procedure 11.4. To Restore a Replica

I have try only the first , I don't understand what the second configuration do
From the backup you obtain a directory like this

ls opendj-backup/
schema  tasks  userRoot

in every directory there is the same backup.info file
first of all you must find the backup id with this command
/opt/OpenDJ-2.5.0-Xpress1/bin# ./restore --backupDirectory /home/ubuntu/opendj-backup/schema --listBackups
Backup ID:          20140130161824Z
Backup Date:        30/Jan/2014:16:18:24 +0000
Is Incremental:     false
Is Compressed:      false
Is Encrypted:       false
Has Unsigned Hash:  false
Has Signed Hash:    false
Dependent Upon:     none

after you can do two kind of restore with the server on (hot restore) or off (cold restore)

cold restore

I have try only this but downstairs I put either the syntax of the other

/opt/OpenDJ-2.5.0-Xpress1/bin# ./restore --backupDirectory /home/ubuntu/opendj-backup/userRoot --backupID 20140130161824Z
[30/Jan/2014:17:09:55 +0000] category=JEB severity=NOTICE msgID=8847445 msg=Restored: 00000000.jdb (size 6201302)
root@ip-10-104-7-47:/opt/OpenDJ-2.5.0-Xpress1/bin# ./st
start-ds  status    stop-ds   
root@ip-10-104-7-47:/opt/OpenDJ-2.5.0-Xpress1/bin# ./start-ds 
[30/Jan/2014:17:10:24 +0000] category=EXTENSIONS severity=NOTICE msgID=1507899 msg=Loaded extension from file '/opt/OpenDJ-2.5.0-Xpress1/lib/extensions/snmp-mib2605.jar' (build 2.5.0-Xpress1, revision 8087)
[30/Jan/2014:17:10:24 +0000] category=CORE severity=NOTICE msgID=458886 msg=OpenDJ 2.5.0-Xpress1 (build 20120719090339Z, R8087) starting up
[30/Jan/2014:17:10:32 +0000] category=RUNTIME_INFORMATION severity=NOTICE msgID=20381717 msg=Installation Directory:  /opt/OpenDJ-2.5.0-Xpress1
[30/Jan/2014:17:10:32 +0000] category=RUNTIME_INFORMATION severity=NOTICE msgID=20381719 msg=Instance Directory:      /opt/OpenDJ-2.5.0-Xpress1

hot restore

I have not try but probably work, you need the password and the connection on the controll port

/opt/OpenDJ-2.5.0-Xpress1/bin# ./restore --port 4444 --bindDN "cn=Directory Manager" --bindPassword clear-password --backupDirectory /home/ubuntu/opendj-backup/userRoot --backupID 20140130150000 --start 0

Replication

official guide http://opendj.forgerock.org/opendj-server/doc/admin-guide/index/chap-replication.html

  • SYNCRONIZATION : Keep server clocks synchronized for your topology. You can use NTP for example. Keeping server clocks synchronized helps prevent issues with SSL connections and with replication itself. Keeping server clocks synchronized also makes it easier to compare timestamps from multiple servers.
  • As you see in the command output, replication is set up to function once enabled. You must however initialize replication in order to start the process.
Salvo diversa indicazione, il contenuto di questa pagina è sotto licenza Creative Commons Attribution-ShareAlike 3.0 License