SARA Server Build Configuration

Before building the server, decide where the corpus is going to live. The recommended place is /corpus, with the following structure:

   /


    +----corpus


          +----1.0


          |     +----A


          |     :    :


          |     +----K


          +----Index


          |     +----etc


          |     +----idx000


          |     :    :


          |     +----idxNNN


          +----adm


          |     +----a


          |     :    :


          |     +----z


          +----bin         


      

The rest of these instructions assume you're using /corpus as the base directory; if you've chosen a different root directory use this instead of /corpus.


Once you've decided where to put everything, you must create a corpus.prm file in the /corpus/adm (or equivalent) directory. configure extracts some information from this file; in the future it may extract more.

Next, create a directory to keep the server source in; /corpus/src is a good place. Unpack the tar file in this directory:


   server% mkdir /corpus/src


   server% cd /corpus/src


   server% tar xf /path/to/where/you/put/sara.tar


   server% ls


   Makefile.tmpl  corpents.c     corpprm.c      corpwl.c       solve.c


   configure      corpfrob.c     corpqy.c       endian.c


   corpadm.c      corpfuns.h     corpserv.c     exttypes.h


   corpdefs.h     corphash.c     corpuser.c     localize.c


   corpelts.c     corppq.c       corpuser.h     localize.h


   server%


      

Running configure

Run configure in the /corpus/src directory and answer the questions it asks. configure will offer default values between brackets; to choose the default just press <RETURN>.

This example shows configuring the server on a Digital UNIX system, with the corpus tree "rooted" in /usr/local/corpus.


server% ./configure



------------------------------------------------------------


Target system.... alpha-osf1-3.2


C Compiler....... cc


Compiler flags... -std1


Linker flags.....


Extra libraries..


------------------------------------------------------------


      

This should match your system. If it doesn't, configure will try and guess how to drive the C compiler; you may need to fix the Makefile by hand.

Systems that configure knows about are:

  • SunOS (4.1.3)
  • Digital Unix (3.2C)
  • Ultrix (4.4)

    NOTE On Ultrix systems edit the configure script and change the first line from #!/bin/sh to #!/bin/ksh

  • Solaris (2.3)
  • Linux
Runtime localization (all,index,none) [none]:


> <RETURN> 


      

You should only be asked this if your system is little-endian. Many of the files in the corpus are big-endian and should be "localized" on little-endian machines. This localization can be done at run-time or at installation time, or a combination of both.

It is recommended that you localize all the data at installation time, so you should select the default of no runtime localization.

------------------------------------------------------------


Base Directory directory [/corpus]:


> /usr/local/corpus


      

You should enter the directory into which you installed the corpus. The recommended location is /corpus; /usr/local/corpus is only used here as an example.

Directory for Executables directory [/usr/local/corpus/bin]:


> <RETURN> 


      

The corpadm, localize, saradand solve programs are installed in this directory.

Accounts Directory (ACC) directory [/usr/local/corpus/adm]:


> <RETURN> 


      

This directory contains 26 subdirectories (a to z, created during installation) which contain user account files.

A log of all user accesses is also kept in this directory (admlog), as is a file containing the process ID of the current parent server (sarad.pid).

Misc. Directory (ETC) directory [/usr/local/corpus/Index/etc]:


> <RETURN> 


      

Normally, this should be the same as the ETC entry in corpus.prm.

Bibliography Directory (BIB) directory [/usr/local/corpus/Index/etc]:


> <RETURN> 


      

Normally, this should be the same as the BIB entry in corpus.prm.

Corpus Text Directory (TXT) directory [/usr/local/corpus/1.0]:


> <RETURN> 


      

Normally, this should be the same as the TXT entry in corpus.prm.

Temporary Directory (TMP) directory [/tmp]:


> <RETURN> 


      

This should usually be /tmp, unless it's incredibly small, in which case you should use another directory.

------------------------------------------------------------


Default parameter file [/usr/local/corpus/adm/corpus.prm]:


> <RETURN> 


      

The default parameter file must contain at least one IDX definition, as configure uses this file to determine which index directories should be localized.

------------------------------------------------------------


Default TCP Port [7000]:


> <RETURN> 


      

If you're running a X11 font server or AFS you'll probably need to change this. You can use the netstat command to find out if any other server is using this port

------------------------------------------------------------


Make Account Files group-writable [yes]


> <RETURN> 


      

Making the account files group-writable allows more than one person to administer the server; you should create a new group and put all the SARA administrators into it. If the server is run under a special username that username should also be in the group. Make sure that /corpus/adm is group-owned by that group (and group-writable).

If you choose not to make the account files group-writable /corpus/adm and everything under it must be owned by the username that the server runs under.

------------------------------------------------------------


Syslog() Facility [LOCAL7]


> <RETURN> 


      

After choosing a suitable syslog() facility, make sure you change /etc/syslog.conf to log messages to that facility into an appropriately located file. Make sure that file exists (use the touch command) and send a SIGHUP to the syslog daemon.

Unless you want lots of debugging information in the log file, set the log priority to info, e.g if you are using LOG_LOCAL6 the entry in syslog.conf would be

      local6.info    /path/to/log/file


      
------------------------------------------------------------


Creating Makefile from Makefile.tmpl...



Configuration finished Tue Mar 12 22:53:40 GMT 1996


server%


      

At this point you may want to have a quick look at the Makefile, especially if configure didn't recognise your system.

If grep '@.*@' Makefile produces any output you'll need to fix the Makefile.


Building the server

If you've got this far you should be able to build the server:

   server% cd /corpus/src


   server% make


   ...


   server%


      

If make succeeded with no errors you can now install the server; this will also create all the account directories in /corpus/adm and do all the necessary localizations. If you're doing the installation on a little-endian system this is probably a good time to have lunch.

HINT If your system is little endian do the installation from a terminal with a large scroll buffer; if you've got X11 use xterm -sl 5000.

   server% make install     ...        

Now you're ready to test your system. First, run corpadm to create a default user name and account:

   server% corpadm


   corpadm> add guest


   Real name? Default User Name


   Organization? A Wonderful Thing In Its Place


   Contact Address? <RETURN>


   Expiration Date (dd/mm/yyyy)? <RETURN>


   Password? guest


   corpadm: Created user fred


      

Next, start the server by executing the sarad command:

   server% /corpus/bin/sarad -p /usr/local/etc/corpus.prm


   Started server


   server%


      

To check that all is well, try running the solve client program:

  server% solve frogspawn


Connected!8 solutions


OK CH1 8692 10 9 AJ0  Seaweed, frogspawn, flies, spiders, squirrels, sheep — phenomena as unlikely as the weather itself 



OK CM4 2514 70 9 AJ0  The warpscreen might have been a tank choked with bubbling prismatic frogspawn.


OK ECU 2464 50 9 AJ0  He looked at the bubbles intently: they could be frogspawn or snow just fallen, or clouds, or millions 


OK G03 1095 113 9 AJ0  If some sheikh wants a son and he needs a push from technology, he sends over a couple of wives and a bottle of frogspawn.


...


OK KST 5288 32 9 AJ0  The frog's have laid some more frogspawn out there.


server%


    

For more details of the programs supplied with the server, see the server tools documentation.

For information about installation and running of the MS Windows SARA Client, see the Windows client documentation