Nomad Installation

(I need to modify this to reflect the new dir structure of RH7)
Basic Installation Schema:
  1. Get Software
  2. Prepare your system for Nomad
  3. Modify your server files to point to Nomad
  4. Modify NOMAD.SQL to create and select database
  5. Modify Nomad scripts in cgi-bin by adding password

Get Software
Nomad Software is available from the DeRisi Lab.

Prepare your system for Nomad
Nomad requires that your system is running a relational database, as well as various tools for accessing the database. This link describes how to get the freely distributed MySQL database server and make sure your system has the tools required for interacting with the database.

Modify your server config files
There are at least two ways to configure your server for running Nomad:

METHOD 1 - Root Directory Install If you want to devote your entire web server to Nomad (i.e. http://www.yourserver.edu/ points directly to Nomad), choose this method.
METHOD 2 - Sub-directory Install If you want Nomad to be a part of your server, but have other things on your server you'd like to keep in place, choose this method.

Modify NOMAD.SQL to create and select database
To load the nomad tables into your database, you'll first have to create a database, and then select that database to be used by Nomad. One method for feeding lots of commands to an SQL server is to place them in a .SQL file and then push that file into your SQL server. The Nomad database comes with a .SQL file for creating the tables it needs to store and process data. To use this file to create your database you'll have add the CREATE and SELECT commands to the file.

Open up the NOMAD.SQL file with an editor that can handle big files (emacs worked for me), and insert the following two statments right at the top:


CREATE DATABASE NOMAD;
USE NOMAD;
Note: Since this file is so big, you could use a simple text editor to create a file with the two statements above, and then "cat" the big NOMAD.SQL file onto the end of that file using the UNIX command for concatenating files (type: man cat for more info).

Now that you have MySQL running, you can create and populate/initialize the Nomad database by executing the following command (make sure you are in the same directory as the NOMAD.SQL file):

mysql -uroot -pfriday < NOMAD.SQL

This example assumes you've configured your MySQL server for pasword access. Substitute your own password for 'friday'.

Modify Nomad scripts in cgi-bin by adding password
If you've configured MySQL to require a password for access, then you'll have to modify 3 of the Nomad scripts that access the database by adding your password to them. This is very easy to do with any text editor. The scripts requiring modofication are:

create_user2.pl
query_builder.pl
select_lib.pl

Within each of these files is a line specificying connection parameters for connecting to the database. For example, from create_user.pl:

my $dbh_mysql = DBI->connect("DBI:mysql:mysql:localhost",'root','');   ##### SECURITY ISSUE!!!! #####

You can clear up the security issue by requiring a password (setting a password as outlined in the MySQL installation guide above). If you have set the root pasword then simply modify the above scripts by adding your password between the single quotes after the 'root' option:

my $dbh_mysql = DBI->connect("DBI:mysql:mysql:localhost",'root','friday');

Again, 'friday' is only an example, you must choose your own password. Once the scripts above are modified, everything should be set for you to run NOMAD!


Supplementary Notes:

1.) It's generally a good idea to make a master copy of important files you plan to edit in case you make a mistake and need to revert to the original.

2.) If you don't know where a particular file is on your system, you can use the 'locate' command to help you find files. For instance: locate access.conf will tell you where the file access.conf exists. (The locate utility runs once a day to make an index of your system).

3.) If you're interested in learning more about MySQL, there's a good book called: MySQL by Paul DuBois. New Riders Publishing. 2000.

Chris Seidel