Starting the CogServer

From OpenCog
(Redirected from Starting cogserver)

The CogServer can be started in three different ways: from the scheme command line, from the python command line, and from the bash (unix) shell.

Prerequistes

It is assumed that you have already compiled and installed the CogServer. If not, this must be done first. Very briefly, this consists of the steps:

git clone https://github.com/opencog/cogserver
cd cogserver; mkdir build; cd build
cmake ..; make -j
sudo make install

From the bash prompt

The cogserver binary usually installs in /usr/local/bin; make sure this is in your path. Then just say

$ cogserver

or, optionally, specify a config file:

$ cogserver -c cogserver.conf

You should see the following output:

Listening on port 17001
...
...

From the guile prompt

To run it from guile, the cogserver module must be loaded:

guile> (use-modules (opencog) (opencog cogserver))
guile> (start-cogserver)

or, with a config file:

guile> (start-cogserver "/etc/coserver.conf")

Note you can also stop it with (stop-cogserver). You can access documentation as:

guile> ,d start-cogserver 

From the python prompt

Yes, this works. Someone should document it.