Building and installing Dataman

General Instructions
Disabling text mode windows
Disabling Java
Building PHP

General Instructions
Dataman is distributed as a .tar.gz file. The full name is dataman-<version>.tar.gz The general method to install it is to move the file to a temporary directory and enter the command:

zcat dataman-<version>.tar.gz | tar xvf

This will create a directory named dataman-<version>. Change to that directory and enter the commands:

./configure
make
make install
-or-
make install-strip

The configure command should be able to determine the platform that you are building on, and configure the proper use of your compiler and linker. The 'install-strip' version of the command will strip all symbols from the binaries installed. There are many options to the configure script, and you can find them by using the '--help' switch. The one option that is most likely to affect the user is the default installation directory. This is normally /usr/local. Upon successful installation, there will be new files installed in the /bin, /lib, /include/dataman, and /java/Dataman sub-directories of the installation directory.

After the server is built and installed, there are a few other system configuration changes that are not necessary, but will be useful to make. The first is to enter the following lines into your /etc/services file:

dataman 8758/tcp #dataman database server
dataman 8758/udp #dataman database server


Next, you should either create a dataman user or add an alias to your mail delivery program to let dataman receive mail. If the main daemon detects the termination of either the connection or database server, it will e-mail a notice to the dataman user that it was detected and re-started.

Finally, add a rc script to start and shut down the dataman server on system initialization and shutdown. There is a sample one that is appropriate for RedHat or Mandriva systems that is in the top level distribution directory.

Disabling text mode windowing
The C and C++ libraries includes a rudimentary text mode windowing system. This system is set up, by default, to initialize when calling either mkidx, or init_dataman. If you don't want to use the windowing system by default you need to comment out the line in config.h.in (at the top) that #defines DWINDOW -BEFORE- running configure. The routines are still available to you and you can manually initialize and use them. It just won't happen automatically.

Disabling Java
The default Makefile.am for dataman directs the configure script to build a makefile to build the Java classes. This build assumes that you have the Java sdk from SUN installed on your system and that the java compiler, javac, is in your PATH. If you don't have javac in your PATH, the build will fail. To disable the java portion of the build, you need merely to invoke the configure script like this:

./configure --disable-java
make
make install


Building PHP
If you want to use dataman to write dynamic web pages (or just write scripts), you will want to use PHP. There is also a module for PHP that includes the dataman functionality. First download, build, and install the basic dataman package. If you already have PHP installed it's a good possibility that you will want to uninstall it. Next download php_module<version>.tar.gz from sourceforge here. Move the package to the <php_base_dir>/ext directory. Extract the file there. It should create a new directory there named dataman. Move up one directory and run the command

./buildconf

There are a number of switches to configure PHP with to make it work with your web server. We won't discuss these here. The one switch you need to add to configure dataman into PHP is:

--with-dataman[=DIR]

where DIR is where the dataman base install directory is (if it isn't the default). Of course, then run the commands

make
make install

This has only been tested with PHP 5 series.
PHP is now ready to use dataman.