firstworks Installing SQL Relay

Installing SQL Relay

- Prerequisites
- Downloading SQL Relay
- Unpacking SQL Relay
- Compiling SQL Relay
- Installing SQL Relay
- Installing SQL Relay RPMS

Prerequisites:

Before you can compile SQL Relay, you will need to install some pre-requisites.

The Rudiments library is essential. It's available from www.firstworks.com

If you want to build the non-C/C++ API's, you need one or more of Perl, PHP, Python, Ruby, TCL, Java (see note) or Zope.

(note: The GNU gcj compiler appears to be sufficient to compile the SQL Relay Java API and SQL Relay's configure script will detect it and use it if it's available. But the GNU gij JVM appears to currently have a bug preventing programs which use the SQL Relay Java API from working in some cases. Specifically, if a method which should return a String returns a null, the gij JVM throws a NullPointerException. The GNU gij JVM exhibits this behavior with code compiled with either the GNU cgj compiler or non-GNU javac compilers. And non-GNU JVM's successfully run code generated by either the GNU gcj compiler or non-GNU javac compilers.)

To build the database connection daemons, you'll need one or more of Oracle (Version 7.3.x, 8.x, 9.x or 10.x), MySQL, PostgreSQL, SQLite, unixODBC, iODBC, DB2, Firebird, Sybase or FreeTDS (for accessing either Sybase or MS SQL Server), MDB Tools for accessing MS Access Databases. Downloading SQL Relay:

You can download the most current source distribution of SQL Relay from www.firstworks.com.

Unpacking SQL Relay:

To unpack the distribution, copy the file to a location on your machine that you have access to and execute the following commands:

> gunzip sqlrelay-X.XX.tar.gz
> tar xf sqlrelay-X.XX.tar

This will create a sqlrelay-X.XX directory. Change directories into that directory.

Compiling SQL Relay:

To compile SQL Relay, make sure your ORACLE_HOME environment variable is set if you want to include support for Oracle and type:

> configure
> make

The configure script takes lots of command line options, most of which tell it where to find prerequisite software in case any of it is installed in non-standard locations. It also takes the --prefix option in case you want to install SQL Relay somewhere other than /usr/local/firstworks. You can run "configure --help" to get a list of command line options. For example:

> configure --prefix=/usr/local

This invocation would cause the libraries to be installed in /usr/local/lib, the header files in /usr/local/include, the binaries and scripts to be installed in /usr/local/bin, etc.

Installing SQL Relay:

To install SQL Relay become superuser and type:

> make install

Libraries are installed in /usr/local/firstworks/lib. Include files are installed in /usr/local/firstworks/include. Binaries and scripts are installed in /usr/local/firstworks/bin. An example config file is installed in /usr/local/firstworks/etc. Java libraries are installed in /usr/local/firstworks/java. Python, Perl, PHP, Ruby and TCL files are installed in the appropriate language-specific directories.

If you install SQL Relay as root, init scripts and files will be installed in the appropriate places under /etc for your system. If you install SQL Relay as a non-root user, the init scripts and files will be installed in similar places under /usr/local/firstworks/etc.

To uninstall SQL Relay become superuser and type:

> make uninstall

Installing SQL Relay RPMS:

If your system supports RedHat Package Manager RPM version 4.0.3 or greater then you can build RPMS by running the following command against the distribution tarball:

> rpm -ta sqlrelay-xxx.tar.gz

> (where xxx is replaced with the version number)

You can instruct the build process not to build certain modules by giving it one of the following flags:

> -without db2
> -without freetds
> -without firebird
> -without mysql
> -without odbc
> -without oracle
> -without postgresql
> -without sqlite
> -without sybase
> -without mdbtools
> -without perl
> -without python
> -without php
> -without tcl
> -without java
> -without zope

For example, if you want to build everything but the oracle and zope modules, then you would run the following command:

> rpm -ta -without oracle -without zope sqlrelay-xxx.tar.gz

> (where xxx is replaced with the version number)

This will generate RPM's in the system-wide RPM directory (usually /usr/src/redhat/RPMS or /usr/local/rpm/RPMS) under the subdirectory corresponding to your system architecture. You can install them by changing directories into that directory and executing the following command as root:

> rpm -i --nodeps sqlrelay-*