Installation and Setup of the Unix Version

The Unix source code is identical to the DOS source code. Additional scripts and a makefile are included in the Unix distribution. The following steps should be used to transfer, compile, and install the program on a Unix computer.

(1) Download the compressed tar files to your home computer.

(2) Uncompress the compressed tar file and extract the files with tar. The files will automatically extract into subdirectories named bin, data, doc, src, and test. Here, "x.x" represents a version number.

% uncompress phreeqc.x.x.tar.Z
% tar -xvof phreeqc.x.x.tar

(3) Change directory into src and compile the programs using make. By default the makefile (named
src/Makefile) uses gcc as the compiler. Change the variables "CC" and "CCFLAGS" in the makefile to be consistent with the C compiler on your system if necessary. The following commands will create an executable file named, ../bin/phreeqc.exe.

% cd src
% make

(4) Install the script to run PHREEQC. This script needs to be installed in a directory where executables are stored. The makefile automatically edits the scripts to contain the appropriate pathnames for the data file, phreeqc.dat by default, and the executable file. The directory is assumed to be included in your PATH environmental variable, so that the programs will run regardless of the directory from which they are invoked. The default directory in which the scripts are installed is $(HOME)/bin.

This command installs the script in $(HOME)/bin:

% make install

This command installs the script in the specified directory:

% make install BINDIR=/home/jdoe/local/bin

After the scripts are properly installed, they can be executed in any directory with any of the commands described in the DOS installation section with the understanding that Unix is case sensitive. Most Unix commands and file names are lower case. The examples from this manual can be run from the sub-directory, test.

Generated with CERN WebMaker