The platform on which the LDM package is to be installed must be prepared in advance prior to the installation. If your platform already has an LDM installation, then, in all likelihood, the preinstallation steps have already been completed. If you are installing the first LDM package on your platform, however, then the steps described here should be done before the LDM distribution is unpacked.
root/etc/services
/etc/rpc
/etc/syslog.conf
Keep the following in mind when creating the account:
The name of the user should be "ldm".
Conventionally, the
LDM user's home-directory is
/usr/local/ldm. This pathname is compiled
into the binary distributions, so when installing from a
binary distribution you should either specify that directory
as the LDM user's home-directory, or
do one of the following:
Use a group ID that allows other non-LDM processes to write files (decoders, etc.). The McIDAS and GEMPAK users are often members of this group.
The LDM's product-queue must be on a locally-mounted disk, and it is highly recommended that locally-decoded and stored data also be written to locally-mounted disk(s). Also, because data-files and LDM logfiles are extremely volatile, they should probably not be automatically backed-up on a regular basis. For these reasons, we strongly recommend that the directories containing the LDM logfiles and decoded data-files be on locally-mounted but not automatically backed-up disk(s).
If you routinely back-up users' home-directories, then the
LDM's
log and data directories should not reside under the
LDM user's
home-directory but should, instead, be on other local, but not
backed-up disk(s) (e.g., /var/data).
In this case, you
must create the data and log directories as root and ensure that
they can be managed by the
LDM user and the
LDM user's group. For example:
mkdir /var/data/ldm
mkdir /var/data/ldm/logs
chmod -R g+w /var/data/ldm
chown -R ldm:groupId /var/data/ldm
If you don't routinely back-up users' home-directories, then you can postpone this step until here, when you are the LDM user.
/etc/services
Add the following line:
ldm 388/tcp ldmd # UCAR Unidata LDM
This allows programs such as netstat(1) to use
"ldm" and "ldmd" instead of "388" (the LDM port number).
/etc/rpc
Add the following line:
ldm 300029 ldmd
This allows programs such as rpcinfo(1) to use
"ldm" and "ldmd" instead of "300029" (the LDM program number for
RPC).
/etc/syslog.conf
The
LDM
uses the system logging daemon, syslogd(8), to
write error messages using the
localn logging facility
Such messages should end up in the
LDM logfile.
Add the following entry to file /etc/syslog.conf
localn.debug /usr/local/ldm/logs/ldmd.log
where
localn
is the logging facility
that the
LDM
will use.
Note that you might have to adjust the pathname of the
log-file.
Add the string
localn
to entries like the
following so that LDM messages will not be written to the
console (Note: entries might not be exactly like these,
but they should be similar):
*.err;kern.notice;auth.notice;user.none;localn.none /dev/console
*.err;kern.debug;daemon.notice;mail.crit;user.none;localn.none /var/adm/messages
If the operating system is Linux and
the file /etc/selinux/config exists and
contains the variable SELINUX, then
that variable must be set to disabled in
order to allow the syslog(8) daemon to write
log messages to the LDM logfile.
su - ldm
The "-" option guarantees that the current working directory is the
LDM user's
home-directory. Alternatively, just log-out and log back in as the
LDM user.
Standard user-shell (e.g. sh, ksh, bash):
export LDMHOME=$HOME
export PATH=$HOME/decoders:$HOME/util:$HOME/bin:$PATH
export MANPATH=$HOME/man:SysManPath
# Example pathname of UDUNITS(3) database
export UDUNITS_PATH=$HOME/etc/udunits.dat
csh-like user-shell (e.g. csh, tcsh):
setenv LDMHOME $HOME
set path=($HOME/decoders $HOME/util $HOME/bin $path)
setenv MANPATH $HOME/man:SysManPath
# Example pathname of UDUNITS(3) database
setenv UDUNITS_PATH $HOME/etc/udunits.dat
The UDUNITS_PATH environment variable conains
the pathname of the database of the UDUNITS package. It
should only be necessary to define this variable if your
LDM system will decode incoming
products using the gribtonc(1) utility (i.e. if
an exec entry
that uses gribtonc exists in a
pqact
configuration-file).
If necessary, modify the setting of the PATH environment variable above to ensure that the necessary build utilities can be found.
If you didn't create directories for data-files and log-files as
root (this step), then you
must create them now. Assuming that the
LDM user's home-directory is
local and not backed-up, then do the following:
mkdir data logs
The LDM installation procedure allows you to upgrade an existing LDM system while it is still running and to revert to prior version if something goes wrong. Because of this, the subdirectory structure of the LDM user is slightly more complex than usual.
Do the following:
ln -s runtime/bin bin
ln -s runtime/doc doc
ln -s runtime/man man
ln -s runtime/src src
ln -s runtime/lib lib
ln -s runtime/include include
These links reference directories that will be specific to a
particular
LDM version.
Create symbolic links to the previously-created data-directory and log-directory if they don't already exist in the LDM user's home directory. For example:
ln -s /var/data/ldm data
ln -s /var/data/ldm/logs logs
Create a directory for programs that decode incoming data products (i.e. LDM decoders). LDM decoders are not included with the LDM release, but are run by the LDM:
mkdir decoders
Create a directory for other, miscellaneous programs that you might create for use with the LDM:
mkdir util
The directory structure should now look something like this (your data and logs directories might vary):
ls -lF
... bin -> runtime/bin/
... doc -> runtime/doc/
... data -> /var/data/ldm
... decoders/
... src -> runtime/src/
... include -> runtime/include/
... lib -> runtime/lib/
... logs -> data/logs/
... man -> runtime/man/
... util/
You will create the
runtime symbolic link
later when you install the package.
The logical meaning of the subdirectories is the following:
- bin/
- LDM executables
- doc/
- LDM HTML documentation
- data/
- LDM product-queue and locally-created data files
- logs/
- LDM logfiles and statistics
- src/
- Source code for this releasse
- etc/
- Runtime configuration files (might not exist, yet)
- include/
- C header files
- lib/
- LDM library files
- man/
- Manual pages
- decoders/
- LDM decoders
- util/
- Miscellaneous utility programs