Overview: AFNI Installation



Installing the AFNI software package has a few basic steps, most of which can
be accomplished in many different ways.

The basic steps are as follows:

    Step 1: get the set of programs
    Step 2: put the programs in a useful directory
    Step 3: update the PATH to include that directory
    Step 4: get some data to look at

---------------------------------------------------------------------------

Step 1: get the set of programs

    The first thing a user will want is the set of standard AFNI programs
    (the SUMA programs are discussed elsewhere).  There are three basic ways
    to do this:

	A) get a pre-compiled package

	    Get a file like linux_gcc32.tgz, either from the AFNI web site,
            or from someone else who has compiled AFNI.  Standard packages
            can be viewed at AFNI binaries.

	B) compile a package locally

	    On many systems, it is quite easy to download afni_src.tgz and
            compile it from the source.  The user needs to choose one of the
            Makefile's to use, depending on their system, and then execute a
            compile command (such as 'make totality').

	C) use someone else's package 

	    If there is a set of AFNI binaries on the user's computer, or in a
            filesystem that is mounted onto the user's computer, then the user
            can simply access the programs from this directory.

	    One problem particularly in the case of mounted filesystems is that
            the programs may be accessed from many types of computers.  So in
            some cases, the remote programs may not be appropriate for a user's
            computer setup (OS, libraries, etc.).

---------------------------------------------------------------------------

Step 2: put the programs in a useful directory

    There are many good options for where to put programs, depending on one's
    circumstances (private user of a computer, user of a common computer, user
    comfortable with root access, etc).  Two options will be covered here, just
    to provide basic examples.

	A) under the user's home abin directory, '~/abin'.  (what is '~'?)

	    This choice is highly recommended.  The user can control any
            updates, the directory name is standard (does not rely on which
            package one happens to download), and root access is not required.

	    Leaving the package under ~/linux_gcc32 (or whatever name it
	    comes in) is okay, too.  But then the user must remember to deal
	    with their path if the package name changes.

	B) under a root-owned directory, such as /usr/local/afni/bin

	    This is a decent option to save space on a computer that has many
            people using it.  The downside is that those users need root access
            to update the package.  Also, update are generally messier when
            they affect multiple people.  In this case, it may be a good idea
            to backup the current AFNI package (into /usr/local/afni/bin.prev,
            for example), before putting the new package in place.
    
	Warning: is it a bad idea to put the AFNI programs into a common
		 directory (such as /usr/local/bin), that contains other
		 programs.

		 The AFNI package has close to 300 programs in it now (and
		 counting).  If these programs are kept separate, then any
                 changes to the directory structure is very easy.  Moving the
                 package once it is mixed is more difficult.

		 Put the AFNI binaries in their own directory.

---------------------------------------------------------------------------

Step 3: update the PATH to include that directory

    The value of the 'PATH' environment variable (or the 'path' shell variable)
    is a list of directories that the shell searches for valid commands.  It
    gives the user the ability to enter the 'ls' command, for instance, instead
    of entering the entire '/bin/ls' command, which includes the full path to
    the program.

    In a similar way, it is much nicer to enter the 'afni' command then it
    would be to have to enter any of '/home/pickle/abin/afni', '~/abin/afni'
    or '/usr/local/afni/bin/afni' (depending on where the program actually
    exists).

    To be able to enter the command simply as 'afni', the user must add the
    appropriate directory to their PATH.  If the user's shell is the T-shell
    (/bin/tcsh), and they have the AFNI binaries stored under the 'abin'
    directory in their home directory, then ~/abin can be added to the PATH
    with the following command:
	
	set path = ( $path ~/abin )
	

    Since this is something the user will want to do on a "permanent" basis,
    it is good to put that command in the ~/.cshrc file, so it is executed any
    time a new shell is started, such as via a new terminal window.

    Note that if the user prefers the /bin/bash shell, they can add the
    following command to their ~/.bashrc file.
	
	export PATH=$PATH:~/abin
	
---------------------------------------------------------------------------
    
Step 4: get some data to look at

    One convenient place to get sample data is from the Educational Materials,
    under edu/data.

	AFNI_data1.tgz
	AFNI_data2.tgz
	SUMA_demo.tgz
	SUMA_StandardMeshes.tgz

    It is recommended not to unpack all of these into the home directory.
    Consider having a '~/afni' directory, which contains 'data', 'doc', 'src',
    or whatever.  Then the sample data directories could either go under
    ~/afni/data, or down one more level, under ~/afni/data/sample.  This
    may make directory navigation a little easier.

---------------------------------------------------------------------------