Sunday, January 23, 2011

AOLserver: a test run

Installation


I am using Arch Linux which has Tcl 8.5 already with threads and shared-library support enabled so that AOLserver builds out of the box. If you are using another Linux version you better check:

$ echo 'puts $tcl_platform(threaded)' | tclsh
1

If instead of 1 you get:

can't read "tcl_platform(thredaded)": no such element in array

you will have to recompile tcl with thread support. This is described in the README file that comes with the AOLserver sources and is pretty easy to do.

Go to http://www.aolserver.com/ and download the latest tarball ATTOW aolserver-4.5.1-src.tar.gz. Untar, configure, make and install:

$ tclsh ./nsconfig.tcl -install /usr/local/aolserver
$ make
$ su
# make install

Note: to avoid cluttering up your system I advice you to change the default installation path from /usr to something like /usr/local/aolserver as I did above.

Now create a system user to run AOLserver with, because running it as root is neither recommended nor allowed:

# useradd -d /usr/local/aolserver -s /bin/false aolserver
# cd /usr/local/aolserver/
# chown aolserver:aolserver log servers/server1/modules

Default configuration


# cd /usr/local/aolserver
# cp base.tcl nsd.tcl
# vi nsd.tcl

Starting the server


# cd /usr/local/aolserver
# LD_LIBRARY_PATH=./lib ./bin/nsd -ft nsd.tcl -u aolserver

Then with any browser go to:

http://localhost:8000/

and you should see a greeting page.

Resources


No comments: