Difference between revisions of "WCS Wrapper Installation LinuxOP"
Line 4: | Line 4: | ||
= Installation on a Linux workstation or server: = | = Installation on a Linux workstation or server: = | ||
+ | |||
+ | '''THIS PAGE IS BADLY OUT OF DATE AND NEEDS TO BE REWRITTEN''' | ||
+ | |||
+ | |||
== notes/before you begin == | == notes/before you begin == | ||
* this package has been tested with Python 2.5 and should also run on version 2.6 without problems, 3.x is not supported yet | * this package has been tested with Python 2.5 and should also run on version 2.6 without problems, 3.x is not supported yet |
Revision as of 11:33, July 27, 2010
Questions and Comments should be directed to Kari Hoijarvi hoijarvi@me.wustl.edu 314-935 5772 and Michael Decker m.decker(at)fz-juelich.de
Installation on a Linux workstation or server:
THIS PAGE IS BADLY OUT OF DATE AND NEEDS TO BE REWRITTEN
notes/before you begin
- this package has been tested with Python 2.5 and should also run on version 2.6 without problems, 3.x is not supported yet
- system-wide installation of packages will require root access to the system
- it is theoretically possible to install all packages to a user directory, but it might be somewhat tricky and will not be covered here
- for installation of 3rd party python packages it is recommended to use easy_install
- download the installer file matching your Python version and execute it on a shell as instructed
- 3rd party packages will receive updates over time. the last tested version of every package is noted below
- all required packages except for PyNIO can be installed via easy_install, so don't bother to download them in advance
- unfortunately you will have to jump through some hoops for PyNIO. check out the PyNIO/NGL download page for instructions on how to obtain and install it
required 3rd party software
You have to install the packages listed below first in order to run the OWS server. Use easy_install for all except PyNIO (see above)
- webpy (0.32)
- lxml (2.2.2)
- might require additional development/header packages to be installed on your system (python-dev, libxml2-dev, libxslt1-dev, zlib1g-dev on Debian)
- NumPy (1.3.0)
- you should have a fortran compiler installed for that, for example gfortran on Debian
- WsgiLog (0.1) (optional, only if you want to log webpy output to a file)
- PyNIO (1.3.0b1)
- 1.3.0b1 depends on libgfortran1 which is not part of debian stable/testing any more, you will have to pull it from oldstable (http://mirrors.kernel.org/debian/pool/main/g/gcc-4.1/libgfortran1_4.1.1-21_i386.deb for i386) and install it manually by copying the library file to /usr/lib and running ldconfig
- newer releases of PyNIO will hopefully depend on a more recent libgfortran2/3
install and start OWS server
- get the OWS code package for Linux
- unpack to your desired working directory, the contents of the archive will end up in ./ows
- these instructions assume that your working directory is /usr/local/, so the package contents would end up in /usr/local/ows
- add the path of the extracted ows directory to your PYTHONPATH environment variable
- if you followed the above example, PYTHONPATH should contain /usr/local/ows
- cd to ows/web and execute python ows.py
- a server should be running on http://localhost:8080/ now
- a different port can be passed to the server as an argument
- you will have to create the log directory /var/log/ows before running the server for the first time
- if the server is not being run as root, the user that runs it needs write access to the log dir
- you can stop the server by pressing ctrl-c in the console window
- to make the server available automatically at boot time, you can use an init script
- an example script that starts the OWS server in a screen session as another user is available here
example installations
Debian
- typescript of installation on fresh and minimal Debian stable: http://htap.icg.fz-juelich.de/downloads/debian_typescript.txt
Creating Metadata
The metadata queries of WCS, GetCoverage and DescribeCoverage need to be precompiled.
Run the following commands:
- cd /usr/local/OWS/web
- python owsadmin.py wcs_cap -v 1.1.0 -d localhost testprovider
- python owsadmin.py wcs_desc -v 1.1.0 testprovider
They will create files /usr/local/ows/web/static/testprovider/wcs_1.1.0_capabilities.xml and /ows/web/static/testprovider/wcs_1.1.0_desc_CubeA.xml. The capabilities file contains all the coverages that this provider has, and each coverage gets its own desc file.
Try now test queries GetCapabilities and DescribeCoverage CubeA
Press ctrl+C to terminate the server. Although this server is intended for development and debugging only, you can use it to server data from your own workstation just fine. For high load sites, look webpy.org/install documentation how to set up a high load site.
Notice: WCS core functions are written in C/C++, enabling large amount of data delivery. Python is used only for query parsing, making minimal impact in speed.
The server returns a short XML document, which contains a link into the query result, you can download it by copying the url to your browser.
index.html Pages
If no query is present, the server gives a default page index.html. You should provide pages for your server and for all the providers.
The server is at /usr/local/ows/web/static/index.html, which will be displayed from url http://localhost:8080/
Every provider can have an own index.html like /usr/local/ows/web/static/testprovider/index.html which will be displayed from http://localhost:8080/testprovider
If you modify the default index.html, make sure not to overwrite it next time you upgrade the WCS Wrapper package. Keep the main copy elsewhere and copy it back.
Important! web.py development server requires, that text files have Unix-style end of line marker, plain LF and not the Windows convention CR-LF. The owsadmin.py script can be used to fix this:
- python /usr/local/OWS/web/owsadmin.py unix_nl "/usr/local/OWS/web/static/testprovider/index.html"
Use your html editing tool support if possible.