AcePerl

 view release on metacpan or  search on metacpan

docs/ACEDB.HOWTO  view on Meta::CPAN

will see messages like this:

   // Database directory: /usr/local/acedb/elegans
   // Shared files: /usr/local/acedb
   // #### Server started at 2003-05-12_11:54:13
   // #### host=brie3.cshl.org  listening port=5000
   // #### Database dir=/usr/local/acedb/elegans/
   // ####  Working dir=/usr/local/acedb/elegans/
   // #### clientTimeout=600 serverTimeout=600 maxbytes=102400 autoSaveInterval=600

The messages will stop, indicating that the server is waiting for
incoming connections.

In the other window, launch saceclient with this command:

      % ~acedb/bin/saceclient localhost -port 5000

It will prompt you for a userid (type "admin") and a password (type
the password).  If all goes well, you will get this prompt:

      acedb@localhost> 

and the server will accept queries.  For example, try the command
"Find Model".

3) Try to communicate with the server using aceperl.

When you installed AcePerl, it should have installed a small interface
script named ace.pl.  Confirm that it can talk to the server:

    % ace.pl -host localhost -port 5000

By default, you will get an "anonymous" read only connection, and you
will see the prompt: 

    aceperl>

indicating that the database is ready to accept queries.

4) Shut down the server.

When you are ready, shut down the server like this:

   % ace.pl -host localhost -port 5000 -user admin -pass acepass
   aceperl> shutdown now

5) Try running the server as the "acedb" user.

If you are going to be running the acedb server a lot, it is better to
run it under the "acedb" account than under your personal login.  The
reason for this is that bugs in the acedb server code may
inadvertently expose your personal files to snooping or deletion if
the server is running under your personal ID.

To run the server as acedb, you must make its database files writable
by the acedb user.  To do this, become the root user, and run the
following commands:

  # chown -R acedb ~acedb/elegans/database
  # chgrp -R acedb ~acedb/elegans/database
  # chmod -R +rw ~acedb/elegans/database

Replace the path ~acedb/elegans with the path to the database that you
want to be accessible.  What this is doing is to make the "database"
subdirectory owned by the acedb user and writable by it.

Still running as root, become the acedb user:

  # su acedb

Now confirm that you can still launch the server:

  % ~acedb/bin/sgifaceserver ~acedb/elegans 5000

and talk to it:

  % ace.pl -host localhost -port 5000

Congratulations.  You're almost done.  The last step is to arrange for
the acedb socket server to start up automatically when needed.

GETTING THE SERVER TO START AUTOMATICALLY

There are two recipes for this, depending on whether your system uses
standard "inetd" "super daemon" to start up services on an as-needed
basis, or uses the new enhanced version called "xinetd."  The way to
tell is to look in your /etc directory.  If you see a file named
inetd.conf, then you are using the traditional inetd daemon.  If you
see instead a directory named xinetd.d/ then you are using xinetd.

1) Configuring for inetd:

  a) Find the file /etc/services, and add the following line to the
      end of the file:

     elegans   5000/tcp

     This is defining a new service named "elegans" which runs on
     port 5000.  You can change this symbolic name to anything you
     like.  If you have multiple acedb databases running, give each
     one a distinctive name and port number.  Avoid using any port
     numbers that are already mentioned in the file.

   b) Find the file /etc/inetd.conf, and add the following line:

    elegans  stream  tcp wait acedb  /usr/local/acedb/bin/sgifaceserver
            sgifaceserver /usr/local/acedb/elegans

    This is all one line, but has been word-wrapped to fit.

    The first field refers to the service named "elegans" that you
    defined in /etc/services and is necessary for inetd to associate
    the service with the proper port number.  Modify as you see fit.

   c) Tell inetd to reread its configuration files.  Use "ps" to find
      the ID of the inetd daemon like this:

      # ps -elf | grep inetd
      140 S root       121     1  0  68   0    -   475 do_sel May11 ? 00:00:00 /usr/sbin/inetd

      and use "kill -HUP" to tell the server to reread inetd.conf



( run in 0.454 second using v1.01-cache-2.11-cpan-39bf76dae61 )