| Sun ONE Portal Server 6.1 Installation Guide |
Appendix D
Setting Up LDAP Replication for the Sun ONE Portal ServerThe main reason for using LDAP replication for your Sun ONE Portal Server is to provide higher availability.
This procedure requires that you install the Sun ONE Directory Server software on all the machines you want to use for replication, then set up the replication. Next, you install the application server and Portal Server software. The application and Portal Server software can be installed on the machines to be used for replication or on separate machines. Before using the portal server software, you need to update a number of configuration files.
The following instructions are for setting up two machines: one machine with Sun ONE Portal Server software (ps-server) including LDAP and one machine with just LDAP (x-ldap-server). Replication is set up between the two machines and LDAP failover is set up on the machine with the Sun ONE Portal Server software.
For more details and other replication set ups, see Chapter 8, Managing Replication in the Sun ONE Directory Server Administrator’s Guide.
These instructions assume that the default values are used except where specifically noted.
On both machines, install the directory server.
Setting Up Replication on the Sun ONE Portal Server Machine
- As root, in a terminal window start the directory server console by typing:
# /usr/ldap/startconsole
- In the login window that is displayed, enter admin as the user name and the passphrase you chose earlier.
- In the left pane of the console, expand the directory.
- Select Directory Server (ps-server).
- In the right pane, click Open.
A pop-up window is displayed.
- Select the Configuration tab.
- Expand Replication in the left pane.
- Select Replication.
- Check Enable Changelog check box in the right pane.
- Click Use default button in the right pane.
The default directory value is entered in the Changelog database directory text field.
- Click Save.
- Select userRoot in the left pane.
- Check Enable Replica check box in the right pane.
- Select Multiple Master.
- Enter a number (1-255) in the Replica ID box. This number needs to be unique for each master.
- Enter cn=Directory Manager in the Enter the Supplier DN box.
- Click Save.
- In the tool bar, click Object and select New Replication Agreement.
- Enter a name (you can use the name of the x-ldap-server) for the replication agreement. Add a brief description.
- Click Next.
- Select Other and insert the fully qualified distinguished name of the machine to be connected to with the port number (default 389).
- Click OK.
- For Bind as, use cn=Directory Manager and insert the password for the directory server on the x-ldap-server machine being connected to.
- Click Next.
- Click Next again.
- Select Do Not Initialize Consumer and click Next.
The replication agreement is displayed.
- Click Done if it is correct.
- Click OK.
Setting Up Replication on the Dedicated LDAP Machine
- As root, in a terminal window start the directory server console by typing:
# /usr/ldap/startconsole
- In the login window that is displayed, enter admin as the user name and the passphrase you chose earlier.
The console is displayed.
- In the left pane of the console, expand the directory.
- Select Directory Server (x-ldap-server).
- In the right pane, click Open.
A pop-up window is displayed.
- Select the Configuration tab.
- Expand the Replication in the left pane.
- Select Replication.
- Check Enable Changelog check box in the right pane.
- Click Use default button in the right pane.
The default directory value is entered in the Changelog database directory text field.
- Click Save.
- Select userRoot in the left pane.
- Check Enable Replica check box in the right pane.
- Select Multiple Master.
- Enter a number (1-255) in the Replica ID box. This number needs to be unique for each master.
- Enter cn=Directory Manager in the Enter the Supplier DN box.
- Click Save.
- In the tool bar, click Object and select New Replication Agreement.
- Enter a name (you can use the name of the ps-server) for the replication agreement. Add a brief description.
- Click Next.
- Select Other and insert the fully qualified distinguished name of the machine to be connected to with the port number (default 389).
- Click OK.
- For Bind as, use cn=Directory Manager and insert the password for the directory server on the ps-server machine being connected to.
- Click Next.
- Click Next again.
- Select Initialize consumer now and click Next.
The replication agreement is displayed.
- Click Done if it is correct.
- Click OK.
- In this set up the Sun ONE Portal Server machine’s LDAP is a consumer of this LDAP and this LDAP is a consumer of the portal server machine’s LDAP. So for each additional consumer portal server machine, repeat Steps 20 to 30.
- Stop each LDAP that has been initialized (Step 26), then restart. For example, log into the supplier machine (ps-server) as root and type:
# /usr/ldap/slapd-servername/stop-slapd
# /usr/ldap/slapd-servername/start-slapd
Adding More Suppliers
When making the replication agreements, each master must have an agreement with every other master. Any supplier you initialize, you need to restart.
Configuring the Sun ONE Portal Server Software
- Install the Sun ONE Portal Server software. See Chapter 2, "Installing Sun ONE Portal Server."
- Go to the S1PSBaseDir/config/ums/serverconfig.xml file. Set the configuration to point to the local LDAP.
- Copy the Server1 line right below itself.
- Edit the lines so they have these values:
<Server name="Server1" host="full-ps-servername" port="389" type="SIMPLE" />
<Server name="Server2" host="x-ldap-fullservername" port="389" type="SIMPLE" />
- If you have multiple suppliers, add similar lines for each one.
<Server name="Server3" host="x-ldap-fullservername2" port="389" type="SIMPLE" />
- Go to the S1PSBaseDir/lib/AmConfig.properties file (the default is /opt/SUNWappserver7/SUNWam/lib/AmConfig.properties).
- Stop the web application container instance.
- Stop and restart the amserver.
# /etc/init.d/amserver stop
# /etc/init.d/amserver start
- In a terminal window, restart the web application container instance.
- Log in to the Sun ONE Identity Server admin console as administrator.
By default, Identity Management is selected in the location pane and All created organizations are displayed in the navigation pane.
- Select User Management in the View menu and click on the organization name link in the navigation pane.
- Select Services in the Show menu in the navigation pane.
- Click on the Properties arrow next to LDAP Authentication in the navigation pane.
- Check that the Primary LDAP box only has the full-ps-servername listed. If you have multiple LDAP servers, the Primary LDAP box should list localhost or full-ps-servername|full-ps-servername:389.
- To the Secondary LDAP box Add the x-ldap-fullservername to the list.
- Click Save to save the configuration.
- If you have a number of portal server installations, complete Step 15 to Step 19. If not, you are finished.
- Return to the root level by clicking root suffix (default isp) in the location pane.
- In the View menu, select Service Management.
- Click on the Properties arrow next to Platform in the navigation pane.
- Check that the Server List has all of the portal server machines listed using the full-ps-servername for each server.
- Click Save.