Sun/IRAF Installation Guide

Sun/IRAF Installation Guide

2.2. Install the files

If you are installing from tape skip forward to §2.2.2. If you are installing from a network distribution (i.e., from disk) continue with the next section.

2.2.1. Installing from a network distribution

Sun/IRAF is available over the network via anonymous ftp from the node iraf.noao.edu, in the subdirectory iraf/vnnn/SOS4, where "vnnn" is the IRAF version number, e.g., subdirectory iraf/v210/SOS4 for V2.10 Sun/IRAF.

If IRAF is being installed from a network distribution all the architecture independent IRAF files for both the core IRAF system and the NOAO packages will be in the distribution file as.sos4.gen. This "file" is stored in the network archive as a directory wherein the large distribution file has been split into a number of smaller pieces, e.g.,

% ls as.sos4.gen
CHECKSUMS           as.sos4.gen.Z.12    as.sos4.gen.Z.26
FILES.Z             as.sos4.gen.Z.13    as.sos4.gen.Z.27
as.sos4.gen.Z.00    as.sos4.gen.Z.14    as.sos4.gen.Z.28
as.sos4.gen.Z.01    as.sos4.gen.Z.15    as.sos4.gen.Z.29
as.sos4.gen.Z.02    as.sos4.gen.Z.16    as.sos4.gen.Z.30
as.sos4.gen.Z.03    as.sos4.gen.Z.17    as.sos4.gen.Z.31
       (etc.)
Assume that the directory as.sos4.gen as shown above has been recreated somewhere on the machine on which IRAF is to be installed. We can restore the main IRAF source tree as follows.
% whoami
iraf
% cd $iraf
% cat /path/as.sos4.gen/as.* | uncompress | tar -xpf -
After the above finishes the root IRAF directory should appears as follows (this is for V2.10).
HS.SOS4.GEN	bin.ffpa	doc		mkpkg		tags
IS.PORT.GEN	bin.generic	lib		noao		unix
bin		bin.sparc	local		pkg
bin.f68881	dev		math		sys
The files bin.f68881, bin.sparc, etc. are links to the IRAF BIN directories (for binary executables), which probably do not exist yet. Configuring the BIN directories is discussed in section §2.2.3.

2.2.2. Installing from tape

If you have not already done so, log into the IRAF account so that the files when restored will belong to IRAF. Mount the distribution tape, which may be a cartridge tape, a 6250 bpi 9 track tape, a DAT tape, an Exabyte, or whatever.

IRAF distribution tapes consist of multiple files separated by tape marks, with a TOC (table of contents) file as the first file on the tape. To find out what is on the tape, rewind it and read out the TOC file as follows (the actual device name will likely be different than that shown in the examples).

% mt -f /dev/nrst0 rew;  cat /dev/nrst0
This should cause a TOC file to be listed similar to the following, except for the file names which will vary depending upon what type of distribution you have (also the file sizes are now somewhat larger than what is shown). The example below is for a distribution of Sun/IRAF for SunOS-4, with the f68881, ffpa, and sparc binaries.
0   Table of Contents
1   AS.SOS4.GEN   36.2Mb   IRAF, NOAO packages and Sun/OS sources
2   IB.SOS4.F68    8.5Mb   f68881 binaries for IRAF system
3   IB.SOS4.FPA    9.1Mb   ffpa binaries for IRAF system
4   IB.SOS4.SPC   11.3Mb   sparc binaries for IRAF system
5   NB.SOS4.F68    6.9Mb   f68881 binaries for NOAO packages
6   NB.SOS4.FPA    7.4Mb   ffpa binaries for NOAO packages
7   NB.SOS4.SPC    8.7Mb   sparc binaries for NOAO packages
Here, the first column is the file number on the tape, the TOC file being file zero (the first distribution file is numer one), the second column is the name of the tape file, the third column is the file size in megabytes (this tells you how much space will be needed to unpack the file on disk), and the last column is a description of the file contents.

There are three types of tape files in the example shown: the AS file, which is all the IRAF sources (the core IRAF system, NOAO packages, and the SunOS host system interface), the IB files, or IRAF core system binaries, one for each architecture, and the NB files, or NOAO package binaries. The NOAO package sources are included in the AS file since most people requesting IRAF are expected to want the astronomical reduction software, although IRAF can be configured without this if desired. All of the file objects are UNIX tar format files, with the exception of the TOC file which is a simple text file. The distribution files may be compressed if this was necessary to fit all the files on a tape.

In the above example, the SOS4 in the file names indicates that these files are for SunOS version 4. A SunOS version 3 distribution is indicated by a SOS3 in the file names, and a 386i distribution is indicated by a S386. In principle a given distribution tape may contain any combination of these files.

The following commands would suffice to restore the main IRAF system to disk, given the distribution tape described by the TOC file in our example above. Once again, the tape device file and block size shown in the example will very likely have to be changed to whatever is needed for the tape device being used (the example is for a cartridge drive).

% whoami
iraf
% cd $iraf
% mt -f /dev/nrst0 rew;  mt -f /dev/nrst0 fsf 1
% tar -xpbf 126 /dev/nrst0
After the above tar file read operation, the tape is left positioned to just before the EOF of the file just read, since tar stops reading the file data before reading the physical EOF. Hence, an mt fsf will be required to position to the next file on the tape. Any combination of fsf (forward skip file) or bsf (backward skip file) operations may be used to position to a file on a 9 track tape. On a cartridge tape, it is best to plan things so that only forward file skips are used, using a rewind and forward skip if it is necessary to position to an earlier file on the tape.

Once the main system, containing only sources, is installed it is possible to create one or more empty BIN directories for the executables, then compile and link the full system. More commonly one will merely read the precompiled executables off the distribution tape, as we discuss in the next section.

2.2.3. Configuring the BIN directories

In IRAF all the files specific to any particular architecture, e.g., sparc (Sun-4 or sparcstation) or f68881 (Sun-3, mc68020 based) are contained in a single directory called the BIN, or "binary", directory. To run IRAF you must install not only the AS (all-sources) directory tree, but the BIN directory for each architecture. The IRAF core system and the NOAO packages have separate BIN directories.

The BIN directories for the IRAF core system or a layered package (such as NOAO) are located, logically or physically, in the root directory of the IRAF core system or layered package. Every layered package has its own set of BIN directories. In the distributed V2.10 system you will find the following BIN files (directories or symbolic links) at the IRAF root.

link         bin -> bin.generic
directory    bin.generic
link         bin.sparc  -> ../irafbin/bin.sparc
link         bin.f68881 -> ../irafbin/bin.f68881
link         bin.ffpa   -> ../irafbin/bin.ffpa
If the IRAF directory structure is set up as described in
§2.1.2, with $iraf located at iraf/iraf and the BIN directories stored in iraf/irafbin, then these links will not have to be modified. If a different directory structure is used you will have to modify the links accordingly.

The bin link and the bin.generic directory are required for the correct operation of the IRAF system software (mkpkg) and are maintained automatically by the IRAF software management utilities. Under no circumstances should "bin" or "bin.generic" be modified or deleted. It is a very common error to manually delete the bin link and manually set it to bin.sparc or some other architecture. The links bin.sparc, bin.ffpa, and bin.f68881 can be modified as desired but bin and bin.generic should be left alone.

Assume that the bin.sparc directory has been created somewhere (e.g. in the iraf/irafbin directory) and that the ib.sos4.spc distribution files for the core IRAF system sparc binaries have been downloaded from the network archive. We can restore the sparc binaries with the following commands.

% cd $iraf/bin.sparc
% cat /path/ib.sos4.spc/ib.* | uncompress | tar -xpf -
Similarly, to restore the NOAO package sparc binaries:
% cd $iraf/noao/bin.sparc
% cat /path/nb.sos4.spc/nb.* | uncompress | tar -xpf -
This process is repeated for each architecture. For example, a central IRAF distribution installed on a server machine with both Sun-3 and Sun-4 clients might well require the sparc, f68881, and ffpa architectures, or six BIN directories in all.

The procedure for restoring a BIN directory from a tape distribution is similar to that described in §2.2.2 for the core system. For example,

% cd $iraf/bin.sparc
% mt -f /dev/nrst0 rew;  mt -f /dev/nrst0 fsf 4
% tar -xpbf 126 /dev/nrst0
would restore the core system bin.sparc directory from a cartridge tape containing an uncompressed ib.sos4.spc as file 4 on the tape.

2.2.4. Deleting unused HSI binaries

Unlike the main IRAF system and external packages like NOAO, the host system interface (HSI) comes with its binaries pre-installed. The S386 (Sun 386i) HSI comes with only a single set of HSI binaries which you will surely need if you are installing on a 386i. The SOS4 (SunOS-4) HSI, on the other hand, comes with pre-installed sparc and mc68020 (Sun-3) HSI binaries. These binaries are stored in the bin.sparc and bin.mc68020 subdirectories in $iraf/unix.

If you will not be needing either of these HSI BINs (because you don't have both Sun-3 and Sun-4 clients) you may wish to delete the contents of one or the other of these directories to save disk space. For example, if IRAF is installed on a standalone Sun-4 system only the binaries in bin.sparc will be needed, and the contents of $iraf/unix/bin.mc68020 can be deleted.