-->
Table of Contents


Appendices

… it is a fact that the condition of historic life is one of constant change. History is unending restlessness and mutation.—Jose Ortega y Gasset

Introduction

This book has two appendices:

  Appendix A describes how to install software used with this book’s examples.
  Appendix B describes some of the database software and tools that are available for Linux as of this writing.

As Jose Ortega y Gasset notes, history is change. He might have added that the history of computing changes rapidly—and the history of Linux particularly rapidly.

Therefore, please bear in mind that between the time we wrote this book and the time you read it, the Linux world will have changed. New tools will have become available, old tools will have changed and added new features, perhaps new systems will have been unveiled. We have made the information in these appendices as complete and accurate as possible; however, before you start to build a big application, be sure to find documentation that is as complete and up-to-date as possible.

Appendix A
The CD-ROM

The CD-ROM includes all of the software discussed in this book:

  A release of Slackware Linux
  Database packages, including Just Logic and mSQL
  Java tools for compiling and running the Java examples
  Source code for each example in the book, and each example’s expected output.

This appendix describes how to install and run this software.

Linux

The CD-ROM contains a Slackware release of Linux. It includes release 2 of the kernel, uses ELF object format, and includes the latest versions of popular Linux tools.

If you are not yet running Linux, you can use these bits to install Linux onto your computer. Please note, however, that installation and configuration of Linux is can be tricky at times, and does require careful planning. If you are considering installing Linux, you should consider picking up a copy of Linux Configuration & Installation, second edition, by Patrick Volkerding, Kevin Reichard, and Eric F. Johnson (New York, MIS:Press, 1996).

Before You Begin

Most of the database-related software is kept in directory database on the CD-ROM. Before you begin to install anything, be sure that you read file database/READ.ME. This file holds last-minute updates, changes, and corrections to the instructions in this chapter. Read file database/READ.ME before you install anything.

Just Logic

Just Logic is a relational database package published by Just Logic Technologies, Inc., of Montreal, PQ, Canada. We wish to thank Just Logic Technologies for permitting us to include their software with our book.

Copyright Information

All of the software that comprises the Just Logic relational database management system is copyrighted by Just Logic Technologies, Inc. All rights reserved. This software may not be reproduced or redistributed without written permission of Just Logic Technologies, Inc.

Installation

To install Just Logic onto your Linux system, do the following:

1.  Read all the following instructions before you do anything.
2.  Log in as the superuser root.
3.  Mount the CD-ROM.
4.  Create user group dba.
5.  Create an account for user jlt_sql. This user should be the only member of group dba. Give this user home directory /home/jlt_sql.
6.  Create directory /home/jlt_sql. Give full owner permissions to user jlt_sql, and full group permissions to group dba.
7.  From the directory onto which you mounted the CD-ROM, copy archive database/just_logic/jlt.cpio into directory /home/jlt_sql.
8.  cd into directory /home/jlt_sql; then use the following command to de-archive the bits:

     cpio -ivd < jlt_cpio

9.  Once the bits have been de-archived, run command set_prot. This sets permissions appropriately.
10.  Copy of the contents of file profile.example into file /etc/profile. This file sets a number of environmental variables that Just Logic needs to run correctly.

mSQL

MiniSQL is a product of Hughes Technologies, Australia. We wish to thank Hughes Technologies for their permission to include mSQL with this book. We ask readers to respect the copyrights of mSQL and the conditions under which it can be used.

To learn more about Hughes Technologies’ products, and to obtain the latest enhancements to mSQL, check out Hughes Technologies’ home page, at:


     http://www.hughes.com.au/product/

Copyright Information

mSQL is copyrighted by Hughes Technologies, Inc. It may not be copied or reproduced in any way whatsoever except as specified by Hughes Technologies. For details on what permissions Hughes Technologies grants to you, see file /usr/src/msql-1.0.14/doc/License. This file also contains information on how you can purchase a license for mSQL.

Installation

mSQL comes in the form of source code. Thus, installation is a three-step process: first, install the sources; then compile them; and then configure your system to use mSQL.

To install mSQL sources, do the following:

1.  Log in as the superuser root.
2.  Mount the CD-ROM.
3.  From the directory onto which you mounted the CD-ROM, copy file msql-1.0.14.tgz into directory /usr/src.
4.  Use the following command to de-archive the sources:

     tar xvzf msql-1.0.14.tgz

To compile the sources and install the compiled bits, follow the directions given in file /usr/src/msql-1.0.14/README. It is a good idea to perform the simple tests that this file suggests; however, we have found some errors in the mSQL regression test, and therefore you should not regard this as a true test of whether mSQL is correctly installed.

The last task for installation is to assign a port (socket) to mSQL. Edit /etc/services, and add a line as follows:


     msql         1112/tcp         # msql database

If you have already assigned port 1112, use another port.

Fire Up mSQL

Now that all this done, you can fire up mSQL. Just type the command:


     /usr/local/Minerva/msqld &

Do not forget the & at the end of the command: despite the fact that this is a daemon, you must run it in the background. If you wish, you can embed this command in file /etc/rc.d/rc.local to fire up mSQL whenever you reboot your system. Be absolutely sure, however, that you put the & at the end of the command. If you do not, rc.local will never terminate and your system will hang.

Java Tools

The CD-ROM includes a very useful set of tools for developing Java programs. The following describes how to install them.

Java Development Kit

The release of Linux that is included with this book includes a recent version of the Java Development Kit (JDK) for Linux. The JDK was ported to Linux by a devoted Linux programmer, Randy Chapman.

Installation

If you are installing the package under an up-to-date version of Slackware Linux, such as that included on the CD-ROM, you can do the following:

1.  Log in as the superuser root.
2.  Mount the CD-ROM.
3.  cd to the directory onto which you have mounted the CD-ROM.
4.  Type command:

     installpkg java.tgz

If you are running a version of Linux other than Slackware, you must install the package by hand, as follows:

1.  Log in as the superuser root.
2.  Mount the CD-ROM.
3.  From the CD-ROM’s home directory, copy archive contrib/java/java.tgz into directory /usr/local.
4.  Use the following command to de-archive the kit:

     tar xvzf java.tgz

5.  Read file /usr/local/java/READ.ME for detailed instructions on installation of the kit. Follow these instructions exactly. If you run into a problem, be sure to read the FAQ carefully.

For your own sanity, we strongly urge you to install the JDK into its default directory, which is /usr/local/java.

Latest Version

The Java world is changing rapidly, and it is quite possible that a newer version of the Java Development Kit will have been released between the time that this book was written and the time you read it. To get the latest information about programming Java under Linux, check out URL:


     http://www.blackdown.org/java-linux.html

To download the latest version of the JDK, see URL:


     http://www.blackdown.org/java-linux/Mirrors.html

JDBC

To compile the Java examples in this book, you need to install JDBC onto your system. JDBC is comprised of two sets of Java objects: the driver-manager objects, which are supplied by Sun; and the driver objects for mSQL, which come from a third-party source.

Copyrights

The full copyright statement for Sun’s JDBC driver manager is kept in file /usr/local/java/jdbc/License. The following gives Sun’s copyright statement for these objects:

“The JDBC Java Database driver manager is owned and licensed exclusively by Sun Microsystems, Inc. Copyright (C) 1996 Sun Microsystems, Inc. All rights reserved. Java, Hotjava, JDBC, the Java and coffee cup Logos, Sun, Sun Microsystems, and the Sun Logo are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. and other countries.”

The mSQL Java objects included with this book were written by Darryl Collins, of the Department of Mining and Metallurgical Engineering, University of Queensland, Australia, and are copyrighted by him. The JDBC interface to these objects was written by George Reese of Imaginary Software, and is copyrighted by him. We thank Messrs. Collins and Reese for kindly permitting us to include their work on our disk. We ask you to read the copyright statements that are included with these objects, and to abide by their conditions.

A key bug fix to the Imaginary JDBC interface was provided by programmer Gerrit Griebel. We also wish to thank Mr. Griebel for kindly allowing us to patch his code into this release.

Installation

Installation is in two parts: installation of Sun’s JDBC driver manager, and installation of the JDBC driver for mSQL. Please note that before you install JDBC onto your system, you must first have installed the JDK. If you have not yet installed the JDK onto your system, do so; then return to this section.

To install the driver manager, do the following:

1.  Log in as the superuser root.
2.  Mount the CD-ROM.
3.  From the directory onto which you mounted the CD-ROM, copy file database/sun_jdbc.tgz into directory /usr/local/java.
4.  cd to directory /usr/local/java.
5.  Type the following command to de-archive the driver manager:

     tar xvzf sun_jdbc.tgz

To install the mSQL JDBC driver, do the following:

1.  Log in as the superuser root.
2.  Mount the CD-ROM.
3.  From the directory onto which you mounted the CD-ROM, copy file database/mSQL-JDBC.tgz into directory /usr/local/java.
4.  cd to directory /usr/local/java.
5.  Type the following command to de-archive the driver manager:

     tar xvzf mSQL-JDBC.tgz

6.  Finally, you must set environmental variable CLASSPATH. Set it in file /etc/profile to include directories that hold the objects you have just installed, as follows:

   export CLASSPATH=/usr/local/java/jdbc/classes:/usr/local/java/

mSQL-JDBC.0.9.4/classes:

If you have installed the Java development kit into a directory other than /usr/local/java, be sure to change this command appropriately.

Example Programs

The example programs described in this book are kept in directory database/examples. Because some of the programs must be compiled to be usable, we suggest that you copy the files onto a directory on your hard disk.

Additional Programs

Additional database software is kept on the CD-ROM, under directory database. To install a package that interests you, copy the appropriate archive into directory /usr/src. Then de-archive it and read the directions that are included within the archive.


Table of Contents