		README for the Fast Installation Option
			Updated: September 22, 2014

These are the instructions for installing the JGOFS/GLOBEC
software using the "Fast Install" method. This method takes
advantage of a tar file with all the latest JGOFS/GLOBEC
software in place and is based on the JGOFS/GLOBEC V2.2
software.

This process will be hampered if you do not own the files
so can delete and/or edit them in the JGOFS/GLOBEC 
directories. Check the file protections to verify that you
have the necessary privileges.

To take advantage of this fast install option it is best 
if you are already running Version 2.00 or higher of the
software. If you are not, then we recommend that you install
the software in an empty directory. The only subdirectory
structure you want to preserve and reuse for sure is your 
../objects directory tree. Since the fast install option does
not automatically replace your existing ../objects subdirectory,
you should be okay. However, if you want to be sure, rename
your objects subdirectory. (See step 2d.)

To install the software it is highly recommended that you
save a complete copy of your current installation as a tar 
file just in case reality strikes. (We do make an attempt not
to replace your existing copy of dir, and other files, however.)

	1. Change directory to your data server root directory: E.g.

		cd /data_server_root

	2.a Create a tar file of your existing data serving site:

		tar -cvf existing_data_site.tar .

In any case, you should preserve your existing copy of the dir
application located in ../data_server_root/htmlbin subdirectory.
If you are the cautious type, you can rename copies of the
following routines to be sure they are saved before the update.
However, we attempt to protect you by supplying relacements for
these files with names modified with underscores before and 
after the name. The routines or directory names include:

	htmlbin/dir
	htmlbin/dir-join2-new
	objects directory
	

Sample copying or renamings are:

	cp htmlbin/dir htmlbin/dir-save
and
	cp htmlbin/dir-join2-new htmlbin/dir-join2-new-save	
	
	mv objects objects_save
	
The versions provided (located in the <root directory>/htmlbin) of
_dir_ and _dir-join2_ usually have to be edited for such entries
as $jghome, $topdir, and $office. The dir application does not yet
take advantage of the configuration file so have to be hand edited.
Until then, the new versions are supplied as _dir_ and _dir-join2_
so as not to delete your existing copies. At this point, you are
usually safe to use your own, existing copies of these routines.


	2.b Open an editor displaying your existing copy of build_env.pl
or make a copy of it, if this is the first time you will be using
the build_env.conf file. It is useful to see what options and
choices you made for options (e.g. $jghome, $topdir, and $office) 
so you can duplicate these in the build_env.conf file.


	3. Get copy of "Fast_install" and verify backup exists

Get a copy of the "Fast Install" tar file from the JGOFS/GLOBEC
software site and place it in your data server root directory.

	ftp://globec.whoi.edu/pub/software/JGOFS_GLOBEC

Before untaring the new release, it is good practice to backup
your existing JGOFS/GLOBEC directories (see step 1 and 2 above)


	4. Untar tar file

Untar the Fast_install tar file in the data server root
directory:

	tar -xvf fast_install-V1.xx

	5. Dealing with special files including

		_build-env_.pl
		_build-env_.conf
		_objects_
		htmlbin/_dir_
		htmlbin/_dir-join2-new_

After untaring, several files need to be either put in place or
modified.

In the data server root directory, copy the _build-env_.pl file
to build-env.pl. If you have your own, modified version of this file
you will have to check on the differences. However, if you take full 
advantage of the build-env.conf file (see below) you should not have
to worry about changes made to the build-env.pl file and this copy
(ore rename) can proceed without a second thought. 
	
	5a	cp _build-env_.pl build-env.pl

Compare your copy of the build-env.conf file to the new version
called _build-env_.conf. Make any changes necessary. If you do not
have a copy of the build-env.conf file, create it and make the few
necessary changes. Remember that the values specified in this
configuration file superseed the values specified in the build-env.pl
file.

	5b.	diff _build-env_.conf build-env.conf

or

		cp _build-env_.conf build-env.conf

Make the necessary edits to the build-env.conf file, such as
the name of your data server.

	5c. The objects directory:

If this is a new installation, rename the _objects_ directory to
objects. If this is an existing installation, please, SKIP THIS
STEP.

		mv _objects_ objects [Only if this is a new installation]

	5d. Keep your own version of dir or use distributed _dir_:

Reuse your saved version of dir or edit the version included as necessary.
If you are using the distributed version, be sure to rename it to dir

		mv htmlbin/_dir_ htmlbin/dir [Only if necessary]

The newest version of dir uses a css file which is included in this
distribution as ../htdocs/css/dataSystem.css. You can access it from
our site or make your own copy and store it in your web tree in a 
subdirectory called css.

	5e Using new version of dir-join2 version [OPTIONAL]
	
In ../htmlbin rename _dir-join2-new_ to dir-join2-new but be sure to
look at your existing copy of dir-join2-new to see what has to be changed.

		mv htmlbin/_dir-join2-new_  htmlbin/dir-join2-new


	6. Build the JGOFS/GLOBEC software

To build the JGOFS/GLOBEC software use the following command:

		./build.pl
	
This step builds the software using the build.pl program taking advantage
of the build_env.conf file. Before doing this step verify that the perl
compiler is located where several scripts expect them to be, namely in
/usr/bin/perl. Perl is used by the build-env.pl script and the
../htmlbin/info script, and maybe a few others. Either edit these scripts
to find the Perl compiler where it is located on your system or, if
you have the necessary system privelege, create a symbolic link to
the location of your Perl compiler as

		ln -s your_location_of_perl_compiler /usr/bin/perl

The cgi-lib.pl perl code is provided in the ../htmlbin directory since it
is needed by the info and the perl_utils.pl scripts. You can delete the
cgi-lib.pl file from the ../htmlbin directory if you have your own copy.
If you are not sure, then just leave the one provided in place.

If there are errors during the build or if you have questions, please 
contact rgroman@whoi.edu.


	7. If this is a new installation of the JGOFS/GLOBEC software
you will need to make an entry in your httpd.conf file of your httpd
daemon software, such as Apache. Then entry defines the "jg" alias.
The command is

	ScriptAlias /jg/  /<data_server_root_directory>/htmlbin/

