source: TI03-DataExtractor/branches/old_stuff/dx_source/for_usr_local/dx/doc/INSTALLATION.txt @ 793

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI03-DataExtractor/branches/old_stuff/dx_source/for_usr_local/dx/doc/INSTALLATION.txt@793
Revision 793, 7.0 KB checked in by astephen, 13 years ago (diff)

Put all the old code in the old_stuff branch.

Line 
1Data Extractor Installation Manual
2==================================
3
4DX in 2 lines:
5====================
6A python-based selection, sub-setting and extraction tool for GeoSpatial
7datasets run as a set of Web Services with a CGI or command-line client.
8
9===================
101. VERY QUICK START
11===================
12
13NOTE: You are very unlikely to be able to install dx
14without being root on your system as directories and files
15are being copied in various places.
16
171. Decompress the distribution file with:
18
19$ gunzip dx-0.1.2.tar.gz
20$ tar -xvf dx-0.1.2.tar
21
222. Change directory into the 'dx_source' directory.
23
243. Change the variables in the 'config.py' file to make sure the
25appropriate directories on your machine are pointed to. The minimum
26set of config variables you are likely to need to change is:
27
28- CGI_NAME
29- LOCAL_CGI_NAME
30- VISUALISOR_NAME
31- BASEDIR
32- OUTPUT_DIR
33- HTTP_OUTPUT_DIR
34- USER_HOMEDIR
35- LOCAL_EXTRAS_DIR
36- OUTPUT_FILE_USER
37- OUTPUT_FILE_GROUP
38- REQUEST_XML_DIR
39- HTTP_REQUEST_XML_DIR
40- NAPPY_PATH # For NASA Ames output
41- LOCAL_PYTHONPATH
42- CDAT_BIN_PATH
43
444. Run the setup script:
45
46$ python ./setup.py
47
485. Start the server Web Service running:
49
50$ /usr/local/dx/dxWebServiceInterface.py &
51
526. Try running 'dxui.py' (or whatever you renamed it to) via a web-browser.
53The URL will be that which you defined in the CGI_NAME file in the 'config.py'
54file.
55
56OR...
57
58Try the test script in:
59
60$ /usr/local/dx/scripts/dxTestClient.py
61
62Happy extractions!
63
64Alternatively...
65
66======================
672. MANUAL INSTALLATION
68======================
69
70If the automated setup did not work here is a more detailed explanation.
71
722.1 Requirements and dependencies
73
74You will need the following to run dx on your machine:
75Operating System:
76
77Unix/Linux (tested on RedHat 7.3 and SUSE 9.1).
78Webserver: Tested on Apache (comes as standard in Linux).
79CDAT-3.3 or greater: Includes Python and VCS visualisation package.
80
812.2 Where to get the dx package
82
83The dx package can be downloaded from the author's web
84site at:
85
86http://home.badc.rl.ac.uk/astephens/software/dx/
87
88You will be directed to the latest version in a gzipped tar
89file (.tar.gz).
90
912.3 Contents of the dx package
92
93When you (g)unzip and decompress (tar -xvf) the downloaded
94file you will find the following directories:
95
96i. dx_source/for_cgi_bin/ - this directory contains
97a CGI client script that can call the dx Web Service
98(it is normally called dxui.py). This must be installed
99within a webserver's CGI area (or any directory visible via
100the web with read and execute permission for files).
101
102ii. dx_source/for_usr_local/ - this directory contains
103the actual dx package itself and is usually copied to
104/usr/local/dx/.
105This directory also contain various sub-directories:
106    html/ - holds HTML page content for building a web interface.
107    doc/ - holds documentation for dx.
108The main dxWebServiceInterface.py script is in this directory. This
109script runs the Data Extractor Web Service that can then be called
110by a remote client (such as the dxWebServiceClient.py script). Note
111that you will have to
112
113iii. dx_source/for_static_web/ - this directory contains
114the sub-directory dx_extra (from the dx sister package) which in
115turn holds the CSS style sheet for the web interface and the
116dx logo under the logos directory.
117
118*********THIS SECTION HAS NOT BEEN COMPLETED YET, SORRY!***********
119
120===================
1213. TROUBLE SHOOTING
122===================
123
124Problem: The client reports that it could not connect to the server.
125
126Solution: Make sure you have started the Web Service server script
127that is normally located at /usr/local/dx/dxWebServiceInterface.py.
128This must be running all the time for clients to be able to connect.
129
130Problem: The CGI interface does not work at all.
131
132Solution: Check the paths in the config.py file are all correct.
133Check that the main interface module (normally dxui.py) is
134in a directory that has read and execute permissions (normally
135cgi-bin). Check that the apache webserver is running. You might
136be able to run it using: /usr/sbin/apache2ctl -k start
137
138Problem: The CGI script presents a server error.
139
140Solution: Has your apache web server been set up to allow ".py"
141extensions to run under the cgi-bin/ directory? The method for doing
142this depends from one installation to another but there is normally
143a configuration file that includes the enabling of extension ".pl"
144and ".cgi" under cgi-bin/ so adding ".py" to this list will often do
145the trick. Note that you might have to restart the web server for
146the changes to be picked up.
147
148Problem: A python shelve error occurs such as:
149Traceback (most recent call last):
150  File "<stdin>", line 1, in ?
151  File "/usr/local/cdat-3.3/lib/python2.2/shelve.py", line 158, in open
152    return DbfilenameShelf(filename, flag)
153  File "/usr/local/cdat-3.3/lib/python2.2/shelve.py", line 148, in __init__
154    Shelf.__init__(self, anydbm.open(filename, flag))
155  File "/usr/local/cdat-3.3/lib/python2.2/anydbm.py", line 86, in open
156    return mod.open(file, flag, mode)
157gdbm.error: (2, 'No such file or directory')
158
159Solution: In the interface module (normally dxui.py) add a
160line after the 'sys' module has been imported:
161sys.path.append('usr/lib/python2.2/lib-dynload')
162If this does not work try locating the directory 'lib-dynload' under
163any python installation you have. Then add that diredtory path
164instead of that above.
165
166Problem: You get a 'magic number' error when trying to run one of the
167dx clients.
168
169Solution: When python imports a module, it creates a byte-code compiled
170version with the extension ".pyc". If you are running multiple installations
171of python there may be a problem if the CGI script runs a different version
172to the Web Service (as they both import modules from the same place). The
173recommended solution is to replace the top line of the cgi-bin/dxui.py script
174with the correct version of python used by the server.
175
176Problem: Errors occur saying that modules cannot be found.
177
178Solution: Check that all the paths are correct in the config.py module.
179
180
181
182===============
1834. FUTURE PLANS
184===============
185
186* dx should know when two datasets have been differenced (maybe
187in a variable attribute or just a varname 'xxx_minus_yyy') so it can
188say this is a differenced variable.
189
190* dx should know the length of the variable name and move the
191title across a bit if required on the plot.
192
193* analyse data in dx for feature instances.
194
195* allow 2 variables to go into dx so that scatterplot and vector
196plot capabilities can be exploited.
197
198* dx should allow multiple plots per page
199
200* understand how to plot trajectories etc in vcs, how easily could we
201put that functionality (currently in IDL) under dx.
202
203* dx should be able to take a complete query from B-metadata selection
204(such as search term, geo and temporal constraints) and a result set
205(of URIs). It should be flexible enough to work out what it doesn't
206have and get the user to provide that before delivering.
207
208* introduce long version of templates in case they don't exist.
209
210===========
2115. FEEDBACK
212===========
213
214Please help make dx better by sending me your mods,
215extensions, comments etc.
216
217Ag Stephens (<a.stephens@rl.ac.uk>), BADC, 28th February 2005.
Note: See TracBrowser for help on using the repository browser.