These are the instructions for installing a LINCKS database from the DB
directory directly under the top level directory.  Note that if you
can't get this to work as outlined in this file, see the documentation
in the LINCKS system administration manual on how to set up a new
database.

(1) Make sure that you have built and installed the system.  It's not 
    necessary to have installed everything, but rather that all of the
    programs are installed.  This can be done by "make install.progs" in
    the top directory of the source tree.

(2) Make sure that you have set OWNER and HOST correctly in the file 
    ../Make.config.  It is very important that you are on whatever
    machine you set HOST to when you install the database.

(3) Type "make create", which will create a few small files and start up
    a database server.  It tries to start the server based upon where
    you said you were going to install them in ../Make.config.

(4) None of this should fail, but if it does, then the steps that were
    taken are:

    You should substitute $(DBDIR) for your database directory.
    You should substitute $(HOST) for the host where you're running it.
    You should substitute $(OWNER) for the owner of the database.
    You should substitute $(BINDIR) for the directory with executables.

    mkdir $(DBDIR)
    mkdir $(DBDIR)/log
    touch $(DBDIR)/index
    touch $(DBDIR)/1.dat
    touch $(DBDIR)/1.mol
    echo "1.dat" > $(DBDIR)/molecule.names
    echo "1.mol" > $(DBDIR)/data.names
    echo "DBDIR = $(DBDIR)" > $(DBDIR)/.lincksrc
    echo "HOST = $(HOST)" >> $(DBDIR)/.lincksrc
    echo "OWNER = $(OWNER)" >> $(DBDIR)/.lincksrc
    echo "TCPIPNO = 6073" >> $(DBDIR)/.lincksrc
    echo "BINARIES = $(BINDIR)" >> $(DBDIR)/.lincksrc
    echo "LOGDIR = $(DBDIR)/log" >> $(DBDIR)/.lincksrc
    echo "MONITORPROGNO = 572662306" >> $(DBDIR)/.lincksrc
    $(BINDIR)/lincks -s $(DBDIR)
    $(BINDIR)/dbstat $(DBDIR)

    The second last step starts the server, the last checks the status
    of the database server.
    
(5) Type "make installdb", which will run a program to create the system
    root object and then will run a program to load a file into the 
    database.  We've had some trouble running this step, so here are the
    commands that you can run if it fails:

    $(BINDIR)/dbroot -u lincks -p hargle $(DBDIR)
    $(BINDIR)/t2lincks -f Export.t2l -u lincks -p hargle $(DBDIR)

    t2lincks will run for quite a while, so you'll need a little
    patience.  You may get a few messages about connection time outs,
    but you can almost always ignore these :-).
    
    If t2lincks ends with a message about improper termination, 
    
      Improper termination: may need to kill database server process

    it may not be a problem.  We have had difficulty on
    HP's with getting a clean stop on t2lincks.  However, if it says
    that it stored the system root:

      Storing object System Root in database...(0) done.

    then you should be ok.  We'll find out why soon, we hope, but we
    think that the last communication with the database is getting out
    of sync.

(6) After running these last two steps, you're ready to go.  We suggest
    that you first log in using xlincks as the user demo with the password
    demo.  This will give you a brief demo going through some of the
    basic functionality of the LINCKS system.

(7) A list of the passwords for the accounts automatically generated is
    in PASSWDS.
