Globus Toolkit 2.2/2.4 Replica Installation

This guide will talk about how to install, configure, and initialize the Globus Replica Catalog and Globus Replica Management software which make up Globus Replica Services.

Installation

To install Globus Replica Services, follow the steps below.  You will need GPT installed in order to proceed.

First get the following bundle from the download page:

  • globus-replica-2.4.3-src_bundle.tar.gz

Install the bundle as follows:

IMPORTANT:  If you previously installed the Globus Toolkit you need to make sure that $GLOBUS_LOCATION is set to a different location than the one used for the previous installation. The Replica software requires this since its OpenLDAP dependency conflicts with the OpenLDAP software built for MDS.

    % gpt-build globus-replica-2.4.3-src_bundle.tar.gz \
    gcc32pthr

Note: Do not use the -static=1 option. Using this option will cause a build failure.

Configuration

Download the Globus Replica schema file from here.

Copy it to the following directory and file name:

    $GLOBUS_LOCATION/etc/openldap/schema/replica.schema

Note: $GLOBUS_LOCATION here points to the directory where you installed the Replica software above.  See the "IMPORTANT" section above for more information.

Edit $GLOBUS_LOCATION/etc/openldap/slapd.conf to reflect your site's requirements.  For this example, we will use the following file.  Portions in orange are site dependent and should be changed.

    # See slapd.conf(5) for details on configuration options.
    # This file should NOT be world readable.
    #

    schemacheck off

    include GLOBUS_LOCATION/etc/openldap/schema/core.schema
    include GLOBUS_LOCATION/etc/openldap/schema/replica.schema

    pidfile GLOBUS_LOCATION/var/slapd.pid
    argsfile GLOBUS_LOCATION/var/slapd.args

    #######################################################
    # ldbm database definitions
    #######################################################

    database ldbm
    suffix "dc=my-domain,dc=com"
    rootdn "cn=Manager,dc=my-domain,dc=com"
    rootpw secret
    directory GLOBUS_LOCATION/var/openldap-ldbm
    index objectClass eq

Be sure to include the following line in the file near the top, being sure to replace GLOBUS_LOCATION with an actual path:

    include GLOBUS_LOCATION/etc/openldap/schemas/replica.schema

If you are going to be running slapd on the standard LDAP port of 389, you will need to be root to continue on.  Otherwise, specify another port when you start slapd below.  For more information on doing this, please see the slapd man page ('man slapd').   

Set the LD_LIBRARY_PATH environment variable to:

    $GLOBUS_LOCATION/lib

Start the slapd server:

    % $GLOBUS_LOCATION/libexec/slapd -f \
    $GLOBUS_LOCATION/etc/openldap/slapd.conf

Check to see if the server started:

    % ps -ef | grep slapd

This command should show at least one instance of slapd running.  

Initialization

Once the slapd server is running, we need to initialize it.  Start out by sourcing $GLOBUS_LOCATION/etc/globus-user-env.csh (or sh) if you have not done so already.

Note: $GLOBUS_LOCATION here points to the directory where you installed the Replica software above.  See the "IMPORTANT" section above for more information.

In the following commands, things in orange are site specific and need to be replaced where necessary.

Create a file called root.ldif with the following contents:

    dn: dc=my-domain, dc=com
    objectclass: top
    objectclass: GlobusTop

First, check to see if the following directory exists; if it doesn't, create it:

    $GLOBUS_LOCATION/var/openldap-ldbm/

Now run the following command:

    % ldapadd -x -h ldap.server.com -D \
    "cn=Manager,dc=my-domain,dc=com" \
    -w secret -f root.ldif

Note: If the above command fails, verify that the following directory exists:

    $GLOBUS_LOCATION/var/openldap-ldbm/

Note: Depending on which version of the ldap tools you're using are, you may need to remove the '-x' flag from the command above.  If you are using the ldap tools that come with the Globus Toolkit, then you may leave the '-x' flag in place.

You should see the following output:

    adding new entry "dc=my-domain, dc=com"

Run a sample query:

    % ldapsearch -h ldap.server.com -b "dc=my-domain,dc=com" \ "objectclass=*"

You should see the following in the output:

    dc=my-domain, dc=com
    objectClass=top
    objectClass=GlobusTop

Now initialize a Replica Catalog.

Create a file called rc.ldif with the following contents:

    dn: rc=test, dc=my-domain, dc=com
    objectclass: top
    objectclass: GlobusReplicaCatalog
    objectclass: GlobusTop
    rc: test

Now run the following command:

    % ldapadd -x -h ldap.server.com -D \
    "cn=Manager,dc=my-domain,dc=com" \
    -w secret -f rc.ldif

You should see the following in the output:

    adding new entry "rc=test, dc=my-domain, dc=com"

Run a sample query:

    % ldapsearch -h ldap.server.com -b "dc=my-domain,dc=com" \ "objectclass=*"

You should see the following in the output:

    dn: dc=my-domain, dc=com
    objectclass: top
    objectclass: GlobusTop

    dn: rc=test, dc=my-domain, dc=com
    objectclass: top
    objectclass: GlobusReplicaCatalog
    objectclass: GlobusTop
    rc: test

Now you are ready to use Replica Services.  For information on how to use Replica Services, please see Getting Started with the Globus Replica Catalog.