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