VE TOOLS


There are two purposes for this step: 1) to make sure that your computer has all the necessary packages/tools properly installed and configured for the VE; 2) to update the configuration file VE-0.1.1/conf/ve.conf for the VE installation.

Configuration file is a shell script containing five environmental variables: VE_PERL_PATH, VE_CONVERT_PATH, VE_GMT, VE_WEB_CONF and VE_WEB_DYNAMIC. Each variable shows the absolute path to the location of the necessary packages or tools. Usually this is a path to package root directory or separate executable file. There is a predefined Configuration file ve.conf in VE-0.1.1/conf directory in which paths for different packages are given for one of our computer. However, you may need to modify this Configuration file to have correct paths for different packages for your own computer.

Now we describe each of these packages/tools and their applications in the VE.

1. The Generic Mapping Tools (GMT)

What is GMT ?

GMT is an Open Source collection of ~60 programs for manipulating geographic and Cartesian data sets (including filtering, trend fitting, gridding, projecting, etc.) and producing Encapsulated PostScript File (EPS) illustrations ranging from simple x-y plots through contour maps to artificially illuminated surfaces and 3-D perspective views. GMT is developed and maintained by Paul Wessel and Walter H.F. Smith  and partly supported by the NSF. It is released under the GNU Public License. Current release is  3.4.4, Released Jan 12, 2004. GMT release 3.3.3 or higher  can be used for VE. If you don't have GMT on your system yet, you can download and install it from GMT home or mirror sites. The full distribution set requires ~150Mb disk space.

VE and GMT

VE application currently uses very small portion of GMT to create postscript file for temperature field by using Born shell script citcom_plot.  This script calls  grdimage, makecpt,  psxy  and xyz2grd GMT binary modules only.

For the VE installation, you need to know the directory of your GMT package and to include the directory name in  configuration file VE-0.1.1/conf/ve.conf with the environment variable VE_GMT, for example,

VE_GMT=/usr/local/GMT3.4

Note. GMT version 3.3.3 or higher should be installed on your Unix system under root permission.


2. The ImageMagick utilities collection

ImageMagickTM  is a robust collection of tools and libraries to read, write, and manipulate an image in many image formats (over 89 major formats) including popular formats like TIFF, JPEG, PNG, PDF, PhotoCD, and GIF. With ImageMagick you can create images dynamically, making it suitable for web applications. You can also resize, rotate, crop, sharpen, color reduce, or add special effects to an image or image sequence and save your completed work in the same or differing image format. Image processing operations are available from the command line, or from the C, C++, Perl, Java, PHP, Python, or Ruby programming languages. A high-quality 2D renderer is included, which provides a subset of SVG capabilities. ImageMagick's focus is on performance, minimizing bugs, and providing stable APIs and ABIs.

ImageMagick is copyright ImageMagick Studio LLC, a non-profit organization. ImageMagick is distributed under a Apache-style license, which is approved by the Open Source Initiative and is compatible with the GPL. ImageMagick is available for free, may be used to support both open and proprietary applications, and may be redistributed without fee. The ImageMagick logo is copyright Pineapple USA Inc. It is freely distributable, however, modifications to the logo are not permitted.

ImageMagick comes with the Redhat Linux (which is our recommended system for VE) distribution. If you use the Redhat Linux system for your computer, most likely you should already have ImageMagick in your system. If not, you can add it to your system from binary or source code distribution sets (e.g., rpm).

VE and ImageMagick.

To convert GMT postscript images of temperature fields to gif format. ImageMagick convert  tool has been used.

For the VE installation, you need to know the directory of your ImageMagick package and to include the directory name in  configuration file VE-0.1.1/conf/ve.conf with the environment variable VE_CONVERT_PATH. You can type command 'which convert' to find is path.

For example, for OS RedHat 9.0 standard distribution set:

VE_CONVERT_PATH=/usr/bin/convert

3. MySQL relational database

VE application uses MySQL server as a nicely self-contained database.

MySQL comes with the Redhat Linux distribution. If you use the Redhat Linux system for your computer, most likely you should already have MySQL in your system. If not, you can add it to your system from binary or source code distribution sets (e.g., rpm).

Alternatively, you can download MySQL from site http://www.mysql.com for Linux and many other Unix flavors.

VE and MySQL

After knowing for sure that MySQL is on your system,  you need to configure it for to work with VE. See how to configure it for VE in  Configuring MySQL page.

4. Perl and perl modules

Perl is a high-level programming language with an eclectic heritage written by Larry Wall and a cast of thousands. VE needs Perl5.x versions.

Perl comes with the Redhat Linux distribution. If you use the Redhat Linux system for your computer, most likely you should already have Perl in your system. If not, you can add it to your system from binary or source code distribution sets (e.g., rpm). Or you may download Perl source codes from www.perl.org or www.cpan.org web sites or numerous mirror sites.

Perl and VE

For the VE installation, you need to know the path to your perl program and to include the path in  configuration file VE-0.1.1/conf/ve.conf with the environment variable VE_PERL_PATH. You can type command 'which perl' to find is path.

For example, for OS RedHat standard distribution set:

VE_PERL_PATH =/usr/bin/perl

5. Apache HTTP server and mod_perl

Apache HTTP server (or Apache) has been the most popular web server on the Internet since April of 1996. mod_perl is an interpretor  of perl under Apache. Both Apache and mod_perl come with the Redhat Linux distribution. If you use the Redhat Linux system for your computer, most likely you should already have them in your system. If not, you can add them to your system from binary or source code distribution sets (e.g., rpm). Or you may download mod_perl from and http://apache.perl.org Apache from Apache home

If you decide to install them, you may need to know that there are two series of Apacheservers (Apache 1.3.x  and newer Apache 2.x) and mod_perlinterpretators (mod_perl 1.x and mod_perl 2.x). You must install Apache 1.3.x together with mod_perl 1.x  or Apache 2.x together with mod_perl 2.x. Apache 1.3.x doesn't work with mod_perl 2.x, nor does Apache 2.x with mod_perl 1.x.

Apache and VE

VE application has been implemented for Apache 1.3/2 series with corresponding mod_perl. Therefore, you need to configure Apache for the VE. To do that, you need to add/update Apache configuration file httpd.conf with a few lines.

To find out where the file httpd.conf is,  type:

> httpd -VV
Server version: Apache/1.3.27 (Unix)  (Red-Hat/Linux)
Server built:   Dec 10 2003 05:03:03
Server's Module Magic Number: 19990320:13
Server compiled with....
 -D EAPI
 -D EAPI_MM
 -D EAPI_MM_CORE_PATH="/var/run/httpd.mm"
 -D HAVE_MMAP
 -D HAVE_SHMGET
 -D USE_SHMGET_SCOREBOARD
 -D USE_MMAP_FILES
 -D HAVE_FCNTL_SERIALIZED_ACCEPT
 -D HAVE_SYSVSEM_SERIALIZED_ACCEPT
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D HARD_SERVER_LIMIT=256
 -D HTTPD_ROOT="/etc/httpd"
 -D SUEXEC_BIN="/usr/sbin/suexec"
 -D DEFAULT_PIDLOG="/var/run/httpd.pid"
 -D DEFAULT_SCOREBOARD="/var/run/httpd.scoreboard"
 -D DEFAULT_LOCKFILE="/var/run/httpd.lock"
 -D DEFAULT_ERRORLOG="/var/log/httpd/error_log"
 -D TYPES_CONFIG_FILE="conf/mime.types"
 -D SERVER_CONFIG_FILE="conf/httpd.conf"
 -D ACCESS_CONFIG_FILE="conf/access.conf"
 -D RESOURCE_CONFIG_FILE="conf/srm.conf"


From the above output, you can combine HTTPD_ROOT and  SERVER_CONFIG_FILE to get the full path to httpd.conf file, in this example: /etc/httpd/conf/httpd.conf.

You need to include the path in configuration file VE-0.1.1/conf/ve.conf with the environment variable VE_WEB_CONF. For this example,  VE_WEB_CONF=/etc/httpd/conf/httpd.conf


The configuration procedure for consists of four steps:

Step 1. Be sure that httpd.conf allows include files mechanism, called SSI. You can do that by adding a handler for the choosen file type (in our case .shtml). Check file httpd_conf for the following two lines:

AddType text/html .shtml
AddHandler server-parsed .shtml

If these two lines exist but are commented out, uncomment them. If they don't exist, add them to the end of file httpd_conf.

Step 2. The simplest way to publish documents and CGI scripts is to create a virtual host. To do that, you need to a) add to the end of file  httpd.conf a few lines listed below, and b) modify the possibly three entries: 1. DocumentRoot /x, where /x should be the same as DocumentRoot listed originally in file httpd.conf; 2. ServerName server_name, where server_name is the back address for browser; 3. <Directory /x/VE>, where /x is the same as that for DocumentRoot entry.

<VirtualHost *:80>
        ServerAdmin root@localhost
        DocumentRoot /x
        ServerName server_name
        ErrorLog logs/error_log
        TransferLog logs/access_log
</VirtualHost>


<Directory /x/VE>
        Options Indexes FollowSymLinks MultiViews Includes ExecCGI
        DirectoryIndex index.shtml index.cgi index.html
</Directory>



For example, for our computer virtual_earth.colorado.edu with the Redhat Linux system,
/x is /var/www/html, and the added lines to httpd.conf file are:

<VirtualHost *:80>
        ServerAdmin root@localhost
        DocumentRoot /var/www/html
        ServerName virtual_earth.colorado.edu
        ErrorLog logs/error_log
        TransferLog logs/access_log
</VirtualHost>


<Directory /var/www/html/VE>
        Options Indexes FollowSymLinks MultiViews Includes ExecCGI
        DirectoryIndex index.shtml index.cgi index.html
</Directory>



Step 3. Restart Apache server. For Linux/RedHat use commands:
> service httpd stop
> service httpd start

Or use apachectl utility with a single command:
> apachectl  graceful

Step 4. Enable httpd service for the system (i.e., allow automatic stop/start of httpd service during system boot/reboot). For RedHat Linux, use ntsysv or serviceconf utility.