Installation

Installation of the newcdbs package starts with retrieving the tar file and unpacking it. To do this, first create a top level for cdbs. Then, copy the tar file from the anonymous ftp area into this directory and unpack the tar file with the command:

tar -xvf newcdbs.tar

This package links with the STSDAS and IRAF libraries, so you must first determine if these libraries are present. The standard places to look for these libraries on Unix are:

Library File
C interface /usr/stsci/stsdasx/lib/libcvos.a
Tables /usr/stsci/tablesx/lib/libtbtables.a
Images /usr/stsci/irafx/lib/libex.a
IRAF system /usr/stsci/irafx/lib/libsys.a
Vector /usr/stsci/irafx/lib/libvops.a
OS interface /usr/stsci/irafx/unix/hlib/libos.a

If these libraries are not present on your system, you will have to ask the STSDAS system administrator (Ellyne Kinney) to install them. If they are present, but in a nonstandard place, you will have to edit the makefiles.

There are three macros defined in the file system.h which may need to be modified on your system after installation. This file is located in the include subdirectory under the top level directory. The data files used by the CDBS tasks are located in the directory specified by the macro DATADIR. The standard location for this directory is in the data subdirectory under the top level directory. Another macro which may need to be modified in system.h is CDBSDIR. This macro specifies the top level directory for the cdbs reference files and should have the same value as crrefer$ does within the iraf environment. The third macro which may need to be defined is CGIBIN, the directory where cgi-bin scripts are stored. Values of these macros have already been set up for the ra, tib, and marvel clusters. These predefined values are selected by either defining the macro RA, TIB, or MARVEL.

The top level make file for the package can be found in the src subdirectory. It will compile and link all the libraries and tasks by calling their individual make files recursively. Alternatively, you can run the make file in the library or task directly if you do not want to update the whole system.

The individual library and task make files contain a user configurable set of macros at the top. These macros control the compiler used and the compilation flags, the location and name of the executable, and the library locations. Here is an example from one of the make files:

# Name of compiler and compilation flags CC = /opt/SUNWspro/bin/cc INC = -I../../include -I/usr/stsci/stsdasx/lib CFLAGS = -g $(INC) # Location and name of executable and libraries BIN = ../../bin LIBDIR = ../../lib EXEC = $(BIN)/certify LIB = $(LIBDIR)/certify.a You should update the appropriate macro to change the defaults.

The executables are stored in the bin subdirectory. Under Unix, these executables can be made available by adding this directory to your path. This can be done by adding lines like the following to your .login or .cshrc file.

setenv CDBS_TOP /data/lilac1/bsimon/iraf/newcdbs/ set path=($CDBS_TOP/bin $path)

The environment variable CDBS_TOP is installation dependent and must be changed according to where you have installed CDBS.

The tasks which access the CDBS database use default values for the database server, CDBS database, and DADS database. These values can be modified by setting the environment variables CDBS_SERVER, CDBS_DB and DADS_DB. The files defines.* in the util subdirectory contain the same default values for these definitions that are used by the task. If you would like to run the CDBS tasks using a different database machine or database tables, modify these files so the environment variables contain the values you want.

The directory test/script contains Unix shell test scripts for the CDBS tasks. These scripts expect the logical CDBS_TOP to be defined, so the scripts can find the test data directory. This environment variable defines the top level CDBS directory and is defined by the define files mentioned above.

The getref and query tasks can either be run from the command line or as a cgi script. To run getref as a cgi script, the file *.cgi in the util directory must be edited and copied to the cgi-bin directory on a web server. The location of the cgi scripts determines the url it is invoked by. This url must agree with the value defined by the CGIBIN macro in system.h. The cgi scripts define environment variables needed to invoke the Sybase database as well as the location of the executable.


Back to index of cdbs tasks.