Appion Home » History » Version 28
Amber Herold, 04/01/2010 11:04 AM
1 | 1 | Eric Hou | |
---|---|---|---|
2 | 11 | Amber Herold | h1. Complete Installation |
3 | 6 | Amber Herold | |
4 | |||
5 | 1 | Eric Hou | |
6 | 16 | Amber Herold | |
7 | 11 | Amber Herold | h2. Four Parts of Leginon System |
8 | 1 | Eric Hou | |
9 | 11 | Amber Herold | |
10 | 16 | Amber Herold | !http://emg.nysbc.org/software/leginon/images/images/Leg_Proj_parts.png! |
11 | 1 | Eric Hou | |
12 | 11 | Amber Herold | Leginon as a system that we distribute can be divided into three parts: |
13 | 1 | Eric Hou | |
14 | 6 | Amber Herold | |
15 | 16 | Amber Herold | |
16 | 11 | Amber Herold | h2. Processing Server (Python-side) |
17 | 1 | Eric Hou | |
18 | |||
19 | 11 | Amber Herold | Python (and some c) scripts that handle instrument control, data acquisition, and |
20 | processing. |
||
21 | 1 | Eric Hou | |
22 | |||
23 | |||
24 | |||
25 | 16 | Amber Herold | |
26 | 11 | Amber Herold | h2. Database Server (MySQL-side) |
27 | 1 | Eric Hou | |
28 | 11 | Amber Herold | |
29 | a MySQL server that handles the database |
||
30 | |||
31 | |||
32 | 1 | Eric Hou | |
33 | 11 | Amber Herold | |
34 | 16 | Amber Herold | |
35 | 11 | Amber Herold | h2. Web Server (PHP-side) |
36 | |||
37 | |||
38 | This includes php and Java scripts at a webserver that we will create to retrieve image |
||
39 | and metadata from the database and file-storage system. |
||
40 | |||
41 | |||
42 | 1 | Eric Hou | |
43 | 11 | Amber Herold | |
44 | 16 | Amber Herold | |
45 | 11 | Amber Herold | h2. File Server |
46 | |||
47 | |||
48 | This is up to you to set up to store lots of data coming out of Leginon system. |
||
49 | |||
50 | |||
51 | |||
52 | |||
53 | 1 | Eric Hou | |
54 | 11 | Amber Herold | |
55 | 16 | Amber Herold | |
56 | 11 | Amber Herold | h2. What is in this chapter |
57 | |||
58 | |||
59 | |||
60 | Leginon runs under both the Linux and Microsoft Windows Operating systems. However, the |
||
61 | current php-mrctool can not be installed on Windows which means mrc images can not be viewed |
||
62 | on the web. See the section on Possible Computer Set-up Configurations for details. |
||
63 | |||
64 | |||
65 | The many components for the Leginon system are divided into packages and need to be |
||
66 | installed separately. It has been integrated with several third party software packages that |
||
67 | are necessary for its operation. The installation documentation will describe how to set-up |
||
68 | Leginon and give hints as to how to install and set-up the necessary third-party software. |
||
69 | This documentation is not intended to support the additional, but necessary third-party |
||
70 | software. |
||
71 | |||
72 | |||
73 | There has been interest in installing Leginon under Mac OS X. While this is possible in |
||
74 | theory, we have not been successful in installing a fully functional system. The two main |
||
75 | problems are (1) compilation of php-mrctool from the pre-installed php and (2) wxPython on Mac |
||
76 | is unable to hide bitmap objects which makes Leginon graphical user interface difficult to |
||
77 | use. |
||
78 | |||
79 | |||
80 | 27 | Amber Herold | See <link linkend="InstT_install">Installation Troubleshooting</link> and <ulink |
81 | url="http://emg.nysbc.org/bb/viewforum.php?f=2">Leginon Bulletin Board</ulink> searching |
||
82 | 11 | Amber Herold | for "install" if you run into problems. |
83 | |||
84 | |||
85 | 1 | Eric Hou | |
86 | 11 | Amber Herold | |
87 | 16 | Amber Herold | |
88 | 11 | Amber Herold | h2. Possible Computer Set-up Configurations |
89 | |||
90 | |||
91 | |||
92 | Computer(s) used for the whole Leginon system need to support five functions: |
||
93 | * TEM/Camera control and data output (by python-side packages of Leginon |
||
94 | system) |
||
95 | |||
96 | |||
97 | *The computer attached to the microscope/camera is used for this function. |
||
98 | Therefore, it is on a Windows computer. |
||
99 | |||
100 | |||
101 | * General Leginon operation such as target selection and image processing (processing |
||
102 | server of Leginon system) |
||
103 | |||
104 | |||
105 | * Image data storage. |
||
106 | |||
107 | |||
108 | * Other meta-data storage through MySQL database (by database server of Leginon |
||
109 | system) |
||
110 | |||
111 | |||
112 | * Web server (using PHP-side of Leginon system). |
||
113 | |||
114 | |||
115 | *Important* The MRC module that is used to load mrc formatted files to the web |
||
116 | pages is not compiled on Windows. Therefore, this function must be on a linux box unless |
||
117 | you don't need to see the images*** |
||
118 | |||
119 | |||
120 | |||
121 | |||
122 | |||
123 | The five functions can be distributed to five different computers on a network or all on |
||
124 | one single computer. However, since the latter minimal setup requires the use of the computer |
||
125 | attached to the microscope for all functions, it is not advisable. |
||
126 | |||
127 | |||
128 | Processing server of Leginion is a multi-platform software, meaning it can run on both |
||
129 | Microsoft Windows and Linux. It is also inherently designed to utilize distributed systems on |
||
130 | a network. MySQL used in the database server is also supported by multiple platforms. This is |
||
131 | not true for the Web server because the custom MRC module used in the web viewer only compiles |
||
132 | on linux machines. Therefore, one of the computer not part of the microscope must be a linux. |
||
133 | The following examples show several arrangements that take advantage of distributed system. |
||
134 | Other combinations are possible, but will basically be variations on one of the following |
||
135 | themes. |
||
136 | 1 | Eric Hou | |
137 | 11 | Amber Herold | |
138 | 16 | Amber Herold | |
139 | 11 | Amber Herold | h2. A: 1 Windows computer (attached to the Microscope) & 1 Linux computer (for all |
140 | other functions, separate from the Microscope) (Good for single user and small-scale |
||
141 | acquisition) |
||
142 | |||
143 | |||
144 | |||
145 | |||
146 | |||
147 | * Install the latest processing server side of Leginon release (and supporting |
||
148 | packages) on the Windows computer controlling the microscope and on the Linux computer |
||
149 | which is to run Leginon image acquisition and processing. |
||
150 | |||
151 | |||
152 | * Install the additional modules needed for CCD camera and film interaction on the |
||
153 | Windows computer controlling the microscope. |
||
154 | |||
155 | |||
156 | * Install MySQL, PHP, the Apache Web Server, and dbem tools only on the Linux |
||
157 | computer that will perform these functions, (i.e. NOT the computer controlling the |
||
158 | microscope). |
||
159 | |||
160 | |||
161 | |||
162 | |||
163 | |||
164 | |||
165 | 1 | Eric Hou | |
166 | 11 | Amber Herold | |
167 | 16 | Amber Herold | |
168 | 11 | Amber Herold | h2. B: 1 Windows computer (attached to the Microscope) & 4 Linux computers (one for |
169 | each function) (Good for multiple microsopes, users and large-scale acquisition) |
||
170 | |||
171 | |||
172 | |||
173 | This is the set-up at NRAMM. It has the processing server side of Leginon installed on |
||
174 | the Windows computer attached to the microscope and on the Linux computer that is used for |
||
175 | running Leginon. A second Linux machine is dedicated to the database while the web-based |
||
176 | viewer is hosted by another server. |
||
177 | |||
178 | |||
179 | |||
180 | |||
181 | * Install the python-side Leginon (and supporting packages) on the Windows computer |
||
182 | controlling the microscope and on the Linux computer that is to run Leginon. You can |
||
183 | make the latter installation accessable to any numbers of linux computers on your |
||
184 | network. |
||
185 | |||
186 | |||
187 | * Install MySQL, PHP, the Apache Web Server, and dbem tools on the second Linux |
||
188 | computer that will serve as the database/web server/PHP host. |
||
189 | |||
190 | |||
191 | * The computer hosting the data storage should be accessable by all linux |
||
192 | boxes. |
||
193 | |||
194 | |||
195 | |||
196 | |||
197 | |||
198 | |||
199 | 1 | Eric Hou | |
200 | 11 | Amber Herold | |
201 | 16 | Amber Herold | |
202 | 11 | Amber Herold | h2. C: 1 Windows computer (attached to the Microscope), 1 Windows computer running python- |
203 | and MySQL-side functions and 1 Linux computer as web server (Has been applied |
||
204 | successfully) |
||
205 | |||
206 | |||
207 | |||
208 | The data storage may be on one of these computers that is accessable by other |
||
209 | computers. |
||
210 | |||
211 | |||
212 | |||
213 | |||
214 | 1 | Eric Hou | |
215 | 11 | Amber Herold | |
216 | 16 | Amber Herold | |
217 | 11 | Amber Herold | h2. Ports that Leginon system uses: |
218 | |||
219 | |||
220 | |||
221 | This information is useful if you want to open specific ports between computers with a |
||
222 | firewall in between. |
||
223 | |||
224 | |||
225 | |||
226 | |||
227 | * MySQL normally uses port 3306 (but configurable in /etc/my.cnf) |
||
228 | |||
229 | |||
230 | * Leginon Client running on TEM host: port 55555 |
||
231 | |||
232 | |||
233 | * Leginon main program on the processing server: dynamically assigned ports between |
||
234 | 49152 and 65535 |
||
235 | |||
236 | |||
237 | There is no strict port assignment since we could potentially have more than one |
||
238 | Leginon process running on the same linux host talking to different TEM hosts. It is |
||
239 | probably good enough if you only worry about opening up the first few of those ports in |
||
240 | your firewall (maybe 49152 through 49160, or something like that). |
||
241 | 1 | Eric Hou | |
242 | |||
243 | 27 | Amber Herold | See more discussion at Leginon bulletin board thread on "<ulink |
244 | url="http://emg.nysbc.org/bb/viewtopic.php?t=7">network problem, Leginon not seeing |
||
245 | tecnai host</ulink>" |
||
246 | 11 | Amber Herold | |
247 | |||
248 | |||
249 | |||
250 | |||
251 | |||
252 | 1 | Eric Hou | |
253 | 11 | Amber Herold | |
254 | 15 | Amber Herold | |
255 | 1 | Eric Hou | h2. Where to Register and download Leginon system |
256 | 11 | Amber Herold | |
257 | |||
258 | |||
259 | 28 | Amber Herold | "http://www.leginon.org/":http://www.leginon.org is the home. Please |
260 | 11 | Amber Herold | register if you want to recieve support from Leginon team. |
261 | |||
262 | 1 | Eric Hou | |
263 | * python-side Leginon packages |
||
264 | |||
265 | 23 | Amber Herold | |
266 | 26 | Amber Herold | direct link: <ulink url="http://emg.nysbc.org/software/leginon/" |
267 | 25 | Amber Herold | >http://emg.nysbc.org/software/leginon/</ulink> |
268 | 1 | Eric Hou | |
269 | 11 | Amber Herold | |
270 | 25 | Amber Herold | * mrctools: including the tools for reading mrc images on the web |
271 | 1 | Eric Hou | |
272 | 11 | Amber Herold | |
273 | 25 | Amber Herold | direct link: <ulink url="http://emg.nysbc.org/software/mrctools/" |
274 | >http://emg.nysbc.org/software/mrctools/</ulink> |
||
275 | 23 | Amber Herold | |
276 | 1 | Eric Hou | |
277 | 25 | Amber Herold | * dbemtools: including the tools for administration and webviewing |
278 | 23 | Amber Herold | |
279 | 1 | Eric Hou | |
280 | 25 | Amber Herold | direct link: <ulink url="http://emg.nysbc.org/software/dbemtools/" |
281 | >http://emg.nysbc.org/software/dbemtools/</ulink> |
||
282 | 1 | Eric Hou | |
283 | 25 | Amber Herold | |
284 | * project tools (optional): For administration and webviewing of projects |
||
285 | |||
286 | |||
287 | direct link: <ulink url="http://emg.nysbc.org/software/dbemtools/" |
||
288 | >http://emg.nysbc.org/software/dbemtools/</ulink> |
||
289 | |||
290 | |||
291 | |||
292 | |||
293 | |||
294 | |||
295 | |||
296 | h2. Processing server-side Leginon Installation |
||
297 | |||
298 | |||
299 | |||
300 | 11 | Amber Herold | For the lack of better name, processing server-side Leginon refers to packages that |
301 | 1 | Eric Hou | performs the general functions of image acquisition and processing. The instructions here are |
302 | 11 | Amber Herold | for Linux. Refer to Windows Installation for Windows specific instructions. |
303 | |||
304 | 1 | Eric Hou | |
305 | |||
306 | 11 | Amber Herold | h2. Download svn checkout script from Leginon website |
307 | |||
308 | |||
309 | |||
310 | 28 | Amber Herold | "http://www.leginon.org/":http://www.leginon.org/ Download |
311 | 15 | Amber Herold | svnget-1.6.sh to a convenient location such as your home directory. |
312 | 11 | Amber Herold | |
313 | |||
314 | |||
315 | |||
316 | 16 | Amber Herold | |
317 | 11 | Amber Herold | h2. Check out SVN Source Files from the depository |
318 | |||
319 | |||
320 | |||
321 | run svnget-1.6.sh. It does the |
||
322 | 17 | Amber Herold | following:<pre>mkdir Leginon-1.6-ALL |
323 | 11 | Amber Herold | cd Leginon-1.6-ALL |
324 | svn co http://emg.nysbc.org/svn/leginon/branches/1.6 Leginon |
||
325 | 1 | Eric Hou | svn co http://emg.nysbc.org/svn/pyami/branches/leg1.6 pyami |
326 | 11 | Amber Herold | svn co http://emg.nysbc.org/svn/pyScope/branches/leg1.6 pyScope |
327 | svn co http://emg.nysbc.org/svn/sinedon/branches/leg1.6 sinedon |
||
328 | svn co http://emg.nysbc.org/svn/numextension/branches/leg1.6 numextension |
||
329 | svn co http://emg.nysbc.org/svn/libcv/branches/leg1.6 libcv |
||
330 | svn co http://emg.nysbc.org/svn/ImageViewer/branches/leg1.6 ImageViewer</pre> |
||
331 | |||
332 | |||
333 | If the process fails, you probably do not have svn client installed. Skip to "Install |
||
334 | the supporting packages first if missing:", then try this again. |
||
335 | |||
336 | |||
337 | |||
338 | |||
339 | 16 | Amber Herold | |
340 | 11 | Amber Herold | h2. Perform system check: |
341 | |||
342 | |||
343 | |||
344 | In addition to the downloads from our svn depository, there are several other |
||
345 | requirements that you will get either from your OS installation source, or from its |
||
346 | respective website. The system check in the Leginon package checks your system to see if you |
||
347 | already have these requirements |
||
348 | |||
349 | 1 | Eric Hou | |
350 | 11 | Amber Herold | |
351 | <pre>cd your_download_area/Leginon-1.6-ALL/Leginon |
||
352 | python syscheck.py</pre> |
||
353 | |||
354 | |||
355 | |||
356 | If python is not installed, this, of course will not run. If you see any lines like "*** |
||
357 | Failed...", then you have something missing. Otherwise, everything should result in |
||
358 | "OK". |
||
359 | |||
360 | |||
361 | 1 | Eric Hou | |
362 | |||
363 | |||
364 | h2. Install the supporting packages first if missing: |
||
365 | |||
366 | 24 | Amber Herold | |
367 | |||
368 | Follow the instruction for your specific Linux distribution. |
||
369 | |||
370 | |||
371 | For example, SUSE users can use YaST to install them; RedHat and CentOS users can use |
||
372 | yum. |
||
373 | |||
374 | |||
375 | *SciPy may not build properly on some versions of SuSE due to an incompatible LAPACK |
||
376 | package that comes with SuSE. You can get scipy as well as a compatible LAPACK etc. from |
||
377 | http://repos.opensuse.org/science (need to specify your SuSE version and machine |
||
378 | 1 | Eric Hou | etc.) |
379 | |||
380 | |||
381 | |||
382 | |||
383 | |||
384 | h2. Required supporting packages: |
||
385 | |||
386 | |||
387 | |||
388 | |||
389 | 24 | Amber Herold | |_.Name:|_.Download site:|_.yum package name|_.SuSE rpm name| |
390 | 25 | Amber Herold | |Python 2.4 or newer|"http://www.python.org":http://www.python.org|python|python-devel| |
391 | |wxPython 2.5.2.8 or newer|"http://www.wxpython.org":http://www.wxpython.org|wxPython|python-wxGTK| |
||
392 | 26 | Amber Herold | |MySQL Python client 1.2 or newer|<ulink url="http://sourceforge.net/projects/mysql-python" |
393 | 25 | Amber Herold | >http://sourceforge.net/projects/mysql-python</ulink>|MySQL-python|python-mysql| |
394 | |Python Imaging Library (PIL) 1.1.4 or newer|<ulink url="http://www.pythonware.com/products/pil/" |
||
395 | >http://www.pythonware.com/products/pil/</ulink>|python-imaging|python-imaging| |
||
396 | 26 | Amber Herold | |Python XML module 0.8.3 or newer|"http://pyxml.sourceforge.net":http://pyxml.sourceforge.net|PyXML|python-xml| |
397 | 1 | Eric Hou | |NumPy 1.0.1 or newer|"http://www.scipy.org":http://www.scipy.org|numpy|numpy| |
398 | 26 | Amber Herold | |SciPy 0.5.1 (tested, others may work)*|"http://www.scipy.org":http://www.scipy.org , <ulink |
399 | url="http://repos.opensuse.org/science" |
||
400 | >http://repos.opensuse.org/science</ulink>*|scipy|python-scipy| |
||
401 | 1 | Eric Hou | |
402 | |||
403 | 26 | Amber Herold | |
404 | |||
405 | *SciPy may not build properly on some versions of SuSE due to an incompatible LAPACK |
||
406 | package that comes with SuSE. You can get scipy as well as a compatible LAPACK etc. from |
||
407 | http://repos.opensuse.org/science (need to specify your SuSE version and machine |
||
408 | etc.) |
||
409 | |||
410 | |||
411 | |||
412 | |||
413 | |||
414 | h2. Optional supporting packages: |
||
415 | |||
416 | |||
417 | |||
418 | |||
419 | |||
420 | * For using Matlab to explore holefinding algorithm (Matlab HoleFinder) |
||
421 | |||
422 | |||
423 | pymat: <ulink url="http://sourceforge.net/projects/pymat" |
||
424 | >http://sourceforge.net/projects/pymat</ulink> |
||
425 | |||
426 | |||
427 | |||
428 | |||
429 | |||
430 | |||
431 | |||
432 | |||
433 | |||
434 | h2. Install the packages you downloaded from svn depository |
||
435 | |||
436 | |||
437 | |||
438 | Here are the packages you need to install with python installer inside the |
||
439 | Leginon-1.6-ALL folder. |
||
440 | |||
441 | |||
442 | |||
443 | 11 | Amber Herold | |_.Name:|_.Purpose:| |
444 | 26 | Amber Herold | | Leginon|modular TEM image acquisition| |
445 | 11 | Amber Herold | | pyami|general functions| |
446 | | pyScope|microscope control and monitoring| |
||
447 | | sinedon|Leginon/database interaction| |
||
448 | | numExtension|c extension for numerical processing| |
||
449 | | libCV|small c library of algorithm from computer vision field| |
||
450 | | ImageViewer|image viewing for tomography| |
||
451 | |||
452 | |||
453 | |||
454 | |||
455 | |||
456 | |||
457 | * run syscheck.py again to make sure you have everything. |
||
458 | |||
459 | 1 | Eric Hou | |
460 | 19 | Amber Herold | * Install the package in _each folder_ with commands |
461 | 11 | Amber Herold | like |
462 | these<pre>cd /your_download_area/Leginon-1.6-ALL/Leginon |
||
463 | 1 | Eric Hou | python setup.py install |
464 | 11 | Amber Herold | |
465 | cd ../pyami |
||
466 | python setup.py install |
||
467 | cd ../pyScope |
||
468 | python setup.py install |
||
469 | cd ../sinedon |
||
470 | python setup.py install |
||
471 | cd ../numextension |
||
472 | python setup.py install |
||
473 | cd ../libcv |
||
474 | python setup.py install |
||
475 | cd ../ImageViewer |
||
476 | python setup.py install</pre> |
||
477 | |||
478 | |||
479 | |||
480 | |||
481 | |||
482 | |||
483 | |||
484 | |||
485 | 16 | Amber Herold | |
486 | 11 | Amber Herold | h2. python-site-package-path: where the installed python |
487 | packages went: |
||
488 | |||
489 | |||
490 | Python installer put the packages you installed to its site-packages directory. This |
||
491 | enable all users on the same computer to access them. The easiest way to find where your |
||
492 | installed package is called by python is to load a module from the package using interactive |
||
493 | python command lines like this: |
||
494 | |||
495 | |||
496 | |||
497 | |||
498 | * Start python command line from shell |
||
499 | |||
500 | |||
501 | |||
502 | <pre>> python</pre> |
||
503 | |||
504 | |||
505 | |||
506 | * Import a module from the package. Let's try sinedon here. All packages installed |
||
507 | through the above setup.py script should go to the same place. |
||
508 | |||
509 | |||
510 | |||
511 | <pre>python> import sinedon</pre> |
||
512 | |||
513 | |||
514 | |||
515 | 1 | Eric Hou | * If the module is loaded successfully, call the module attribute __path__ (two |
516 | 11 | Amber Herold | underscrolls before "path" and two underscrolls after) will return the location of the |
517 | module it is loaded from |
||
518 | |||
519 | |||
520 | |||
521 | <pre>python> sinedon.__path__ |
||
522 | |||
523 | RETURNS, For example, |
||
524 | 21 | Amber Herold | python> <module 'sinedon' from '/usr/lib/python2.5/site-packages/sinedon/__init__.pyc'> </pre> |
525 | 11 | Amber Herold | |
526 | |||
527 | In this case, /usr/lib/python2.5/site-packages/ is your python-site-package-path. |
||
528 | If you go to that directory, you will find all the packages you just installed. |
||
529 | |||
530 | |||
531 | |||
532 | |||
533 | |||
534 | |||
535 | |||
536 | |||
537 | 16 | Amber Herold | |
538 | 11 | Amber Herold | h2. Configure leginon.cfg: |
539 | |||
540 | |||
541 | Leginon can be configured at three levels: |
||
542 | |||
543 | |||
544 | |||
545 | |||
546 | * A skeleton (default) configuration file is available: |
||
547 | |||
548 | 1 | Eric Hou | |
549 | 11 | Amber Herold | |
550 | 19 | Amber Herold | <pre> _<link linkend="package_path">[python-site-package-path]</link>_/Leginon/config/default.cfg</pre> |
551 | 11 | Amber Herold | |
552 | |||
553 | |||
554 | * Configurations for all users |
||
555 | 1 | Eric Hou | |
556 | 11 | Amber Herold | |
557 | |||
558 | 19 | Amber Herold | <pre> _<link linkend="package_path">[python-site-package-path]</link>_/Leginon/config/leginon.cfg</pre> |
559 | 11 | Amber Herold | |
560 | |||
561 | |||
562 | 1 | Eric Hou | Example of the configuration that you should set: (Here we assume your leginon |
563 | 11 | Amber Herold | database is named "dbemdata", and Leginon log into the database as a user named |
564 | "usr_object" with no password |
||
565 | set).<pre>[Images] |
||
566 | 19 | Amber Herold | path: _your_storage_disk_path_/leginon |
567 | 11 | Amber Herold | </pre> |
568 | |||
569 | 1 | Eric Hou | |
570 | 11 | Amber Herold | * Configurations for individual users that overrides the all-user configuration if |
571 | exists |
||
572 | |||
573 | |||
574 | |||
575 | <pre> ~/leginon.cfg</pre> |
||
576 | |||
577 | 1 | Eric Hou | |
578 | 11 | Amber Herold | |
579 | This configuration should include all the minimal configuration above and |
||
580 | additional configuration for individual user for |
||
581 | convenience<pre>[User] |
||
582 | 19 | Amber Herold | Fullname: _your_name_ #The name you entered in the leginon administration web page. Note that it is case sensitive</pre> |
583 | 11 | Amber Herold | |
584 | |||
585 | |||
586 | |||
587 | |||
588 | |||
589 | |||
590 | |||
591 | 16 | Amber Herold | |
592 | 11 | Amber Herold | h2. Names used in the example installation |
593 | |||
594 | |||
595 | From this point on, you will need to enter database user names for different |
||
596 | configuration files and settings. These are NOT Leginon user names but what is required by |
||
597 | MySQL database interaction. Consistent names are essential. In the example shown here, the |
||
598 | leginon database is called "dbemdata", the project database is called "projectdata". The |
||
599 | MySQL user name are the same, "usr_object", and in this case without a password. |
||
600 | |||
601 | |||
602 | |||
603 | |||
604 | 16 | Amber Herold | |
605 | 11 | Amber Herold | h2. Configure sinedon.cfg: |
606 | |||
607 | |||
608 | Sinedon is designed to be able to interact with multiple databases. It can be |
||
609 | configured at global or user level. |
||
610 | |||
611 | |||
612 | |||
613 | |||
614 | * An example configuration file is available at: |
||
615 | |||
616 | |||
617 | |||
618 | <pre>/your_download_area/Leginon-1.6-ALL/sinedon/examples/sinedon.cfg</pre> |
||
619 | |||
620 | 1 | Eric Hou | |
621 | 11 | Amber Herold | |
622 | * Configurations for all users should be placed at the following path |
||
623 | |||
624 | |||
625 | |||
626 | 19 | Amber Herold | <pre> _<link linkend="package_path">[python-site-package-path]</link>_/sinedon/sinedon.cfg</pre> |
627 | 11 | Amber Herold | |
628 | |||
629 | |||
630 | 1 | Eric Hou | * Modify host,db,user,passwd to what is used. Note that the user here is MySQL user |
631 | 11 | Amber Herold | Leginon uses to communicate with the database for all Leginon users. For Leginon that |
632 | uses Project database, set the following: |
||
633 | |||
634 | |||
635 | 1 | Eric Hou | |
636 | <pre>[global] |
||
637 | host: _your_database_host_ |
||
638 | user: usr_object |
||
639 | passwd: |
||
640 | 25 | Amber Herold | |
641 | [projectdata] |
||
642 | 1 | Eric Hou | db: projectdata |
643 | |||
644 | [leginondata] |
||
645 | db: dbemdata |
||
646 | 25 | Amber Herold | </pre> |
647 | |||
648 | |||
649 | |||
650 | 23 | Amber Herold | * Add database configuration if you intend to use grid-inserting robot. The Robot2 |
651 | 25 | Amber Herold | module uses the database to communicate to the robot. Applications that carries the |
652 | name "Robot" requires this to be set. In general, using the same database as the |
||
653 | general leginon database is fine. |
||
654 | |||
655 | |||
656 | |||
657 | <pre>[robot2] |
||
658 | db: dbemdata</pre> |
||
659 | |||
660 | |||
661 | |||
662 | |||
663 | |||
664 | |||
665 | |||
666 | |||
667 | |||
668 | |||
669 | |||
670 | |||
671 | h2. Database Server-side Installation |
||
672 | |||
673 | |||
674 | |||
675 | The following is for the computer that hosts the databases. This involves installing MySQL |
||
676 | server and creation/configuration of the leginon and project databases. |
||
677 | |||
678 | |||
679 | |||
680 | |||
681 | |||
682 | |_.Name:|_.Download site:| |
||
683 | 26 | Amber Herold | |MySQL-Server 5.0 or higher|"http://www.mysql.com":http://www.mysql.com| |
684 | 25 | Amber Herold | |MySQL-Client 5.0 or higher|"http://www.mysql.com":http://www.mysql.com| |
685 | |||
686 | |||
687 | |||
688 | |||
689 | |||
690 | 11 | Amber Herold | h2. MySQL |
691 | |||
692 | |||
693 | |||
694 | |||
695 | |||
696 | * Install MySQL-Server |
||
697 | |||
698 | |||
699 | |||
700 | |||
701 | 1 | Eric Hou | * Use your package installer (yum, zypper, YaST) if available. |
702 | 11 | Amber Herold | |
703 | 1 | Eric Hou | |
704 | OR |
||
705 | |||
706 | |||
707 | 28 | Amber Herold | * Download the latest MySQL-server RPM for Linux from "www.mysql.com":http://www.mysql.com * Install the MySQL-server rpm: |
708 | 27 | Amber Herold | |
709 | |||
710 | 11 | Amber Herold | <pre> rpm -Uvh MySQL-server-5.0.xx-y.i386.rpm</pre> |
711 | (substitute correct version numbers) |
||
712 | |||
713 | |||
714 | |||
715 | |||
716 | |||
717 | |||
718 | * Install MySQL-Client |
||
719 | |||
720 | |||
721 | |||
722 | 1 | Eric Hou | |
723 | * Use your package installer (yum, zypper, YaST) if available. |
||
724 | 11 | Amber Herold | |
725 | |||
726 | 1 | Eric Hou | OR |
727 | |||
728 | 11 | Amber Herold | |
729 | 28 | Amber Herold | * Download the latest MySQL-client RPM for Linux from "www.mysql.com":http://www.mysql.com * Install the MySQL-client rpm: |
730 | 27 | Amber Herold | |
731 | |||
732 | 11 | Amber Herold | <pre> rpm -Uvh MySQL-client-5.0.xx-y.i386.rpm</pre> |
733 | (substitute correct version numbers) |
||
734 | |||
735 | |||
736 | |||
737 | |||
738 | |||
739 | |||
740 | * MySQL configuration file is usually located in /usr/share/mysql. There are |
||
741 | several examples there: |
||
742 | |||
743 | |||
744 | |||
745 | 22 | Amber Herold | <pre>> ls /usr/share/mysql/my* |
746 | 11 | Amber Herold | /usr/share/mysql/my-huge.cnf |
747 | /usr/share/mysql/my-innodb-heavy-4G.cnf |
||
748 | /usr/share/mysql/my-large.cnf |
||
749 | /usr/share/mysql/my-medium.cnf |
||
750 | /usr/share/mysql/my-small.cnf |
||
751 | 22 | Amber Herold | > </pre> |
752 | 11 | Amber Herold | |
753 | |||
754 | |||
755 | * Configure my.cnf in /etc using my-huge.cnf as the template |
||
756 | |||
757 | |||
758 | |||
759 | |||
760 | * <pre>> cp /usr/share/mysql/my-huge.cnf /etc/my.cnf</pre> |
||
761 | |||
762 | |||
763 | |||
764 | * Edit /etc/my.cnf to add or change query cache variables like these: |
||
765 | |||
766 | <pre>query_cache_type= 1 |
||
767 | query_cache_size = 100M |
||
768 | query_cache_limit= 100M</pre> |
||
769 | |||
770 | |||
771 | |||
772 | |||
773 | |||
774 | |||
775 | |||
776 | * start MySQL Server |
||
777 | |||
778 | 22 | Amber Herold | <pre> >/etc/init.d/mysqld start</pre> |
779 | 11 | Amber Herold | |
780 | on some installation, |
||
781 | |||
782 | 22 | Amber Herold | <pre> >/etc/init.d/mysql start</pre> |
783 | 11 | Amber Herold | |
784 | For future reference: start | stop | restart MySQL Server with similar |
||
785 | commands: |
||
786 | |||
787 | 22 | Amber Herold | <pre> >/etc/init.d/mysqld start |
788 | >/etc/init.d/mysqld stop |
||
789 | >/etc/init.d/mysqld restart</pre> |
||
790 | 11 | Amber Herold | |
791 | If you want to start MySQL automatically at boot on SuSE |
||
792 | |||
793 | 22 | Amber Herold | <pre> SuSE >chkconfig mysql on |
794 | 11 | Amber Herold | </pre> |
795 | |||
796 | * For future reference, the database location will be: |
||
797 | |||
798 | |||
799 | |||
800 | 22 | Amber Herold | <pre>> cd /var/lib/mysql |
801 | 11 | Amber Herold | Directory: /var/lib/mysql |
802 | 22 | Amber Herold | > ls |
803 | 11 | Amber Herold | yourdbserver.pid |
804 | ib_logfile0 |
||
805 | mysql |
||
806 | mysql.sock |
||
807 | test |
||
808 | 22 | Amber Herold | > </pre> |
809 | 11 | Amber Herold | |
810 | |||
811 | |||
812 | * Create leginon database, here we call <link linkend="db_example_names" |
||
813 | >dbemdata</link> |
||
814 | |||
815 | 22 | Amber Herold | <pre> >mysqladmin create dbemdata</pre> |
816 | 11 | Amber Herold | |
817 | |||
818 | |||
819 | * Create project database, here we call <link linkend="db_example_names" |
||
820 | >projectdata</link> (optional) |
||
821 | |||
822 | 22 | Amber Herold | <pre> >mysqladmin create projectdata</pre> |
823 | 11 | Amber Herold | |
824 | |||
825 | |||
826 | * Connect to mysql db |
||
827 | |||
828 | 22 | Amber Herold | <pre>>mysql mysql |
829 | 11 | Amber Herold | |
830 | 22 | Amber Herold | mysql> select user, password, host from user; |
831 | 11 | Amber Herold | +------+----------+-----------+ |
832 | | user | password | host | |
||
833 | +------+----------+-----------+ |
||
834 | | root | | localhost | |
||
835 | | root | | host1 | |
||
836 | | | | host1 | |
||
837 | | | | localhost | |
||
838 | +------+----------+-----------+ |
||
839 | 4 rows in set (0.00 sec)</pre> |
||
840 | |||
841 | |||
842 | |||
843 | * Create and grant privileges to a user called <link linkend="db_example_names" |
||
844 | >usr_object</link> for the databases on both the localhost and other hosts involved. |
||
845 | For example, use wild card '%' for all hosts. You may also set specific privilege to |
||
846 | the user. See MySQL Reference Manual for details |
||
847 | |||
848 | 22 | Amber Herold | <pre>mysql> create user usr_object@'localhost'; |
849 | mysql> grant all privileges on dbemdata.* to usr_object@'localhost'; |
||
850 | mysql> grant all privileges on projectdata.* to usr_object@'localhost';</pre> |
||
851 | 11 | Amber Herold | |
852 | Similarly, |
||
853 | 1 | Eric Hou | |
854 | 22 | Amber Herold | <pre>mysql> create usr_object@'%'; |
855 | mysql> grant all privileges on dbemdata.* to usr_object@'%'; |
||
856 | mysql> grant all privileges on projectdata.* to usr_object@'%'; |
||
857 | 11 | Amber Herold | </pre> |
858 | |||
859 | * Change Root passworld |
||
860 | |||
861 | 22 | Amber Herold | <pre>mysql> update user set password=password('_a passwd_') where user="root"; |
862 | 1 | Eric Hou | Query OK, 2 rows affected (0.01 sec) |
863 | 11 | Amber Herold | Rows matched: 2 Changed: 2 Warnings: 0 |
864 | 1 | Eric Hou | |
865 | 22 | Amber Herold | mysql>^D or exit;</pre> |
866 | 11 | Amber Herold | From now on, you will need to specify the password to connect to the database as |
867 | root user like this: |
||
868 | |||
869 | <pre>>mysql -u root -p mysql</pre> |
||
870 | |||
871 | 19 | Amber Herold | _***If your password change does not take effect in your next |
872 | 11 | Amber Herold | database connection, you will need to flush the mysql pivileges cache as mysql root |
873 | and connecting with you old password (or no password in the above |
||
874 | 19 | Amber Herold | case):_ |
875 | 11 | Amber Herold | |
876 | <pre>>mysql -u root mysql</pre> |
||
877 | 22 | Amber Herold | <pre>mysql> flush privileges; |
878 | mysql>^D or exit;</pre> |
||
879 | 11 | Amber Herold | |
880 | * Check MySQL variables |
||
881 | |||
882 | 22 | Amber Herold | <pre>>mysql -u usr_object dbemdata |
883 | 11 | Amber Herold | |
884 | 22 | Amber Herold | mysql> SHOW VARIABLES LIKE 'query%'; |
885 | 11 | Amber Herold | +------------------------------+-----------+ |
886 | | Variable_name | Value | |
||
887 | +------------------------------+-----------+ |
||
888 | | ft_query_expansion_limit | 20 | |
||
889 | | have_query_cache | YES | |
||
890 | | long_query_time | 10 | |
||
891 | | query_alloc_block_size | 8192 | |
||
892 | 21 | Amber Herold | | query_cache_limit | 104857600 | <<---This should correspond to your change |
893 | 11 | Amber Herold | | query_cache_min_res_unit | 4096 | |
894 | 21 | Amber Herold | | query_cache_size | 104857600 | <<---This should correspond to your change |
895 | | query_cache_type | ON | <<---This should correspond to your change |
||
896 | 11 | Amber Herold | | query_cache_wlock_invalidate | OFF | |
897 | 1 | Eric Hou | | query_prealloc_size | 8192 | |
898 | +------------------------------+-----------+ |
||
899 | 10 rows in set (0.00 sec) |
||
900 | |||
901 | mysql> exit;</pre> |
||
902 | 11 | Amber Herold | |
903 | 22 | Amber Herold | |
904 | 11 | Amber Herold | |
905 | * Make sure MySQL is running |
||
906 | |||
907 | <pre>prompt:~> mysqlshow |
||
908 | 1 | Eric Hou | +--------------+ |
909 | 11 | Amber Herold | | Databases | |
910 | +--------------+ |
||
911 | | mysql | |
||
912 | | dbemdata | |
||
913 | | projectdata | |
||
914 | +--------------+</pre> |
||
915 | 21 | Amber Herold | |
916 | 1 | Eric Hou | |
917 | 11 | Amber Herold | |
918 | 22 | Amber Herold | * Or check with the following php script (if already installed) |
919 | 11 | Amber Herold | |
920 | <pre><? |
||
921 | mysql_connect('your_host.your_institute.edu', 'usr_object', '','dbemdata'); |
||
922 | echo mysql_stat(); |
||
923 | ?> </pre> |
||
924 | |||
925 | |||
926 | Output |
||
927 | |||
928 | <pre> Uptime: 1452562 Threads: 1 Questions: 618 Slow queries: 0 Opens: 117 Flush tables: 1 Open tables: 106 Queries per second avg: 0.000</pre> |
||
929 | |||
930 | 1 | Eric Hou | |
931 | |||
932 | |||
933 | |||
934 | 11 | Amber Herold | |
935 | 1 | Eric Hou | |
936 | 11 | Amber Herold | |
937 | 1 | Eric Hou | |
938 | |||
939 | h2. Web server set up and Installation |
||
940 | |||
941 | |||
942 | 11 | Amber Herold | |
943 | 1 | Eric Hou | The following applies to the computer that will host the web-accessable image viewers ( a |
944 | part of dbem tools) and project manager (a part of project tools). |
||
945 | |||
946 | 11 | Amber Herold | |
947 | 1 | Eric Hou | |
948 | 11 | Amber Herold | h2. Differences between Linux flavors |
949 | |||
950 | |||
951 | 1 | Eric Hou | |
952 | Different Linux flavors often put web server and mysql-related files in different |
||
953 | locations. This can be confusing. From experience, we found the equivalent on CentOS vs |
||
954 | 11 | Amber Herold | SuSE. Here we list them for reference. If your system use a different naming and you are |
955 | willing to share your experience, please send us the list. We will add it here: |
||
956 | |||
957 | 1 | Eric Hou | |
958 | 11 | Amber Herold | |
959 | 14 | Amber Herold | |_.File or Command Head|_.CentOS|_.SuSE| |
960 | 11 | Amber Herold | | php.ini|/etc/| /etc/php5/apache2/| |
961 | | httpd.conf|/etc/httpd/conf/|/etc/php5/apache2/| |
||
962 | | default document_root|/var/www/html/|/srv/www/htdocs/| |
||
963 | | apache start/stop/restart command head|/etc/init.d/httpd|/etc/init.d/apache2| |
||
964 | | mysql start/stop/restart command head|/etc/init.d/mysqld|/etc/init.d/mysql| |
||
965 | |||
966 | |||
967 | 1 | Eric Hou | |
968 | |||
969 | |||
970 | |||
971 | 11 | Amber Herold | |
972 | h2. Prerequisites for dbemtools, projecttools, and mrctools extension |
||
973 | |||
974 | |||
975 | |||
976 | The dbemtools are mostly php scripts that run at the web server. The followings are |
||
977 | required before installation of dbemtools and the mrc extension that handles mrc files to be |
||
978 | displayed. Some of these packages may be found on the SuSE Linux DVD or included in common |
||
979 | 1 | Eric Hou | package repository. MySQL and the Apache Web Server can be downloaded from their respective |
980 | websites. |
||
981 | |||
982 | |||
983 | |||
984 | |_.Name:|_.Download site:|_.yum package name|_.SuSE rpm name| |
||
985 | 25 | Amber Herold | | Apache|"www.apache.org":http://www.apache.org| httpd| apache2| |
986 | | php|"www.php.net":http://www.php.net| php| php| |
||
987 | 26 | Amber Herold | | php-devel*|<ulink url="http://rpmfind.net/linux/RPM/Development_Languages_PHP.html" |
988 | 25 | Amber Herold | >rpmfind.net/linux/RPM/Development_Languages_PHP.html</ulink>| php-devel| php-devel| |
989 | 28 | Amber Herold | | php-gd (including GD library, its development libraries and header *)|"www.php.ned/gd":http://www.libgd.org (Use gd2)| php-gd, gd-devel| php-gd,gd-devel| |
990 | | fftw3 library (including development libraries and header *)|"www.fftw.org":http://www.fftw.org (Use fftw3.x)| fftw3-devel| fftw3-devel| |
||
991 | 24 | Amber Herold | |
992 | 15 | Amber Herold | |
993 | 11 | Amber Herold | |
994 | |||
995 | * mrctools are compiled and added to php extension with php-devel package. Mrctools use |
||
996 | GD and FFTW3 that need to be compiled from their development libraries while the extension |
||
997 | is compiled. If GD and FFTW3 sources were downloaded and compiled directly on your computer, |
||
998 | these development files are included. If (as in most cases) GD and FFTW3 are installed from |
||
999 | rpm, they are not included. An error message will appear when you attempt to compile |
||
1000 | mrctools. In this case, you will need separate download and installation of GD-devel and |
||
1001 | 26 | Amber Herold | FFTW3-devel. Search <ulink url="http://rpmfind.ned/linux/rpm2html/" |
1002 | 25 | Amber Herold | >http://rpmfind.net/linux/rpm2html/</ulink> for GD-devel and FFTW3-devel for the rpm |
1003 | distribution needed for your system. |
||
1004 | 1 | Eric Hou | |
1005 | 11 | Amber Herold | |
1006 | |||
1007 | |||
1008 | 1 | Eric Hou | |
1009 | 11 | Amber Herold | h2. Installation tools |
1010 | |||
1011 | |||
1012 | |||
1013 | Use the installation tools available for your linux distribution. |
||
1014 | 1 | Eric Hou | |
1015 | |||
1016 | 11 | Amber Herold | |
1017 | |||
1018 | * For example, Use yum utility to install. |
||
1019 | |||
1020 | |||
1021 | * For example, Use the SuSE Linux YaST2 utility or zypper (openSuSE 10.2 and above) |
||
1022 | to install. |
||
1023 | |||
1024 | |||
1025 | 27 | Amber Herold | * <ulink url="http://emg.nysbc.org/bb/viewtopic.php?t=238">A list of required CENTOS |
1026 | rpms and instruction</ulink> can be found at dbemtools bulletin board at |
||
1027 | 11 | Amber Herold | leginon.org. |
1028 | 15 | Amber Herold | |
1029 | 11 | Amber Herold | |
1030 | |||
1031 | |||
1032 | |||
1033 | |||
1034 | |||
1035 | |||
1036 | 16 | Amber Herold | |
1037 | 11 | Amber Herold | h2. PHP, PHP-devel, gd, and fftw3 |
1038 | |||
1039 | |||
1040 | Install the packages using your installation tools if available. For example, to |
||
1041 | install gd as php extension you may use |
||
1042 | |||
1043 | |||
1044 | |||
1045 | 17 | Amber Herold | <pre>CentOS> yum install php-gd |
1046 | 11 | Amber Herold | SuSE10.2 and above> zypper install php-gd</pre> |
1047 | |||
1048 | |||
1049 | |||
1050 | |||
1051 | |||
1052 | 16 | Amber Herold | |
1053 | 11 | Amber Herold | h2. Configure php.ini |
1054 | |||
1055 | |||
1056 | |||
1057 | Edit the following two sections in php.ini (found as /etc/php.ini on CentOS and |
||
1058 | 1 | Eric Hou | /etc/php5/apache2/php.ini on SuSE) so that they look like the following: |
1059 | 11 | Amber Herold | |
1060 | |||
1061 | |||
1062 | <pre>register_argc_argv = On</pre> |
||
1063 | |||
1064 | |||
1065 | |||
1066 | |||
1067 | <pre>short_open_tag = On</pre> |
||
1068 | |||
1069 | |||
1070 | |||
1071 | |||
1072 | <pre>max_execution_time = 300 ; Maximum execution time of each script, in seconds |
||
1073 | max_input_time = 300 ; Maximum amount of time each script may spend parsing request data |
||
1074 | memory_limit = 256M ; Maximum amount of memory a script may consume (8MB)</pre> |
||
1075 | |||
1076 | |||
1077 | |||
1078 | You may want to increase max_input_time and memory_limit if the server is heavily used. |
||
1079 | At NRAMM, max_input_time=600 and memory_limit=4000M. |
||
1080 | |||
1081 | |||
1082 | |||
1083 | |||
1084 | 16 | Amber Herold | |
1085 | 11 | Amber Herold | h2. Apache Web Server |
1086 | |||
1087 | |||
1088 | |||
1089 | |||
1090 | |||
1091 | * Install the Apache Web Server with the YaST or yum utility. |
||
1092 | |||
1093 | |||
1094 | * Find "httpd.conf". |
||
1095 | |||
1096 | |||
1097 | This is /etc/httpd/conf/httpd.conf on CentOS and /etc/php5/apache2/httpd.conf on |
||
1098 | SuSE |
||
1099 | |||
1100 | |||
1101 | * Edit the "httpd.conf" configuration file to look like the following: |
||
1102 | |||
1103 | |||
1104 | |||
1105 | 22 | Amber Herold | <pre><IfModule mod_dir.c> |
1106 | 11 | Amber Herold | DirectoryIndex index.htm index.shtm index.html index.shtml index.php |
1107 | 22 | Amber Herold | </IfModule></pre> |
1108 | 11 | Amber Herold | |
1109 | |||
1110 | 1 | Eric Hou | (Note: It may be possible to edit httpd.conf in YaST2 as well.) |
1111 | 11 | Amber Herold | |
1112 | |||
1113 | * Restart the web server. |
||
1114 | |||
1115 | |||
1116 | |||
1117 | 1 | Eric Hou | <pre>apachectl restart |
1118 | or |
||
1119 | /etc/init.d/httpd restart (ON CentOS) |
||
1120 | or |
||
1121 | /etc/init.d/apache2 restart (ON SuSE)</pre> |
||
1122 | |||
1123 | 21 | Amber Herold | |
1124 | 11 | Amber Herold | |
1125 | 22 | Amber Herold | If you want to start the web server automatically at boot on SuSE |
1126 | 11 | Amber Herold | |
1127 | 1 | Eric Hou | <pre> SuSE >chkconfig apache2 on |
1128 | 11 | Amber Herold | </pre> |
1129 | |||
1130 | |||
1131 | |||
1132 | |||
1133 | |||
1134 | |||
1135 | |||
1136 | |||
1137 | h2. Check php information |
||
1138 | |||
1139 | |||
1140 | 16 | Amber Herold | Create the following info.php in your web server document root directory (/var/www/html |
1141 | 11 | Amber Herold | on CentOS. /srv/www/htdocs on SuSE. You can find its location in httpd.conf mentioned above |
1142 | under the line starting |
||
1143 | 1 | Eric Hou | DocumentRoot).<pre><?php |
1144 | phpinfo(); |
||
1145 | 11 | Amber Herold | ?></pre> |
1146 | |||
1147 | 16 | Amber Herold | |
1148 | 11 | Amber Herold | Visit this page at http://yourhost/info.php |
1149 | |||
1150 | |||
1151 | You will see comprehensive tables of php and apache information, including the location |
||
1152 | of the addition .ini files, extension, include path, and what extension is enabled. |
||
1153 | |||
1154 | |||
1155 | 1 | Eric Hou | Here is an example screen shot of the part of the info.php page that tells you where |
1156 | 16 | Amber Herold | php.ini and other configuration files are. |
1157 | 11 | Amber Herold | |
1158 | 1 | Eric Hou | |
1159 | |||
1160 | !http://emg.nysbc.org/software/leginon/images/images/phpini.png! |
||
1161 | |||
1162 | |||
1163 | |||
1164 | |||
1165 | |||
1166 | |||
1167 | h2. mrctools Installation |
||
1168 | |||
1169 | |||
1170 | |||
1171 | mrctools are installed as php extension and are required for displaying mrc files live |
||
1172 | on the web browser. |
||
1173 | |||
1174 | |||
1175 | |||
1176 | h2. Install php-devel packages on the web server if missing: |
||
1177 | |||
1178 | |||
1179 | You can check whether php-devel is installed by |
||
1180 | 11 | Amber Herold | typing<pre> >phpize</pre> |
1181 | |||
1182 | |||
1183 | 22 | Amber Herold | Follow the instruction for your specific Linux distribution. |
1184 | 11 | Amber Herold | |
1185 | |||
1186 | For example, SUSE users can use YaST or zypper to install them |
||
1187 | |||
1188 | |||
1189 | |||
1190 | |||
1191 | |||
1192 | h2. php-GD/FFTW3-devel |
||
1193 | |||
1194 | 16 | Amber Herold | |
1195 | 11 | Amber Herold | |
1196 | Follow instructions from the download site. These may be included already. If not, |
||
1197 | mrctools installation will fail. |
||
1198 | |||
1199 | |||
1200 | |||
1201 | |||
1202 | |||
1203 | h2. mrctools Installation |
||
1204 | 1 | Eric Hou | |
1205 | 16 | Amber Herold | |
1206 | 11 | Amber Herold | |
1207 | mrctools are installed from php devel directory. This is usually /usr/include/php/ext |
||
1208 | where you will find other php extension source such as gd. After the installation, mrc.so |
||
1209 | should be placed in php's extension directory (Look for "extension_dir" in |
||
1210 | http://your_host/<link linkend="install_infophp">info.php</link> |
||
1211 | |||
1212 | |||
1213 | 1 | Eric Hou | |
1214 | 11 | Amber Herold | |
1215 | 26 | Amber Herold | * Download dbem tools from <ulink url="http://emg.nysbc.org/software/mrctools" |
1216 | >http://emg.nysbc.org/software/mrctools</ulink>. |
||
1217 | |||
1218 | |||
1219 | * Follow the instruction at <ulink |
||
1220 | url="http://emg.nysbc.org/software/mrctools/mrc_so.php" |
||
1221 | >http://emg.nysbc.org/software/mrctools/mrc_so.php</ulink> for installation and |
||
1222 | testing. The next session about checking php information can also help debugging the |
||
1223 | installation |
||
1224 | |||
1225 | |||
1226 | |||
1227 | |||
1228 | |||
1229 | |||
1230 | |||
1231 | |||
1232 | |||
1233 | h2. Check php information |
||
1234 | |||
1235 | |||
1236 | |||
1237 | Visit or refresh http://yourhost/info.php <link linkend="install_infophp">which you |
||
1238 | 11 | Amber Herold | created earlier</link>. It should have a section looking like this (The version should |
1239 | correspond to what you've just installed): |
||
1240 | 16 | Amber Herold | |
1241 | 11 | Amber Herold | |
1242 | 1 | Eric Hou | |
1243 | !http://emg.nysbc.org/software/leginon/images/images/phpmrc.png! |
||
1244 | |||
1245 | |||
1246 | |||
1247 | 11 | Amber Herold | If mrc is not listed, the extension did not get added at the right order. |
1248 | |||
1249 | |||
1250 | |||
1251 | |||
1252 | 16 | Amber Herold | |
1253 | 11 | Amber Herold | h2. Alternative approach if mrc module does not show up in info.php output |
1254 | |||
1255 | |||
1256 | |||
1257 | 1 | Eric Hou | * find in the <link linkend="install_infophp">info.php web page</link> the location |
1258 | 11 | Amber Herold | of "additional .ini files parsed" in the first table (such as |
1259 | /etc/php.d/conf.d/*). |
||
1260 | |||
1261 | |||
1262 | * Go to the directory and make a copy of any ini file to use as a template for |
||
1263 | mrc.ini |
||
1264 | |||
1265 | |||
1266 | |||
1267 | <pre>>cd [additional_ini_directory] |
||
1268 | 22 | Amber Herold | >cp gd.ini mrc.ini</pre> |
1269 | |||
1270 | 11 | Amber Herold | |
1271 | |||
1272 | * Edit mrc.ini to the following |
||
1273 | |||
1274 | |||
1275 | 1 | Eric Hou | |
1276 | 11 | Amber Herold | <pre>; comment out next line to disable mrc extension in php |
1277 | extension=mrc.so</pre> |
||
1278 | |||
1279 | |||
1280 | 1 | Eric Hou | |
1281 | * Comment out mrc extension from php.ini (found in /etc/php.ini/ on a typical PHP |
||
1282 | installation) |
||
1283 | |||
1284 | |||
1285 | |||
1286 | 11 | Amber Herold | <pre>;extension=mrc.so</pre> |
1287 | 22 | Amber Herold | |
1288 | 11 | Amber Herold | |
1289 | |||
1290 | * restart your webserver |
||
1291 | |||
1292 | |||
1293 | |||
1294 | 25 | Amber Herold | <pre>> /etc/init.d/httpd restart</pre> |
1295 | |||
1296 | |||
1297 | 16 | Amber Herold | |
1298 | 11 | Amber Herold | |
1299 | 25 | Amber Herold | |
1300 | |||
1301 | |||
1302 | |||
1303 | |||
1304 | |||
1305 | h2. Web Viewing Tools (dbemtools) Linux |
||
1306 | Installation |
||
1307 | |||
1308 | |||
1309 | |||
1310 | php and java scripts for viewing images and Leginon information through the web |
||
1311 | server. |
||
1312 | |||
1313 | |||
1314 | |||
1315 | |||
1316 | * Download dbem tools from <ulink url="http://emg.nysbc.org/software/dbemtools" |
||
1317 | 26 | Amber Herold | >http://emg.nysbc.org/software/dbemtools</ulink>. |
1318 | 25 | Amber Herold | |
1319 | |||
1320 | 11 | Amber Herold | * Unpack the package in your [webdirectory] |
1321 | |||
1322 | 1 | Eric Hou | |
1323 | |||
1324 | <pre>>cd [webdirectory] #/var/www/html in this example |
||
1325 | [webdirectory>tar zxvf dbem_1_5_1.tgz</pre> |
||
1326 | |||
1327 | |||
1328 | |||
1329 | * Copy config.php.template to config.php and edit the latter by adding these MySQL |
||
1330 | parameters: |
||
1331 | 11 | Amber Herold | |
1332 | 1 | Eric Hou | "config.php" should be located in /var/www/html/dbem_1_5_1/ on CentOS and |
1333 | 11 | Amber Herold | /srv/www/htdocs/dbem_1_5_1/ on SuSE. |
1334 | |||
1335 | |||
1336 | |||
1337 | <pre><? |
||
1338 | // ---define dbem web tools base ---// |
||
1339 | 21 | Amber Herold | define('BASE_URL',"/dbem_1_5_1/"; |
1340 | 11 | Amber Herold | // --- Leginon Viewer Configuration --- // |
1341 | |||
1342 | // --- Set your leginon MySQL database server parameters |
||
1343 | |||
1344 | 1 | Eric Hou | $DB_HOST = "[your database host]"; |
1345 | 11 | Amber Herold | $DB_USER = "<link linkend="db_example_names">usr_object</link>"; |
1346 | $DB_PASS = ""; |
||
1347 | $DB = "<link linkend="db_example_names">dbemdata</link>"; |
||
1348 | |||
1349 | // --- XML test dataset |
||
1350 | $XML_DATA = "test/viewerdata.xml"; |
||
1351 | |||
1352 | // --- Project database config |
||
1353 | |||
1354 | 1 | Eric Hou | $PROJECT_URL = "/project_1_2"; |
1355 | $PROJECT_DB_HOST = "[your database host]"; |
||
1356 | $PROJECT_DB_USER = "<link linkend="db_example_names">usr_object</link>"; |
||
1357 | 11 | Amber Herold | $PROJECT_DB_PASS = ""; |
1358 | $PROJECT_DB = "<link linkend="db_example_names">projectdata</link>"; |
||
1359 | </pre> |
||
1360 | 1 | Eric Hou | |
1361 | |||
1362 | |||
1363 | * Test the set-up by visiting http://yourhost/dbem_1_5_1 |
||
1364 | |||
1365 | 11 | Amber Herold | |
1366 | |||
1367 | 16 | Amber Herold | |
1368 | 11 | Amber Herold | |
1369 | |||
1370 | |||
1371 | |||
1372 | |||
1373 | h2. Project management tools Linux Installation |
||
1374 | |||
1375 | |||
1376 | |||
1377 | Leginon sessions can be catagorized into different projects. The projects are created |
||
1378 | and viewed trhough a set of web tools. To access them, install the tools on the web server. |
||
1379 | 16 | Amber Herold | The same project management tools are also used to create and track appion processing |
1380 | 11 | Amber Herold | databases. If you want to use our processing pipeline, Appion, in the future, you must |
1381 | install this. |
||
1382 | |||
1383 | |||
1384 | |||
1385 | h2. Prerequisites for project tools |
||
1386 | 16 | Amber Herold | |
1387 | 1 | Eric Hou | |
1388 | |||
1389 | 11 | Amber Herold | installed dbemtools and its prerequisites |
1390 | |||
1391 | |||
1392 | |||
1393 | 1 | Eric Hou | |
1394 | |||
1395 | h2. project tools |
||
1396 | |||
1397 | 11 | Amber Herold | |
1398 | Current release: project 1.2. |
||
1399 | 1 | Eric Hou | |
1400 | |||
1401 | |||
1402 | |||
1403 | 26 | Amber Herold | * Download project tools from <ulink |
1404 | url="http://emg.nysbc.org/software/dbemtools" |
||
1405 | >http://emg.nysbc.org/software/dbemtools</ulink>. |
||
1406 | |||
1407 | |||
1408 | * Unpack the package in your [webdirectory] |
||
1409 | |||
1410 | |||
1411 | |||
1412 | <pre>>cd [webdirectory] #/var/www/html in this example |
||
1413 | 24 | Amber Herold | [webdirectory]>tar zxvf project_1_2.tgz</pre> |
1414 | |||
1415 | |||
1416 | |||
1417 | * Go to the uncompressed directory |
||
1418 | project_1_2.<pre>> cd project_1_2</pre> |
||
1419 | 22 | Amber Herold | |
1420 | 11 | Amber Herold | |
1421 | 25 | Amber Herold | * Copy config.php.template to _config.php_ |
1422 | 11 | Amber Herold | |
1423 | 1 | Eric Hou | |
1424 | 17 | Amber Herold | |
1425 | 11 | Amber Herold | <pre>> cp config.php.template to config.php</pre> |
1426 | |||
1427 | 19 | Amber Herold | |
1428 | 11 | Amber Herold | |
1429 | * Edit _config.php_: You need to insert these MySQL |
||
1430 | parameters in project tool's config.php |
||
1431 | |||
1432 | |||
1433 | |||
1434 | <pre>// --- Project Configuration --- // |
||
1435 | 19 | Amber Herold | |
1436 | 11 | Amber Herold | // --- Leginon database config |
1437 | $DBEM_PATH="../dbem_1_5_1/"; |
||
1438 | |||
1439 | $DB_HOST = "[your database host]"; |
||
1440 | 1 | Eric Hou | $DB_USER = "usr_object"; |
1441 | 11 | Amber Herold | $DB_PASS = ""; |
1442 | $DB = "<link linkend="db_example_names">dbemdata</link>"; |
||
1443 | |||
1444 | // --- Project database config |
||
1445 | $PROJECT_DB_HOST = "[your database host]"; |
||
1446 | $PROJECT_DB_USER = "<link linkend="db_example_names">usr_object</link>"; |
||
1447 | 1 | Eric Hou | $PROJECT_DB_PASS = ""; |
1448 | 11 | Amber Herold | $PROJECT_DB = "<link linkend="db_example_names">projectdata</link>"; |
1449 | </pre> |
||
1450 | |||
1451 | |||
1452 | 1 | Eric Hou | |
1453 | 11 | Amber Herold | * Test the set-up by visiting http://yourhost/project_1_2 |
1454 | |||
1455 | |||
1456 | |||
1457 | |||
1458 | |||
1459 | |||
1460 | |||
1461 | |||
1462 | |||
1463 | |||
1464 | |||
1465 | h2. Other Tools |
||
1466 | |||
1467 | |||
1468 | This section includes tools that may help with Leginon development. |
||
1469 | |||
1470 | 16 | Amber Herold | |
1471 | 11 | Amber Herold | |
1472 | h2. phpMyAdmin |
||
1473 | |||
1474 | |||
1475 | |||
1476 | |||
1477 | 16 | Amber Herold | |
1478 | 11 | Amber Herold | * Download phpMyAdmin from Yast2 or <ulink url="http://www.phpmyadmin.net" |
1479 | 26 | Amber Herold | >www.phpmyadmin.net</ulink> |
1480 | 1 | Eric Hou | |
1481 | |||
1482 | |||
1483 | |||
1484 | 26 | Amber Herold | * Download phpMyAdmin into the directory where the web server has been |
1485 | installed. |
||
1486 | 24 | Amber Herold | |
1487 | 26 | Amber Herold | |
1488 | |||
1489 | |||
1490 | |||
1491 | |||
1492 | * Check phpMyAdmin installation: |
||
1493 | |||
1494 | |||
1495 | |||
1496 | 11 | Amber Herold | <pre>>rpm -qa |grep -i phpmyadmin </pre> |
1497 | 22 | Amber Herold | |
1498 | 1 | Eric Hou | |
1499 | |||
1500 | * Install from tarball: |
||
1501 | |||
1502 | |||
1503 | |||
1504 | <pre>> cd [webdirectory] |
||
1505 | [webdirectory]>tar zxvf phpMyAdmin-2.x.tar.gz</pre> |
||
1506 | 11 | Amber Herold | |
1507 | |||
1508 | 1 | Eric Hou | |
1509 | or Install with yum if availabe: |
||
1510 | |||
1511 | |||
1512 | |||
1513 | <pre>> yum install phpMyAdmin</pre> |
||
1514 | |||
1515 | |||
1516 | |||
1517 | * Create phpMyAdmin configuration file called config.inc.php from a |
||
1518 | 11 | Amber Herold | sample. |
1519 | |||
1520 | 1 | Eric Hou | |
1521 | |||
1522 | <pre>[webdirectory]>cd phpMyAdmin |
||
1523 | (if you install with yum, the program directory is /usr/share/phpMyAdmin) |
||
1524 | |||
1525 | > cp config.sample.inc.php config.inc.php |
||
1526 | </pre> |
||
1527 | |||
1528 | 11 | Amber Herold | |
1529 | |||
1530 | 1 | Eric Hou | * Make sure these are set correctly in _config.inc.php_. Note that these are for MySQL which we set earlier. |
1531 | 11 | Amber Herold | You can set specific user, but it is safer just leave it blank. |
1532 | 1 | Eric Hou | |
1533 | |||
1534 | |||
1535 | <pre> |
||
1536 | $cfg['Servers'][$i]['host'] = '[your host]'; |
||
1537 | $cfg['Servers'][$i]['port'] = ''; |
||
1538 | $cfg['Servers'][$i]['socket'] = ''; |
||
1539 | $cfg['Servers'][$i]['connect_type'] = 'tcp'; |
||
1540 | $cfg['Servers'][$i]['extension'] = 'mysql'; |
||
1541 | $cfg['Servers'][$i]['compress'] = FALSE; |
||
1542 | $cfg['Servers'][$i]['controluser'] = ''; |
||
1543 | $cfg['Servers'][$i]['auth_type'] = 'http'; |
||
1544 | $cfg['Servers'][$i]['user'] = ''; |
||
1545 | 11 | Amber Herold | $cfg['Servers'][$i]['password'] = ''; |
1546 | </pre> |
||
1547 | |||
1548 | |||
1549 | |||
1550 | * For additional security, you may restrict mysql root access |
||
1551 | |||
1552 | |||
1553 | |||
1554 | 1 | Eric Hou | <pre> |
1555 | 11 | Amber Herold | $cfg['Servers'][$i]['AllowRoot'] = FALSE; |
1556 | 1 | Eric Hou | </pre> |
1557 | 11 | Amber Herold | |
1558 | |||
1559 | |||
1560 | * If you want to access phpMyAdmin from another computer, you can add it to its |
||
1561 | 1 | Eric Hou | web access configuration file found as /etc/httpd/conf.d/phpMyAdmin.conf in a |
1562 | 11 | Amber Herold | typical installation |
1563 | |||
1564 | |||
1565 | |||
1566 | 1 | Eric Hou | <pre> |
1567 | 11 | Amber Herold | <Directory /usr/share/phpMyAdmin/> |
1568 | 21 | Amber Herold | order deny,allow |
1569 | 11 | Amber Herold | deny from all |
1570 | allow from 127.0.0.1 |
||
1571 | allow from YOUR_IP_ADDRESS |
||
1572 | </Directory> |
||
1573 | 21 | Amber Herold | </pre> |
1574 | 11 | Amber Herold | |
1575 | |||
1576 | |||
1577 | |||
1578 | |||
1579 | |||
1580 | |||
1581 | |||
1582 | |||
1583 | |||
1584 | |||
1585 | |||
1586 | |||
1587 | |||
1588 | 16 | Amber Herold | h2. Windows installation |
1589 | 11 | Amber Herold | |
1590 | |||
1591 | |||
1592 | |||
1593 | 16 | Amber Herold | h2. Processing-side Leginon Windows Installation |
1594 | 11 | Amber Herold | |
1595 | |||
1596 | |||
1597 | |||
1598 | 16 | Amber Herold | h2. Install Python and Support Packages (Note that python 2.5 must be used): |
1599 | 11 | Amber Herold | |
1600 | 23 | Amber Herold | |
1601 | 25 | Amber Herold | |
1602 | This list does not include pyton XML module because it is included in the python |
||
1603 | package for window. |
||
1604 | |||
1605 | |||
1606 | |||
1607 | |_.Name:|_.Download site:| |
||
1608 | |Python 2.5*|"http://www.python.org":http://www.python.org| |
||
1609 | 26 | Amber Herold | |Python for Windows extension (pywin32)|<ulink url="http://sourceforge.net/projects/pywin32/" |
1610 | 25 | Amber Herold | >http://sourceforge.net/projects/pywin32/</ulink>| |
1611 | 26 | Amber Herold | |wxPython 2.5.2.8 or newer|"http://www.wxpython.org":http://www.wxpython.org| |
1612 | |MySQL Python client 1.2 or newer|<ulink url="http://sourceforge.net/projects/mysql-python" |
||
1613 | 25 | Amber Herold | >http://sourceforge.net/projects/mysql-python</ulink>| |
1614 | 24 | Amber Herold | |Python Imaging Library (PIL) 1.1.4 or newer|<ulink url="http://www.pythonware.com/products/pil/" |
1615 | >http://www.pythonware.com/products/pil/</ulink>| |
||
1616 | 26 | Amber Herold | |NumPy 1.0b5 (tested, others may work)|"http://www.scipy.org":http://www.scipy.org| |
1617 | 25 | Amber Herold | |SciPy 0.5.1 or newer|"http://www.scipy.org":http://www.scipy.org| |
1618 | 26 | Amber Herold | |Tortoise SVN client|<ulink url="http://tortoisesvn.tigris.org" |
1619 | >http://tortoisesvn.tigris.org</ulink>| |
||
1620 | 25 | Amber Herold | |
1621 | |||
1622 | 11 | Amber Herold | |
1623 | |||
1624 | *Python 2.5 is the only python version that we have compiled numExtension. libCV and |
||
1625 | 23 | Amber Herold | comarray in. Therefore no other python version works for now. |
1626 | 25 | Amber Herold | |
1627 | |||
1628 | Execute the installer file and follow the directions. |
||
1629 | |||
1630 | |||
1631 | 11 | Amber Herold | |
1632 | |||
1633 | |||
1634 | 23 | Amber Herold | h2. Packages required from NRAMM |
1635 | 25 | Amber Herold | |
1636 | |||
1637 | 1 | Eric Hou | |
1638 | 23 | Amber Herold | Here are the packages you need to install with python installer |
1639 | 25 | Amber Herold | |
1640 | 24 | Amber Herold | |
1641 | 26 | Amber Herold | |
1642 | |_.Name:|_.Purpose:| |
||
1643 | | Leginon|modular TEM image acquisition| |
||
1644 | 1 | Eric Hou | | pyami|general functions| |
1645 | | sinedon|Leginon/database interaction| |
||
1646 | 26 | Amber Herold | | pyScope|microscope control and monitoring| |
1647 | | ImageViewer|image viewing for tomography| |
||
1648 | |||
1649 | |||
1650 | |||
1651 | |||
1652 | Because numextension and libCV requires extra compilers, we have created window |
||
1653 | 27 | Amber Herold | installer for them for python 2.5 and made them available through "http://www.leginon.org/":http://www.leginon.org/ |
1654 | |||
1655 | 11 | Amber Herold | |_.Downloadfile Name|_.Installed Python Package File|_.Purpose:| |
1656 | |NumExtension-1.2.0.win32-py2.5.exe|numextension.pyd|c extension for numerical processing| |
||
1657 | 1 | Eric Hou | |libCV-0.2.win32-py2.5.exe|libCV.pyd|small c library of algorithm from computer vision field| |
1658 | 11 | Amber Herold | |
1659 | |||
1660 | |||
1661 | 16 | Amber Herold | |
1662 | 11 | Amber Herold | |
1663 | |||
1664 | |||
1665 | h2. Check out SVN Source Files from the depository |
||
1666 | |||
1667 | |||
1668 | |||
1669 | Use your mouse to do the following |
||
1670 | * Create Leginon-1.6-ALL directory somewhere at your convenience |
||
1671 | |||
1672 | 1 | Eric Hou | |
1673 | 11 | Amber Herold | * Change directory into Leginon-1.6-ALL |
1674 | 17 | Amber Herold | |
1675 | 1 | Eric Hou | |
1676 | 11 | Amber Herold | * Right-click the mouse botton in this directory window and select Tortoise svn |
1677 | Checkout in the menu:!http://emg.nysbc.org/software/leginon/images/images/svnmenu.png! |
||
1678 | 17 | Amber Herold | |
1679 | 11 | Amber Herold | |
1680 | * Set up svn checkout window like this for <link linkend="windows_packages">EACH |
||
1681 | 1 | Eric Hou | of the leginon packages</link>.!http://emg.nysbc.org/software/leginon/images/images/svnco.png! |
1682 | 11 | Amber Herold | |
1683 | |||
1684 | |||
1685 | |||
1686 | 16 | Amber Herold | |
1687 | 11 | Amber Herold | |
1688 | |||
1689 | 1 | Eric Hou | |
1690 | 11 | Amber Herold | h2. Install the packages you downloaded from NRAMM svn depository |
1691 | |||
1692 | |||
1693 | |||
1694 | |||
1695 | |||
1696 | * Start a command line Window from Start Menu |
||
1697 | |||
1698 | |||
1699 | * Install the package in each folder with commands such as |
||
1700 | <pre>cd Your_Download_Place\Leginon-1.6-ALL\leginon |
||
1701 | 1 | Eric Hou | c:\\python25\python.exe setup.py install</pre> |
1702 | 11 | Amber Herold | |
1703 | |||
1704 | 1 | Eric Hou | |
1705 | |||
1706 | |||
1707 | |||
1708 | |||
1709 | 27 | Amber Herold | |
1710 | |||
1711 | h2. Download the two Window Installer Files from Leginon website |
||
1712 | |||
1713 | |||
1714 | |||
1715 | 28 | Amber Herold | "http://www.leginon.org/":http://www.leginon.org/ h2. Install individual packages |
1716 | 11 | Amber Herold | |
1717 | |||
1718 | |||
1719 | Excute the installer files and follow the instruction. |
||
1720 | |||
1721 | 16 | Amber Herold | |
1722 | 11 | Amber Herold | |
1723 | |||
1724 | |||
1725 | h2. Mapping Drives: |
||
1726 | |||
1727 | |||
1728 | |||
1729 | If you plan to run Leginon directly on the Windows machine, such as in <link |
||
1730 | linkend="config_C">configuration C</link>, and your data files are served through a |
||
1731 | Samba server on a Linux machine, you will need to map the network drive. For example, if |
||
1732 | 1 | Eric Hou | your Samba server has a hostname your_smbserver, and you have set up a share called |
1733 | 11 | Amber Herold | [your_share_point] which points to /your_data_path/ and leginon data will be saved under a |
1734 | folder in /your_data_path/leginon/ |
||
1735 | |||
1736 | |||
1737 | 1 | Eric Hou | |
1738 | 11 | Amber Herold | |
1739 | * Start, My Computer |
||
1740 | 1 | Eric Hou | |
1741 | 11 | Amber Herold | |
1742 | * Tools menu, Map network drive |
||
1743 | |||
1744 | 1 | Eric Hou | |
1745 | 17 | Amber Herold | * Use an unmapped drive such as Z: |
1746 | 11 | Amber Herold | |
1747 | Enter shared path in Windows format |
||
1748 | as<pre>\\your_smbserver\your_share_point</pre> |
||
1749 | 17 | Amber Herold | |
1750 | 11 | Amber Herold | |
1751 | * Add the drive and the Linux path to leginon.cfg on the Windows machine |
||
1752 | as<pre>[Drive Mapping] |
||
1753 | Z:/your_data_path</pre> |
||
1754 | 17 | Amber Herold | |
1755 | 11 | Amber Herold | |
1756 | * Add image path to leginon.cfg on the Windows machine in Linux format |
||
1757 | as<pre>[Images] |
||
1758 | path:/your_data_path/leginon</pre> |
||
1759 | |||
1760 | |||
1761 | |||
1762 | |||
1763 | |||
1764 | 16 | Amber Herold | |
1765 | 11 | Amber Herold | |
1766 | |||
1767 | |||
1768 | h2. Configure leginon.cfg: |
||
1769 | |||
1770 | |||
1771 | Follow instruction in "<link linkend="leginon_cfg">Configure leginon.cfg</link>" in |
||
1772 | the section for Linux installation but note the location of the configuration files |
||
1773 | follows. In addition, if the storage disk is mapped onto the Windows PC as drive Z, this |
||
1774 | mapping should be included in leginon.cfg. See above. |
||
1775 | |||
1776 | |||
1777 | |||
1778 | |||
1779 | * Configurations for all users |
||
1780 | 22 | Amber Herold | |
1781 | 11 | Amber Herold | |
1782 | |||
1783 | <pre> <Python directory>\Lib\site-packages\Leginon\config\leginon.cfg</pre> |
||
1784 | |||
1785 | |||
1786 | Example: |
||
1787 | <pre> C:\Python25\Lib\site-packages\Leginon\config\leginon.cfg</pre> |
||
1788 | |||
1789 | |||
1790 | * Configurations for individual users |
||
1791 | 22 | Amber Herold | |
1792 | 11 | Amber Herold | |
1793 | |||
1794 | <pre> <Home directory>\leginon.cfg</pre> |
||
1795 | |||
1796 | |||
1797 | Example: |
||
1798 | <pre> C:\Documents and Settings\Leginon User\leginon.cfg </pre> |
||
1799 | |||
1800 | |||
1801 | * A skeleton (default) configuration file is available: |
||
1802 | |||
1803 | |||
1804 | |||
1805 | <pre> C:\Python25\Lib\site-packages\Leginon\config\default.cfg</pre> |
||
1806 | |||
1807 | |||
1808 | |||
1809 | |||
1810 | |||
1811 | 1 | Eric Hou | |
1812 | 16 | Amber Herold | |
1813 | 11 | Amber Herold | |
1814 | |||
1815 | |||
1816 | h2. Configure sinedon.cfg: |
||
1817 | |||
1818 | |||
1819 | Sinedon is designed to be able to interact with multiple databases. |
||
1820 | |||
1821 | Follow instruction in "<link linkend="sinedon_cfg">Configure sinedon.cfg</link>" in |
||
1822 | the section for Linux installation but note the location of the configuration files |
||
1823 | follows. |
||
1824 | |||
1825 | |||
1826 | |||
1827 | |||
1828 | * For all users, put sinedon.cfg with the installed package |
||
1829 | as<pre>C:\Python25\Lib\site-packages\sinedon\sinedon.cfg</pre> |
||
1830 | 22 | Amber Herold | |
1831 | 11 | Amber Herold | |
1832 | * Your home directory on |
||
1833 | Windows:<pre>C:\Documents and Settings\your_name></pre> |
||
1834 | |||
1835 | |||
1836 | * the skeleton sinedon configuration file |
||
1837 | is<pre>C:\Python25\Lib\site-packages\sinedon\examples\sinedon.cfg</pre> |
||
1838 | |||
1839 | |||
1840 | |||
1841 | |||
1842 | |||
1843 | 16 | Amber Herold | |
1844 | 11 | Amber Herold | |
1845 | |||
1846 | |||
1847 | 1 | Eric Hou | h2. Create Leginon and Leginon Client shortcut in Start menu menu under Leginon |
1848 | 11 | Amber Herold | |
1849 | |||
1850 | |||
1851 | This instruction refers to Windows XP |
||
1852 | |||
1853 | |||
1854 | 1 | Eric Hou | |
1855 | 11 | Amber Herold | |
1856 | * Go to C:\Documents and Settings\All Users\Start Menu\Programs\ and create a new |
||
1857 | folder named Leginon. |
||
1858 | 17 | Amber Herold | |
1859 | 11 | Amber Herold | |
1860 | * In another window, go |
||
1861 | 1 | Eric Hou | to<pre>C:\Python25\Lib\site-packages\Leginon</pre> |
1862 | 11 | Amber Herold | |
1863 | |||
1864 | * Create a shortcut from start-leginon.py as Leginon and a shortcut from |
||
1865 | launcher.py as Leginon Client. |
||
1866 | 17 | Amber Herold | |
1867 | 11 | Amber Herold | |
1868 | * Move the two shortcuts into |
||
1869 | <pre>C:\Documents and Settings\All Users\Start Menu\Programs\Leginon</pre> |
||
1870 | |||
1871 | |||
1872 | |||
1873 | |||
1874 | |||
1875 | 16 | Amber Herold | |
1876 | 11 | Amber Herold | |
1877 | 1 | Eric Hou | |
1878 | 11 | Amber Herold | |
1879 | h2. Additional Software (Optional): |
||
1880 | |||
1881 | |||
1882 | TightVNC (http://www.tightvnc.com) |
||
1883 | |||
1884 | |||
1885 | |||
1886 | |||
1887 | |||
1888 | 16 | Amber Herold | |
1889 | 11 | Amber Herold | |
1890 | |||
1891 | |||
1892 | h2. Database server Windows Installation |
||
1893 | 16 | Amber Herold | |
1894 | 11 | Amber Herold | |
1895 | |||
1896 | |||
1897 | h2. We do not do this at NRAMM. Please follow the instruction in Linux installation and |
||
1898 | modify it for Windows at your own risk. |
||
1899 | |||
1900 | |||
1901 | |||
1902 | For a good Windows specific instruction for general PHP configuration with MySQL for |
||
1903 | Apache 2 in Windows, try http://www.artfulsoftware.com/php_mysql_win.html. |
||
1904 | |||
1905 | |||
1906 | |||
1907 | |||
1908 | |||
1909 | 16 | Amber Herold | |
1910 | 1 | Eric Hou | |
1911 | 11 | Amber Herold | |
1912 | |||
1913 | h2. Additional installation on the microscope computer: |
||
1914 | |||
1915 | |||
1916 | |||
1917 | The full leginon and its supporting packages need to be installed on the Windows computer |
||
1918 | controlling the microscope. Additional programs are required for communication with the CCD |
||
1919 | and extra functions for Tecnai scripting not supported as default by FEI Tecnai |
||
1920 | 16 | Amber Herold | microscopes |
1921 | 11 | Amber Herold | |
1922 | |||
1923 | |||
1924 | h2. Required supporting programs for the CCD camera from camera makers |
||
1925 | |||
1926 | |||
1927 | 1 | Eric Hou | |
1928 | Install and register the following programs for CCD cameras from the two makes: |
||
1929 | 14 | Amber Herold | |
1930 | 11 | Amber Herold | |
1931 | |||
1932 | |_.Camera Make:|_.File:| |
||
1933 | | Gatan|TecnaiCCD.dll| |
||
1934 | | Tietz|CAMC4.exe*| |
||
1935 | |||
1936 | |||
1937 | |||
1938 | |||
1939 | * We have experienced slowness of the CAMC4.exe comes with later version Tecnai TUI/TIA. |
||
1940 | Replacing it with an earlier version of CAMC4.exe resolved the problem. |
||
1941 | |||
1942 | 16 | Amber Herold | |
1943 | 11 | Amber Herold | |
1944 | |||
1945 | |||
1946 | h2. Additional Package required from NRAMM for Gatan camera or camera that uses TIA |
||
1947 | |||
1948 | 1 | Eric Hou | |
1949 | 11 | Amber Herold | |
1950 | 1 | Eric Hou | For Gatan Camera or FEI Eagle Camera that uses TIA, comarray package need to be install |
1951 | with python |
||
1952 | |||
1953 | 11 | Amber Herold | |
1954 | |||
1955 | |_.SVN Package Name|_.Installed Python Package Name|_.Reason for update:| |
||
1956 | |comarray|comarray|com module output conversion to array| |
||
1957 | |||
1958 | |||
1959 | |||
1960 | |||
1961 | |||
1962 | |||
1963 | 17 | Amber Herold | * <link linkend="window_svn">Check out the comarray package</link> from svn |
1964 | 11 | Amber Herold | depository with your SVN client |
1965 | |||
1966 | <pre>cd Leginon-1.6-ALL |
||
1967 | 1 | Eric Hou | svn co http://emg.nysbc.org/svn/comarray/branches/leg1.6 comarray</pre> |
1968 | 11 | Amber Herold | |
1969 | * Start a command line Window from Start Menu |
||
1970 | |||
1971 | |||
1972 | * Install the package with commands such as |
||
1973 | <pre>cd Your_Download_Place\Leginon-1.6-ALL\comarray |
||
1974 | c:\\python25\python.exe setup.py install</pre> |
||
1975 | |||
1976 | |||
1977 | |||
1978 | |||
1979 | |||
1980 | 16 | Amber Herold | |
1981 | 11 | Amber Herold | |
1982 | |||
1983 | |||
1984 | h2. Supporting programs for film exposure |
||
1985 | |||
1986 | |||
1987 | 1 | Eric Hou | |
1988 | Install the following if you need film exposure on FEI Tecnai TEM through Leginon, |
||
1989 | 11 | Amber Herold | available through FEI. Please contact Max Otten: <email>mto@feico.com</email> and request |
1990 | 14 | Amber Herold | for adaexp.exe that works with your version of Tecnai user interface program. |
1991 | 13 | Amber Herold | |
1992 | 11 | Amber Herold | |
1993 | |||
1994 | |_.Name:|_.File:| |
||
1995 | | exposure adaptor|adaexp.exe| |
||
1996 | |||
1997 | |||
1998 | |||
1999 | 16 | Amber Herold | |
2000 | 11 | Amber Herold | |
2001 | |||
2002 | |||
2003 | h2. Register adaexep.exe |
||
2004 | |||
2005 | |||
2006 | |||
2007 | * From the command prompt: |
||
2008 | |||
2009 | <pre>adaexp.exe /regserver</pre> |
||
2010 | |||
2011 | * From the program start menu under pyScope or |
||
2012 | C:\Python25\Lib\site-packages\pyScope\ |
||
2013 | |||
2014 | <pre>updatecom.py</pre> |
||
2015 | |||
2016 | |||
2017 | |||
2018 | |||
2019 | 16 | Amber Herold | |
2020 | 11 | Amber Herold | |
2021 | |||
2022 | 1 | Eric Hou | |
2023 | 11 | Amber Herold | h2. Modify instruments.cfg: |
2024 | |||
2025 | |||
2026 | |||
2027 | Sinedon now have full control of database interaction, therefore, the database |
||
2028 | configuration in leginon.cfg is no longer needed. |
||
2029 | |||
2030 | |||
2031 | |||
2032 | |||
2033 | * Modify the file instruments.cfg in the installed pyScope directory to that for |
||
2034 | your microscope and camera. For example, if your microscope uses Tecnai Scripting |
||
2035 | Interface and you have a Gatan camera that you interface through |
||
2036 | DigitalMicrograph: |
||
2037 | |||
2038 | |||
2039 | |||
2040 | <pre>[tem] |
||
2041 | class: tecnai.Tecnai |
||
2042 | 1 | Eric Hou | [camera] |
2043 | 11 | Amber Herold | class: gatan.Gatan</pre> |
2044 | |||
2045 | |||
2046 | |||
2047 | The file contains other examples of microscope and camera drivers that we |
||
2048 | distribute from NRAMM. |
||
2049 | |||
2050 | |||
2051 | |||
2052 | |||
2053 | |||
2054 | 16 | Amber Herold | |
2055 | 11 | Amber Herold | |
2056 | |||
2057 | |||
2058 | h2. Run updatecom.py |
||
2059 | |||
2060 | |||
2061 | |||
2062 | From a command line window: |
||
2063 | |||
2064 | |||
2065 | |||
2066 | <pre>cd C:\python25\Lib\Site-Packages\pyScope |
||
2067 | C:\python25\python.exe updatecom.py</pre> |
||
2068 | |||
2069 | |||
2070 | |||
2071 | This should generate a few files, including tecnaicom.py, gatancom.py and tietzcom.py, |
||
2072 | in the same directory. |
||
2073 | |||
2074 | 16 | Amber Herold | |
2075 | 11 | Amber Herold | |
2076 | |||
2077 | |||
2078 | h2. Additional setup on Tietz PXL camera (optional) |
||
2079 | |||
2080 | |||
2081 | |||
2082 | The actual Tietz PXL camera dimension is slightly larger than 2048 x 2048. If you'd like |
||
2083 | 1 | Eric Hou | to take the images using the maximum of 2048 x 2048 pixels, you may modify the function that |
2084 | 11 | Amber Herold | get camera dimension in tietz.py of pyScope package. |
2085 | |||
2086 | |||
2087 | * Go to C:\Python25\Lib\site-packages\pyScope\ |
||
2088 | |||
2089 | |||
2090 | * Edit tietz.py with a plain text editor |
||
2091 | |||
2092 | |||
2093 | * Find the lines: |
||
2094 | |||
2095 | |||
2096 | |||
2097 | 1 | Eric Hou | <pre> def getCameraSize(self): |
2098 | 11 | Amber Herold | # {'type': dict, 'values': {'x': {'type': int}, 'y': {'type': int}}}} |
2099 | x = self._getParameterValue('cpTotalDimensionX') |
||
2100 | y = self._getParameterValue('cpTotalDimensionY') |
||
2101 | return {'x': x, 'y': y} |
||
2102 | 1 | Eric Hou | </pre> |
2103 | 11 | Amber Herold | |
2104 | |||
2105 | |||
2106 | * Change the last line to: |
||
2107 | |||
2108 | |||
2109 | |||
2110 | <pre> return {'x': 2048, 'y': 2048}</pre> |
||
2111 | |||
2112 | 1 | Eric Hou | |
2113 | 11 | Amber Herold | |
2114 | |||
2115 | 16 | Amber Herold | |
2116 | 11 | Amber Herold | |
2117 | |||
2118 | |||
2119 | h2. Additional Software (Optional): |
||
2120 | |||
2121 | 1 | Eric Hou | |
2122 | 11 | Amber Herold | TightVNC (http://www.tightvnc.com) if you get tired of going into the microscope room |
2123 | just to open the column valves. |
||
2124 | |||
2125 | |||
2126 | |||
2127 | |||
2128 | |||
2129 | 16 | Amber Herold | |
2130 | 11 | Amber Herold | |
2131 | |||
2132 | 1 | Eric Hou | |
2133 | 11 | Amber Herold | h2. What is next |
2134 | 16 | Amber Herold | |
2135 | 11 | Amber Herold | |
2136 | |||
2137 | 1 | Eric Hou | |
2138 | 11 | Amber Herold | h2. Perform Administration Setup |
2139 | |||
2140 | |||
2141 | See Next chapter on <link linkend="addusers">Leginon Administration Tools</link>. |
||
2142 | 1 | Eric Hou | |
2143 | 11 | Amber Herold | |
2144 | 16 | Amber Herold | |
2145 | 11 | Amber Herold | |
2146 | |||
2147 | |||
2148 | h2. Create a test project |
||
2149 | |||
2150 | |||
2151 | See the chapter on <link linkend="project">Project Management Tools</link>. |
||
2152 | 1 | Eric Hou | |
2153 | 16 | Amber Herold | |
2154 | 11 | Amber Herold | |
2155 | |||
2156 | |||
2157 | h2. Perform Microscope Setup and Test run |
||
2158 | |||
2159 | |||
2160 | See the chapter on <link linkend="runleg_chapter">Start Leginon</link>. |
||
2161 | |||
2162 | |||
2163 | 1 | Eric Hou | |
2164 | 16 | Amber Herold | |
2165 | 11 | Amber Herold | |
2166 | |||
2167 | |||
2168 | h2. Backup Practices |
||
2169 | 16 | Amber Herold | |
2170 | 11 | Amber Herold | |
2171 | |||
2172 | |||
2173 | h2. Ideal setup: |
||
2174 | 16 | Amber Herold | |
2175 | 11 | Amber Herold | |
2176 | 1 | Eric Hou | |
2177 | 11 | Amber Herold | |
2178 | h2. Regular computer backup |
||
2179 | |||
2180 | |||
2181 | |||
2182 | To protect your program installation. |
||
2183 | |||
2184 | 16 | Amber Herold | |
2185 | 11 | Amber Herold | |
2186 | 1 | Eric Hou | |
2187 | 11 | Amber Herold | |
2188 | h2. Full backup of the databases every night |
||
2189 | |||
2190 | |||
2191 | |||
2192 | The database is the metadata generated by Leginon named "dbemdata" in the installation |
||
2193 | example. |
||
2194 | |||
2195 | 16 | Amber Herold | |
2196 | 11 | Amber Herold | |
2197 | |||
2198 | |||
2199 | 1 | Eric Hou | h2. Full/Incremental/differential backup of the images |
2200 | 11 | Amber Herold | |
2201 | |||
2202 | |||
2203 | The image files located in [your storage disk] should be backup in full at least once |
||
2204 | a month, and nightly in differential or incremental mode. |
||
2205 | |||
2206 | 1 | Eric Hou | |
2207 | 11 | Amber Herold | |
2208 | 16 | Amber Herold | |
2209 | 11 | Amber Herold | |
2210 | |||
2211 | |||
2212 | h2. Current NRAMM setup: |
||
2213 | |||
2214 | |||
2215 | |||
2216 | Because our tape backup system is not on-site and the data have to transfer over slow |
||
2217 | network to perform the task, we have not been able to backup in the ideal setting. Here is |
||
2218 | 16 | Amber Herold | what we currently do: |
2219 | 11 | Amber Herold | |
2220 | |||
2221 | |||
2222 | h2. Regular computer backup |
||
2223 | |||
2224 | |||
2225 | |||
2226 | TSRI Research Computing provides regular back up service that does full backup of the |
||
2227 | computers every four weeks and incremental backup every night. The full backup expires in |
||
2228 | 4 months and the incremental backup one month. We do this for the computers running |
||
2229 | Leginon main program, the database server, as well as the web server. |
||
2230 | |||
2231 | 16 | Amber Herold | |
2232 | 11 | Amber Herold | |
2233 | |||
2234 | |||
2235 | h2. Regular backup & tar of the databases every night |
||
2236 | |||
2237 | |||
2238 | 16 | Amber Herold | |
2239 | 11 | Amber Herold | On top of the TSRI backup, we also tar the database everynight and store it on the |
2240 | institutional tape library. |
||
2241 | |||
2242 | |||
2243 | |||
2244 | |||
2245 | |||
2246 | h2. rsync to a tape library of the image storage disk |
||
2247 | |||
2248 | |||
2249 | |||
2250 | As our image storage disks total 15T byte, we currently use rsync function to update a |
||
2251 | copy on our institutional tape library. It creates new files, updates old files, but does |
||
2252 | 1 | Eric Hou | not remove old files on the tape if it is removed on the storage disk. We do not think |
2253 | this is the best solution since it is not possible to retrieve old files that have been |
||
2254 | modified on a later time. |