Netgraph Server Installation, Setup and Start-up Manual


last update: June 27th, 2008

Introduction

Netgraph server is a server part of the whole Netgraph client-server application. Netgraph server waits on a port for a request from a client (applet or application). After a connection with a client is established, the server processes all requests from the client, selects trees from a tree database and sends them to the client. More clients can access the server simultaneously.

This manual tells you how to install, setup and start the Netgraph server.

License:

Netgraph is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.

For any questions and for installation of the applet version of the client at the server side, please, contact the author of Netgraph, Jiří Mírovský (mirovsky@ufal.mff.cuni.cz).

Netgraph server installation, setup and start-up instructions

  1. System requirements
  2. Install the Netgraph server
  3. Compile the Netgraph server (in case you are installing from the source package)
  4. Set up the Netgraph server
  5. Start the Netgraph server
  6. Uninstallation of the Netgraph server

System requirements

Netgraph Server - System Requirements for Running

Netgraph server was tested on Linux (Fedore Core 7, Fedora 8), and MS Windows XP.
For running on Linux, Netgraph server needs standard runtime libraries of Linux distributions (e.g. on Fedora, standard C library package libstdc++ is needed). Pcre runtime library (Perl Compatible Regular Expressions) may be needed to install first (on Fedora: package pcre), although it is also usually a part of the standard installation of the Linux distribution.
For running on MS Windows XP, all necessary libraries (parts of cygwin) are included in the installation program.

Netgraph Server - System Requirements for Compilation

For compilation, Netgraph server needs:
  - GNU Make
  - GNU C-compiler gcc (e.g. on Fedora, standard C development library package libstdc++-devel is needed)
  - pcre development library (Perl Compatible Regular Expressions) (on Fedora: package pcre-devel)
On MS Windows XP, Netgraph server can only be compiled in cygwin, a Linux-like environment for Windows. During the installation of cygwin, the tools and libraries mentioned above (make, gcc, pcre) must be checked to be included in the installation.

Although not tested properly, Netgraph server should also work on Apple MacOS, other UNIX-like systems and MS Windows Vista. Pcre library should exist for most of these systems, too.

Installation of the Netgraph server

For the installation of the Netgraph server, please follow the installation instructions on the Netgraph home page.

Compile the Netgraph server

Skip this step, if you have used one of the installation programs.
The following applies for compiling Netgraph server from the source code on Linux, Apple MacOS, other Unix-like systems, and MS Windows XP in cygwin.
Change to the directory you have unzipped Netgraph server to.
On MS Windows, edit the file mutual.h, comment the line #define _LINUX_VERSION, and uncomment the line #define _WINDOWS_VERSION.
On other systems, edit the file mutual.h, uncomment the line #define _LINUX_VERSION, and comment the line #define _WINDOWS_VERSION.
Then, to compile the Netgraph server, type:
make
in the shell. All compilation steps should be performed automatically. Executable programs netser and dotser should be created (with .exe suffix on MS Windows).

Set up the Netgraph server

You may skip this step (or parts of it), if you have used one of the installation programs.
There are three steps to setup the Netgraph server:

Set up the main configuration file

Change to the directory you have unzipped Netgraph server to. You have to set a path to a directory containing your FS files (files containing trees; see FS File Format Description). To set the path, edit the file config.txt and change the value of the parameter dir.
Please see the description of the configuration file and all other available parameters.

Set up user accounts

Each user working with Netgraph has to have an account (a login name and a password). The passwords are encoded using algorithm MD5.
Change to the directory you have installed or unzipped Netgraph server to and edit the file passwd.txt.
Each line means one user. To add a new user, make a copy of an existing user (at least user anonymous should be there defaultly), change its name, delete the encoded password, change also other attributes of the user at the line so that they fit the user. The meaning and possible values of each attribute are described at the beginning of the file passwd.txt.
The passwords in the file passwd.txt are server-independent, so you can copy the whole file or one line from one server to another and users will be able to access it as well without a need to change passwords.
(See also a description of the file passwd.txt.)

Set up coreferences

Coreferences are additional dependencies among nodes expressed by color arrows in trees (just like textual or grammatical coreferences in tectogrammatical trees).
There is a file coreferences.txt where coreferences are defined. One line means one coreference pattern.
A coreference pattern uses two attributes from tree annotation - one attribute contains identifier of a node, the other attribute contains reference to an identifier. Please see a detailed description of the format of the file coreferences.txt.

Start the Netgraph server

If you have installed the Netgraph server with one of the installation programs, just click on the icon that should have appeared on your desktop. The following message should appear in a terminal window:
The Netgraph server version 1.93 L (8.4.2008)
The server is trying to bind to the port: 2000 ... OK
The server has started and is waiting for connections.
Otherwise, change to the directory you have installed or unzipped Netgraph server to. You can start the Netgraph server as a common user or as the user nobody. The user has to have permissions to write to the directory /tmp (on MS Windows, the directory is usually in C:\cygwin\tmp).
You have to choose the port on which the server (netser) will wait for a request from a client, greater than 1024 (e.g. 2000).
To start netser, change to the directory where the files netser and dotser (on MS Windows, netser.exe and dotser.exe) are and type:
On Linux:
nohup netser port_number & (e.g. nohup netser 2100 &)
or:
netser port_number (e.g. netser 2000), if you do not want to use nohup. In this case, if you close the terminal which you have started the Netgraph server from, the Netgraph server will exit as well.
On Windows:
netser.exe port_number (e.g. netser.exe 2000).
The default number of the port (used if you do not specify any port) is 2000.
Netser waits for a request from a client, then starts a new process netser and waits for another request from another client. The newly created netser starts a new process dotser, which is the main part of the server. The new netser communicates with the client and passes messages between the client and the dotser.

Uninstallation of the Netgraph server

If you have used one of the installation programs, an uninstallation script should also have been installed along with the server.

If you have installed the server manually, it is sufficient to delete the directory you have installed it to. For the server on MS Windows, directory C:\cygwin should be removed too, but only in case that you did not have cygwin installed before separately.