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