LDM Source-Code Installation

Steps:

  1. Become the LDM user
  2. Obtain the distribution
  3. Unpack the distribution
  4. Build and install the distribution
  5. Vet the ldmadmin script

Become the LDM User

Follow this advice on becoming the LDM user.

Workshop-specific instructions.


Obtain the LDM Source-Distribution

The LDM source-distribution can be obtained by clicking on the appropriate Download link in the Latest File Releases section of the LDM GForge homepage. Download the file into the LDM user's home directory.

The remaining instructions assume that the distribution was downloaded into the LDM user's home-directory.


Unpack the Distribution

Unpack the distribution in the LDM user's home directory using the zcat(1) and tar(1) utilities. For example:

cd $HOME
zcat ldm-6.1.0.tar.Z | tar xvf -
The name of the subdirectory will contain the version identifier of the just-unpacked package (e.g., ldm-6.m.b, where m and b are the "minor" and "bug-fix" release-levels).

Assign the pathname of the version subdirectory to the shell variable VERSIONDIR, e.g.,

export VERSIONDIR=/usr/local/ldm/ldm-6.1.0
This will be useful later.

Build and Install the Distribution

  1. Go to the top-level source-directory of the just-unpacked package:

    cd $VERSIONDIR/src
  2. If you need to clean-up from a previous build attempt, then do the following:

    • Use the make(1) utility to return the distribution to a pristine state:

      make distclean
      
      This command may fail or even fail to execute.
    • If the above command fails, then ensure that the file that contains the results of the previous execution of the configure script doesn't exist:

      rm config.cache
  3. If necessary, override the default values for certain build-configuration parameters by setting associated environment variables. The environment variables that you may set include the following:

    Variable Meaning Example Value
    CC C compiler /usr/gnu/bin/gcc
    CPPFLAGS C preprocessor options -DNDEBUG
    CFLAGS C compiler options -O3
    LIBS Libraries to use -lrpcsoc
    Normally, this step should not be necessary.

    How to set an environment variable depends on your user-shell. For example:

    User Shell Example
    Standard UNIX® (e.g. sh, ksh, bash) export CC=/usr/gnu/bin/gcc
    csh-like (e.g. csh, tcsh) setenv CC /usr/gnu/bin/gcc
  4. If you want to support a product-queue that is larger than 2 to 4 gigabytes (depending on your operating system and hardware) then follow these instructions for building an LDM that supports a large product-queue.

  5. Run the configure script (or whatever script the previous step said to run) redirecting both standard output and standard error to the file configure.log. The relevant command depends on your user-shell. For example:

    User Shell Command
    Standard UNIX® (e.g. sh, ksh, bash) ./configure >configure.log 2>&1
    csh-like (e.g. csh, tcsh) ./configure >&! configure.log
    This step customizes the installation process for your particular system.

  6. Inspect the file configure.log to verify the configuration process. If an error occurred, then the reason for the error can often be found in the file config.log (note the slightly different name).

    If you email the UPC because of a problem with this step, be sure to enclose the files configure.log and config.log.

  7. Use the make(1) utility appropriate for your system to build the package, redirecting both standard output and standard error to the file make.log. The relevant command depends on your user shell. For example:

    User Shell Command
    Standard UNIX® (e.g. sh, ksh, bash) make >make.log 2>&1
    csh-like (e.g. csh, tcsh) make >&! make.log
    This step creates the package libraries and programs but doesn't install them.

    Inspect the file make.log to verify the build process. If something went wrong that you think might be fixed by setting an environment variable (such as using the cc compiler rather than the c89 compiler) then return to clean-up step above.

    If you email the UPC because of a problem with this step, be sure to enclose the files configure.log, config.log, and make.log.

  8. Use the make utility appropriate for your system to install the package components, redirecting both standard output and standard error to the file install.log. The relevant command depends on your user shell. For example:

    User Shell Command
    Standard UNIX® (e.g. sh, ksh, bash) make install >install.log 2>&1
    csh-like (e.g. csh, tcsh) make install >&! install.log

    Inspect the file install.log to verify the installation process. Ignore all errors that make, itself, ignores.

    If you email the UPC because of a problem with this step, be sure to enclose the file install.log.

  9. Become the superuser (alias root) and use the make(1) utility to install some components with root privileges:

    $ su
    ...
    $ make install_setuids
    ...
    Note that you need the superuser's password to accomplish this step.

    This step is necessary for the LDM to use port 388 (which is restricted) for its communications and for the hupsyslog(1) utility to notify the syslogd(8) daemon when a new log-file has been created.

  10. Use the make(1) utility to clean-up after yourself.

    $ make clean
    ...

Workshop-specific instructions.


Vet the ldmadmin script

Follow these instructions on vetting the ldmadmin script.