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