Skip to end of metadata
Go to start of metadata


This guide will show you how to initiate a server image with OpenDJ pre-installed in Amazone EC2.
If you don't have an account at AWS, you have to create one to be able to install this image. You can log in or create an account here

The OpenDJ image is based upon the “micro” instance type (640MB RAM) which is an type of instances which falls into the category of the AWS Free Usage Tier.

A default EC2 instances will give you a new IP at every reboot and therefor also a new FQDN (Public DNS) name. To avoid this allocate a “Elastic IP” to the instance which can be associate with the new OpenDJ instance.

Fast track

  • Click on “Launch Instance” from your instance menu
  • Select “Community AMIs”
  • Search for ForgeRock among “All Images” (take some time to load)
  • From the list of ForgeRock AMI’s click the “Select” button on the OpenDJ entry
  • Select default “Micro (t1.small, 613 MB)” from the Instance type.
  • Create a “Key Pair” if you don’t have any.
  • Create a “Security Group” if you don’t have any with the port 22 (SSH) and 1389(OpenDJ) open for access 
  • Launch....
  • Associate the instance with a static IP from the Elastic IP pool
  • OpenDJ is now accessible on port 1389 for the IP/Public DNS name given to this instance by EC2

Your done....

Manual creation of the image

Here is a guideline if you would like to create a similar image yourselves from scratch, with the necessary software and configuration to run OpenDJ in Amazon EC2.

  •  Select the "Basic Amazon Linux AMI", 
  •  Choose 1 instance select "Micro (t1.micro, 613 MB)" for the "Instance Type"
  •  Add some key/value pair to the instance
  •  Create a key pair (if you don't already have one you could use for SSH for this instance)
  •  Create a "OpenDJ" security group with at least port 22 and 1389 open.
  •  Click on "Launch" to create the instance, and make it active.
  • Associate the instance with a static IP from the Elastic IP pool

Assuming you have downloaded in installed the pam security file and saved it locally on your computer in a folder like .ec2 in your home directory. The hostname is the one displayed by the AWS console for the newly created instance to be used. Connect to it using ssh like the following, but replace the hostname with your unique hostname.

ssh -i .ec2/opendj.pem

  • Open the following page to start the enterprise download:
  • Select OpenDJ, fill in the form, accept the terms, and proceed to the page with the download links

  • Copy the link address for the ZIP file.
  • wget <link address to the zip file>
  • unzip
  • # unzip the archive
  • cd OpenDJ-2.5.0-Xpress1
  • ./setup -i -n -b "dc=example,dc=com" -d 20 -h myLDAP -p 1389 --adminConnectorPort 4444 -D "cn=Directory Manager" -w "secret12" -q -Z 1636 --generateSelfSignedCertificate
  • # Executing the setup will install OpenDJ with the admin password 'secret12' and with some sample data
  • sudo ./bin/create-rc-script -f /etc/init.d/opendj -u ec2-user
  • # Create a default startup script for OpenDJ
  • sudo /sbin/chkconfig --level 2345 opendj on
  • # Make OpenDJ start default on boot
  • sudo /sbin/service opendj start

Then your ready to connect to your new OpenDJ instance in EC2.

  • No labels