How to Install IRAF v2.16.1

  1. Acquire an IRAF tarball (i.e., an iraf-[architecture].tar.gz file). These were traditionally available in 32-bit, 64-bit, and "combo" versions. I recommend the combo version, if your operating system allows it; most of IRAF has been updated to 64-bit, but there are a few old packages that work better (or only) in 32-bit.

  2. Create an IRAF directory, traditionally /iraf/iraf, and unpack the tarball there. For example: tar -xvzf iraf-[architecture].tar.gz

  3. Make sure you're working in a tcsh environment, because the IRAF installation will fail in bash. Type tcsh in a terminal to get into tcsh.

  4. Define the $iraf variable in your environment. I have always done this by adding the following line to my .tcshrc file: setenv IRAF "/iraf/iraf/"

    To make sure the variable is set, you'll then need to reopen a terminal, re-enter tcsh, or run the .tcshrc file with source ~/.tcshrc

    For good measure, I also add the equivalent line to my .bashrc file: export IRAF="/iraf/iraf/"

  5. On Linux sytems and on Mac OS X up through 10.10 Yosemite, install IRAF for all users with:

    sudo /iraf/iraf/install --system

    The default answers to the install prompts should be fine.

    For Mac OS X 10.11 El Capitan and above, you will need to disable System Integrity Protection before running the above command.

    Alternatively, you can do a single-user installation with:

    sudo /iraf/iraf/install

    In this case, answer "no" to the first prompt, then accept the subsequent defaults.

  6. Install xgterm, which was helpfully included in the IRAF tarball. All you have to do is link the executable to somewhere in your $PATH. For example, you might run the following two commands:

    cd /usr/local/bin

    sudo ln -s /iraf/iraf/vendor/x11iraf/bin.macintel/xgterm .

    (Use any workable $PATH location in the first command, and swap bin.macintel with bin.linux in the second command as appropriate.)

  7. Check that it works: go to the folder that will be your personal IRAF home and execute the mkiraf command. Edit any desired preferences in the resulting login.cl file, then try opening an xgterm and starting IRAF.

  8. Add desired external packages. Go to /iraf/iraf/extern/ (substituting the IRAF directory you created in step #2) and review the instructions in the README file.

    Initial set-up for external packages:

    sudo ./configure

    To list available packages:

    sudo make check

    To install a particular external package:

    sudo make [packagename]

    e.g., sudo make stsdas

    There is an issue with installing external packages on MacOS 10.13 High Sierra. See this iraf.net thread for details and a workaround.