MIDAS Web Service download and installation
In these notes replace [MIDASBASE] with the base of your software installation (default is /MIDAS)
Linux: Create a directory [MIDASBASE] and make this your current directory. Use tar -z -x -f to extract the downloaded archive into the current directory. Set the environment variable MIDASBASE to the full pathname of the directory. From this directory (for the 64 bit Linux version) run the command TclHttpd/Linux64/TclHttpd-server.
For other Linux based versions (such as Linux (Intel 32 bit) and Linux for ppc processor cores) use the appropiate directory in TclHttpd.
Windows: Use a program such as winzip or tar with cygwin to extract the downloaded archive and create a directory c:\MIDAS. The directory c:\MIDAS\TclHttpd\Win contains a command file StartUp.cmd to start the Web Server which runs in a command prompt window. This command file also starts the ShObjManager which is used by various components of the software (for example NetVar) to implement Linux-type persistent shared memory.
On startup the server looks in a number of places in the [MIDASBASE]/config/TclHttpd directory for a configuration file. There are sample configuration scripts for all services in the directory [MIDASBASE]/config/TclHttpd/Samples. The default startup file used by the TclHttpd software is [MIDASBASE]/config/TclHttpd/startup.tcl.
puts "This file is /MIDAS/config/TclHttpd/startup.tcl" puts "It should be customised with commands to load and run the Web services you require." puts "Look in the online documentation and the Samples directory for examples of these commands" package require HelloServer package require TimeServerThis will start the demonstration Time Service. See here for more information.
System identified is CPU x86_64; Platform is unix; OS is Linux and Version is 2.6.18-128.1.6.el5xen Environment selected is CPU x64_64; Platform unix and OS Linux64 can't find package limit Running with default file descriptor limit /debug user "debug" password "+t=u0y3gt6m5" httpd started on port 8015 secure httpd started on SSL port 8016 Cannot use /MIDAS/config/TclHttpd/nnsv/startup.tcl Cannot use /MIDAS/config/TclHttpd/localhost/startup.tcl /TimeServer Completed custom startup from /MIDAS/config/TclHttpd/startup.tcl
Finally use a Web Browser to contact the URL http://[myhost]:8015 where [myhost] is the network name of the system on which you have installed the software (this could be localhost).
Many services use the MessageLogger possibly connected to an ELog. The MessageLogger client software can be installed by adding
set MessageLoggerServerHost nndhcp077 package require MessageLoggerClientto the startup file (default - [MIDASBASE]/config/TclHttpd/startup.tcl). The variable MessageLoggerServerHost is the name of the system running the MessageLogger service. This is by default localhost. See here for full information.
It is possible (optionally) to configure the Web Base Page for your installation. This is done by adding Setting commands into the startup file.
puts "This file is /MIDAS/config/TclHttpd/startup.tcl" puts "It should be customised with commands to load and run the Web services you require." puts "Look in the online documentation and the Samples directory for examples of these commands" Setting BGColor "BlanchedAlmond" Setting TextColor "red" Setting ProjectName AGATA Setting ProjectImage agata_banner.png Setting Option1Name STFC Setting Option1URL "stfc.ac.uk" Setting Option1Image stfc.jpg package require HelloServer package require TimeServerThe images should be placed into the directory [MIDASBASE]/TclHttpd/Html/images.
V Pucknell; STFC; Daresbury Lab 9 July 2009