- Find your external IP address:
ifconfig | sed -En 's/127.0.0.1//;s/.*inet (addr:)?(([0-9]*\.){3}[0-9]*).*/\2/p'
- Send an email with your IP address to [email protected]
groupadd ldm
useradd -m -g users -G ldm -s /bin/bash ldm
passwd ldm
apt-get install pax
su - ldm
cd
wget ftp://ftp.unidata.ucar.edu/pub/ldm/ldm-6.12.6.tar.gz
gunzip -c ldm-6.12.6.tar.gz | pax -r '-s:/:/src/:'
cd ldm-6.12.6/src
./configure >&configure.log
Be sure to check configure.log for errors.
make install >&install.log
Be sure to check install.log for errors.
e.g.
vim /home/ldm/etc/registry.xml
- Make sure the host name is fully qualified.
e.g.
<hostname>nwisnfie-b.cloudapp.net</hostname>
- Change path to the desired location.
- Change size if necessary.
e.g.
<queue>
<path>/data/queue/ldm.pq</path>
<size>1G</size>
<slots>default</slots>
</queue>
e.g.
vim /home/ldm/etc/ldmd.conf
Add the following entry to ldmd.conf:
REQUEST EXP “.*” disconbb16.cloudapp.net
If you'd like incoming files written to disk, edit pqact.conf.
e.g.
vim /home/ldm/etc/pqact.conf
Add the following entries to pqact.conf:
ANY ((.*)([0-9]{4}-[0-9]{2}-[0-9]{2})(.*.nc))
EXEC /bin/mkdir -p /data/queue/\3
ANY ((.*)([0-9]{4}-[0-9]{2}-[0-9]{2})(.*.nc))
FILE -close /data/queue/\3/\1
N.B. This will create daily subdirectories at /data/queue/.
- The regular expression back-references are:
- \1 e.g. nfie_hydro_region_num_18_2015-02-09.nc
- \3 e.g. 2015-02-09
- so in this example /data/queue/\3/\1 evaluates to /data/queue/2015-02-09/nfie_hydro_region_num_18_2015-02-09.nc
cd
/home/ldm/bin/ldmadmin mkqueue
/home/ldm/bin/ldmadmin start
Create a file that starts LDM if it is not running.
#!/bin/bash
/home/ldm/bin/ldmadmin isrunning
if [[ $? != 0 ]]
then
/home/ldm/bin/pqcheck -F
/home/ldm/bin/ldmadmin clean
/home/ldm/bin/ldmadmin start
fi
Use cron to schedule the task to check LDM regularly.
crontab -e
/home/ldm/bin/pqinsert -v nfie_hydro_region_num_02_2015-01-27.nc