Netgraph Server Installation Manual
last update: April 21st, 2006
Contents
- Introduction
- Installation, set up and start up instructions:
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 your own Netgraph server.
It allows you (and possibly other people) to view and search your own tree database via Internet, using Netgraph client.
Netgraph server is free for academical use. To obtain all the necessary files, please, contact the
author of Netgraph, Jiří Mírovský (mirovsky@ufal.ms.mff.cuni.cz).
There are two parts of the Netgraph server:
You have to install at least the Netgraph server itself. It allows users to view and search tree database via Internet
after they have installed the Netgraph application client.
If you want to allow users to view and search the tree database via an Internet browser without installing
the Netgraph client application,
you need to install and setup the Netgraph client applet. In this case, you also need a web server running
on the same computer as the Netgraph server itself.
Netgraph server installation and start up instructions
- System requirements
- Install the Netgraph server
- Compile the Netgraph server (in case you are installing from the source package)
- Set up the Netgraph server
- Start the Netgraph server
The Netgraph server works and has been tested on Linux (Redhat 6.2 - Fedora Core 5) and Apple MacOS. It should work on other Unix-based systems, too.
An experimental version exists for MS Windows (it uses Cygwin - http://www.cygwin.com).
A source package exists for Linux, Apple MacOS, and Unix-based systems. A binary package is provided for Linux-i386 and MS Windows.
Since version 1.77, Netgraph uses the pcre library (http://www.pcre.org) for processing
regular expressions (since regular expressions in GNU C library do not support UTF-8). The pcre library is a common part of (at least)
Linux distributions and Netgraph server expects it to be compiled with UTF-8 support and to be
installed with prefix pcre (like, for example, the header file /usr/include/pcre/pcre.h). Netgraph with pcre support has only been
tested on Linux so far. Nevertheless, the pcre library also exists for Cygwin and MacOS.
Use a package from the PDT 2.0 disc and follow the instructions from README_QUICK_INSTALL file.
Skip this step, if you have used a binary package.
The following applies for compiling Netgraph server from the source code on Linux, Apple MacOS, and other Unix-like systems.
Change to the directory you have installed Netgraph server to.
To compile the Netgraph server, type:
make
in the shell. All compilation steps should be performed automatically.
There are three steps of setting Netgraph server:
Change to the directory you have installed Netgraph server to.
You have to set a path to a directory containing your fs files (files containing trees; please note that the fs files have to be encoded in UTF-8).
To set the path, edit the file config.txt and change the value of the parameter dir.
(Do not write anything else but spaces between the name of the parameter and its value. There must not be a space in the path itself.)
If the parameter dir is not present in the file config.txt, the actual working directory is used.
There are some other parameters you can set (identifier of the corpus, maximum number of clients allowed to connect simultaneously, etc.) their description is included in the file config.txt.
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 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.
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. There is a detailed description of defining coreference patterns in the file coreferences.txt
Change to the directory you have installed 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.
You have to choose the port on which the server (netser) will wait for a request from a client (e.g. 2100).
To start netser, change to the directory where the files netser and dotser are and type:
nohup netser port_number & (e.g. nohup netser 2100 &)
or:
netser port_number (e.g. netser 2100), 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.
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.
Netgraph client applet installation and start up instructions
If you want to allow users to view tree database via an Internet browser without installing
the Netgraph client application, you have to install and setup the Netgraph client applet.
In this case, you need a web server running on the computer you want to install (or have already installed) the Netgraph server to.
The Netgraph server and the Netgraph client applet have to be installed
on the same computer because of restrictions on unsigned applets
(unsigned applets cannot open an internet connection to another address than the one they have been downloaded from).
There are two steps you have to do:
- install the Netgraph client applet
- set up the Netgraph client applet
Use zip package tools/netgraph/client/applet/netgraph_client_applet.zip from the PDT 2.0 disc.
Choose a directory you want to install the Netgraph client applet to
(it is a good idea to select the same directory as for the Netgraph server),
move to it and unpack the package:
unzip netgraph_client_applet.zip.
The directory structure netgraph/client/applet will be created and several files will be extracted
into the directories applet and netgraph.
Change to the directory netgraph/client/applet.
You have to set the http addresses and the port number in the files NGClient*.html.
Edit the files and change the parameters:
server - to the internet address of the computer hosting the Netgraph server.
c_port - to the port on which the server is waiting for a request.
client_install_url - to the URL address of the directory you have installed Netgraph to
(including the directory name netgraph).
(Setting this allows the Netgraph client to find the directory doc in order to display a help file.)
Since the Netgraph client has been written in Java, you don't have to compile it.
The Java archive file netgraph_client_applet.jar is ready to work.
In the end, you can change some information in the file netgraph/indexEn.html to inform about your own tree database.