Start with existing CentOS installation » History » Version 2
Amber Herold, 01/19/2010 09:02 PM
1 | 1 | Amber Herold | h1. Start with existing CentOS installation |
---|---|---|---|
2 | |||
3 | 2 | Amber Herold | h2. 3. Download additional software |
4 | |||
5 | h3. 3.1. Install the additional package repositories |
||
6 | |||
7 | *NOTE* |
||
8 | |||
9 | There are several additional CentOS repositories that you can install. |
||
10 | These repositories provide additional packages, such as patented software (MP3 players), |
||
11 | closed source applications (Flash plugin, Adobe Acrobat Reader) |
||
12 | and lesser used packages (python numpy, Gnu Scientific Library). |
||
13 | But some repositories install packages over other packages, |
||
14 | which can cause problems and conflicts (ATrpms is bad at this). So I recommend only installing |
||
15 | EPEL and RPM Fusion. Read more here: |
||
16 | "CentOS Additional Repositories":http://wiki.centos.org/AdditionalResources/Repositories |
||
17 | |||
18 | h4. 3.1.1. Extra Packages for Enterprise Linux (EPEL) |
||
19 | |||
20 | * http://fedoraproject.org/wiki/EPEL |
||
21 | * contains a wealth of packages required for appion |
||
22 | |||
23 | .Download repository rpm and install |
||
24 | |||
25 | |||
26 | <pre> |
||
27 | $ sudo rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/`uname -i`/epel-release-5-3.noarch.rpm |
||
28 | </pre> |
||
29 | |||
30 | h4. 3.1.2. RPM Fusion |
||
31 | |||
32 | * http://rpmfusion.org/ |
||
33 | * good for mp3 and other patent limited software |
||
34 | |||
35 | .Download repository rpms and install |
||
36 | |||
37 | |||
38 | <pre> |
||
39 | $ sudo rpm -Uhv http://download1.rpmfusion.org/free/el/updates/testing/5/`uname -i`/rpmfusion-free-release-5-0.1.noarch.rpm |
||
40 | $ sudo rpm -Uvh http://download1.rpmfusion.org/nonfree/el/updates/testing/5/`uname -i`/rpmfusion-nonfree-release-5-0.1.noarch.rpm |
||
41 | </pre> |
||
42 | |||
43 | h3. 3.2. Update current packages |
||
44 | |||
45 | .Update the updater to make life easier |
||
46 | |||
47 | |||
48 | <pre> |
||
49 | $ sudo yum -y update yum |
||
50 | </pre> |
||
51 | |||
52 | .Update all packages |
||
53 | |||
54 | |||
55 | <pre> |
||
56 | $ sudo yum -y update |
||
57 | </pre> |
||
58 | |||
59 | |||
60 | *NOTE* |
||
61 | Download was over 129 MB (in July 2009). If you have a slow internet connection you can setup presto/deltarpms, "see this email]":http://www.linux-archive.org/centos-development/222706-presto-deltarpm.html |
||
62 | |||
63 | .Install Complete list of additional packages: |
||
64 | |||
65 | * *python tools*: python-tools python-devel |
||
66 | * *general applications*: subversion ImageMagick grace gnuplot python-matplotlib |
||
67 | * *Tilt Picker*: wxPython numpy scipy python-imaging |
||
68 | * *FindEM*: gcc-gfortran compat-gcc-34-g77 |
||
69 | * *Ace 2*: gcc-objc fftw3-devel gsl-devel |
||
70 | * *Sinedon*: mysql mysql-server MySQL-python |
||
71 | * *DBEM*: httpd php php-mysql phpMyAdmin |
||
72 | * *Xmipp MPI*: gcc-c++ openmpi-devel libtiff-devel |
||
73 | * *MRC tools*: php-devel gd-devel re2c fftw2-devel php-gd |
||
74 | * *UCSF Chimera imaging*: xorg-x11-server-Xvfb |
||
75 | |||
76 | |||
77 | <pre> |
||
78 | $ sudo yum -y install \ |
||
79 | python-tools python-devel python-matplotlib \ |
||
80 | subversion ImageMagick grace gnuplot \ |
||
81 | wxPython numpy scipy python-imaging \ |
||
82 | gcc-gfortran compat-gcc-34-g77 \ |
||
83 | gcc-objc fftw3-devel gsl-devel \ |
||
84 | mysql mysql-server MySQL-python \ |
||
85 | httpd php php-mysql phpMyAdmin \ |
||
86 | gcc-c++ openmpi-devel libtiff-devel \ |
||
87 | php-devel gd-devel re2c fftw2-devel php-gd \ |
||
88 | xorg-x11-server-Xvfb |
||
89 | </pre> |
||
90 | |||
91 | |||
92 | If you have an nVidia video card and setup RPM fusion, install the nVidia binary, will speed things up especially for UCSF Chimera |
||
93 | |||
94 | |||
95 | <pre> |
||
96 | $ sudo yum -y install nvidia-x11-drv |
||
97 | </pre> |
||
98 | |||
99 | |||
100 | |||
101 | .Clean up packages to save drive space |
||
102 | |||
103 | |||
104 | <pre> |
||
105 | $ sudo yum clean all |
||
106 | </pre> |
||
107 | |||
108 | |||
109 | |||
110 | .Re-index the hard drive, this will come in handy later |
||
111 | |||
112 | |||
113 | <pre> |
||
114 | $ sudo updatedb |
||
115 | </pre> |
||
116 | |||
117 | |||
118 | |||
119 | .Enable servers on reboot |
||
120 | |||
121 | |||
122 | <pre> |
||
123 | $ sudo /sbin/chkconfig httpd on |
||
124 | </pre> |
||
125 | |||
126 | |||
127 | |||
128 | <pre> |
||
129 | $ sudo /sbin/chkconfig mysqld on |
||
130 | </pre> |
||
131 | |||
132 | |||
133 | |||
134 | You can further configure this with the GUI and turn off unnecessary items |
||
135 | |||
136 | |||
137 | <pre> |
||
138 | $ system-config-services |
||
139 | </pre> |
||
140 | |||
141 | |||
142 | |||
143 | .Reboot the computer |
||
144 | |||
145 | |||
146 | <pre> |
||
147 | $ sudo reboot |
||
148 | </pre> |
||
149 | |||
150 | |||
151 | h2. 4. Download and install Leginon and associated packages |
||
152 | Refer to [http://code.google.com/p/appion/wiki/AppionInstall_with_Leginon#5._processing_server-side_installation] |
||
153 | ---- |
||
154 | |||
155 | h2. 5. Compile and setup python (pyappion) programs |
||
156 | |||
157 | h3. 5.1. Compile FindEM |
||
158 | |||
159 | * Goto pyappion/findem folder to make findem.exe |
||
160 | |||
161 | * Compile the libraries and binary |
||
162 | |||
163 | |||
164 | <pre> |
||
165 | $ make |
||
166 | </pre> |
||
167 | |||
168 | |||
169 | |||
170 | * Test findem.exe to see if it runs |
||
171 | |||
172 | |||
173 | <pre> |
||
174 | $ make test |
||
175 | </pre> |
||
176 | |||
177 | |||
178 | |||
179 | *WARNING* |
||
180 | Only if the first part fails, you must add the path to libg2c.so library file. |
||
181 | Otherwise skip to next section. |
||
182 | |||
183 | * locate libg2c.so library file |
||
184 | |||
185 | |||
186 | <pre> |
||
187 | $ ls /usr/lib/gcc/`uname -i`-redhat-linux/3.4.6/libg2c.so |
||
188 | </pre> |
||
189 | |||
190 | |||
191 | |||
192 | <pre> |
||
193 | $ locate libg2c.so |
||
194 | </pre> |
||
195 | |||
196 | |||
197 | |||
198 | * Edit Makefile with location of libg2c.so |
||
199 | |||
200 | |||
201 | <pre> |
||
202 | $ nano Makefile |
||
203 | </pre> |
||
204 | |||
205 | |||
206 | |||
207 | * Example: EXLIBS=-L/usr/lib/gcc/i386-redhat-linux/3.4.6/ -lg2c |
||
208 | * Re-compile |
||
209 | |||
210 | h3. 5.2. Compile Ace2 |
||
211 | |||
212 | *WARNING* |
||
213 | ace2 typically requires fftw 3.2 or greater, but you can remove the FFTW_WISDOM_ONLY flag in Image.m |
||
214 | |||
215 | *NOTE* |
||
216 | 64 bit binaries are included with pyappion |
||
217 | |||
218 | * Goto pyappion/ace2 |
||
219 | * compile the libraries and binary |
||
220 | * test to see if program runs |
||
221 | |||
222 | |||
223 | <pre> |
||
224 | $ make |
||
225 | $ ./ace2.exe -h |
||
226 | $ ./ace2correct.exe -h |
||
227 | $ mv -v ./ace2*.exe ../bin |
||
228 | </pre> |
||
229 | |||
230 | |||
231 | |||
232 | h3. 5.3. Compile Radermacher module |
||
233 | |||
234 | * Goto pyappion/radermacher |
||
235 | |||
236 | * compile the libraries and binary |
||
237 | |||
238 | |||
239 | <pre> |
||
240 | $ python ./setup.py build |
||
241 | </pre> |
||
242 | |||
243 | |||
244 | |||
245 | * install module globally |
||
246 | |||
247 | |||
248 | <pre> |
||
249 | $ sudo python ./setup.py install |
||
250 | </pre> |
||
251 | |||
252 | |||
253 | |||
254 | * test installed module |
||
255 | |||
256 | |||
257 | <pre> |
||
258 | $ python |
||
259 | </pre> |
||
260 | |||
261 | |||
262 | |||
263 | |||
264 | <pre> |
||
265 | >>> import radermacher |
||
266 | >>> <Ctrl-D> |
||
267 | </pre> |
||
268 | |||
269 | |||
270 | |||
271 | h3. 5.4. Test PyAppion |
||
272 | |||
273 | * Go into pyappion directory |
||
274 | * Add leginon to PYTHONPATH if Leginon is built locally |
||
275 | |||
276 | |||
277 | <pre> |
||
278 | $ export PYTHONPATH="$LEGINONPATH:$PYTHONPATH" |
||
279 | </pre> |
||
280 | |||
281 | |||
282 | |||
283 | * Add pyappion lib to PYTHONPATH |
||
284 | |||
285 | |||
286 | <pre> |
||
287 | $ export PYTHONPATH="/your-complete-path-to-pyappion/lib:$PYTHONPATH" |
||
288 | </pre> |
||
289 | |||
290 | |||
291 | |||
292 | * Run the test script |
||
293 | |||
294 | |||
295 | <pre> |
||
296 | $ ./check.sh |
||
297 | </pre> |
||
298 | |||
299 | |||
300 | |||
301 | *NOTE* |
||
302 | You can ignore EMAN, MATLAB, and UCSF Chimera errors at this point |
||
303 | |||
304 | ---- |
||
305 | |||
306 | h2. 6. Setup MySQL (appiondata) databases |
||
307 | |||
308 | Refer to [http://code.google.com/p/appion/wiki/AppionInstall_with_Leginon#2._Setup_MySQL_databases] |
||
309 | |||
310 | h3. Configure MySQL |
||
311 | |||
312 | Edit the configuration file: |
||
313 | |||
314 | |||
315 | <pre> |
||
316 | $ sudo nano /etc/my.cnf |
||
317 | </pre> |
||
318 | |||
319 | |||
320 | Add or edit the following lines: |
||
321 | |||
322 | |||
323 | <pre> |
||
324 | query_cache_type = 1 |
||
325 | query_cache_size = 100M |
||
326 | query_cache_limit= 100M |
||
327 | </pre> |
||
328 | |||
329 | |||
330 | Restart MySQL |
||
331 | |||
332 | |||
333 | <pre> |
||
334 | $ sudo /sbin/service mysqld restart |
||
335 | </pre> |
||
336 | |||
337 | |||
338 | h3. Configure phpMyAdmin |
||
339 | |||
340 | Edit the phpMyAdmin config file: |
||
341 | |||
342 | |||
343 | <pre> |
||
344 | $ sudo nano /etc/phpMyAdmin/config.inc.php |
||
345 | </pre> |
||
346 | |||
347 | |||
348 | and change the following lines: |
||
349 | |||
350 | |||
351 | <pre> |
||
352 | $cfg['Servers'][$i]['AllowRoot'] = FALSE; |
||
353 | </pre> |
||
354 | |||
355 | |||
356 | Edit the phpMyAdmin apache config file: |
||
357 | |||
358 | |||
359 | <pre> |
||
360 | $ sudo nano /etc/httpd/conf.d/phpMyAdmin.conf |
||
361 | </pre> |
||
362 | |||
363 | |||
364 | and change the following lines: |
||
365 | |||
366 | |||
367 | <pre> |
||
368 | <Directory /usr/share/phpMyAdmin/> |
||
369 | order deny,allow |
||
370 | deny from all |
||
371 | allow from 127.0.0.1 |
||
372 | allow from YOUR_IP_ADDRESS |
||
373 | </Directory> |
||
374 | </pre> |
||
375 | |||
376 | |||
377 | |||
378 | ---- |
||
379 | |||
380 | h2. 7. Install webpages (appionweb) |
||
381 | |||
382 | Refer to [http://code.google.com/p/appion/wiki/AppionInstall_with_Leginon#3._web_server-side_installation] |
||
383 | |||
384 | h3. Install MRC Tools |
||
385 | |||
386 | h4. Compile MRC tools |
||
387 | |||
388 | * Go to your php devel directory and untar the archive |
||
389 | * If unsure where it is, use info.php to find it under *extension_dir* |
||
390 | |||
391 | |||
392 | <pre> |
||
393 | $ cd /usr/include/php/ext/ |
||
394 | $ sudo mkdir mrc |
||
395 | $ sudo chmod 777 mrc |
||
396 | $ sudo chown $USER mrc |
||
397 | </pre> |
||
398 | |||
399 | |||
400 | |||
401 | * Unpackage MRC Tools from http://emg.nysbc.org/software/mrctools/ |
||
402 | |||
403 | |||
404 | <pre> |
||
405 | $ tar zxvf ~/php_mrc.tgz |
||
406 | $ cd mrc/ |
||
407 | </pre> |
||
408 | |||
409 | |||
410 | |||
411 | * Compile and install the MRC module |
||
412 | |||
413 | |||
414 | <pre> |
||
415 | $ phpize |
||
416 | $ ./configure |
||
417 | $ make |
||
418 | $ sudo make install |
||
419 | </pre> |
||
420 | |||
421 | |||
422 | |||
423 | h4. Configure PHP for MRC Tools |
||
424 | |||
425 | * Edit your php configuration file php.ini to add "mrc.so" extension. |
||
426 | |||
427 | |||
428 | <pre> |
||
429 | $ sudo nano /etc/php.d/mrc.ini |
||
430 | </pre> |
||
431 | |||
432 | |||
433 | |||
434 | * add mrc.so to extensions |
||
435 | |||
436 | |||
437 | <pre> |
||
438 | ; Enable mrc extension module |
||
439 | extension=mrc.so |
||
440 | </pre> |
||
441 | |||
442 | |||
443 | |||
444 | * To test MRC tools, go to this website: |
||
445 | http://emg.nysbc.org/software/mrctools/mrc_so.php |
||
446 | |||
447 | h3. Configure PHP |
||
448 | |||
449 | * increase the memory limit, EM images are big 64MB: |
||
450 | |||
451 | |||
452 | <pre> |
||
453 | memory_limit = 256M; Maximum amount of memory |
||
454 | </pre> |
||
455 | |||
456 | |||
457 | * Turn error display on: |
||
458 | |||
459 | |||
460 | <pre> |
||
461 | display_errors = On |
||
462 | </pre> |
||
463 | |||
464 | |||
465 | |||
466 | |||
467 | <pre> |
||
468 | error_reporting = E_ALL & ~E_NOTICE |
||
469 | </pre> |
||
470 | |||
471 | |||
472 | |||
473 | * restart the webserver |
||
474 | |||
475 | |||
476 | <pre> |
||
477 | $ sudo /sbin/service httpd restart |
||
478 | </pre> |
||
479 | |||
480 | |||
481 | |||
482 | h3. Install DBEM and project php source |
||
483 | |||
484 | Please consult the other [http://code.google.com/p/appion/wiki/AppionInstall_with_Leginon#3._web_server-side_installation Install guide] |
||
485 | |||
486 | h3. Configuration |
||
487 | |||
488 | h4. configure apache |
||
489 | |||
490 | * allow REMOTE_HOST lookups in apache |
||
491 | |||
492 | |||
493 | <pre> |
||
494 | $ sudo nano /etc/httpd/conf/httpd.conf |
||
495 | </pre> |
||
496 | |||
497 | |||
498 | |||
499 | * turn _HostnameLookups_ to On |
||
500 | |||
501 | |||
502 | <pre> |
||
503 | HostnameLookups On |
||
504 | </pre> |
||
505 | |||
506 | |||
507 | |||
508 | * restart the webserver |
||
509 | |||
510 | |||
511 | <pre> |
||
512 | $ sudo /sbin/service httpd restart |
||
513 | </pre> |
||
514 | |||
515 | |||
516 | |||
517 | h4. configure project_1_2, dbem_1_5_1, and dbem_1_5_1/processing |
||
518 | |||
519 | Please consult the other [http://code.google.com/p/appion/wiki/AppionInstall_with_Leginon#3._web_server-side_installation Install guide] |
||
520 | |||
521 | |||
522 | h3. Initialize database tables from the web tools |
||
523 | |||
524 | Please consult [http://code.google.com/p/appion/wiki/AppionInstall_with_Leginon#4._Create_a_test_project_and_processing_database] |
||
525 | |||
526 | |||
527 | h3. Potential problems |
||
528 | |||
529 | h4. Firewall settings |
||
530 | |||
531 | You may need to configure your firewall to allow incoming HTTP (port 80) and MySQL (port 3306) traffic: |
||
532 | |||
533 | |||
534 | <pre> |
||
535 | $ system-config-securitylevel |
||
536 | </pre> |
||
537 | |||
538 | |||
539 | h4. Security-enhanced linux |
||
540 | |||
541 | "Security-enhanced linux (SELinux)":http://en.wikipedia.org/wiki/Security-Enhanced_Linux may be preventing your files from loading. To fix this run the following command: |
||
542 | |||
543 | |||
544 | <pre> |
||
545 | $ sudo /usr/bin/chcon -R -t httpd_sys_content_t /var/www/html/ |
||
546 | </pre> |
||
547 | |||
548 | |||
549 | see "this website":http://docs.fedoraproject.org/selinux-apache-fc3/sn-simple-setup.html for more details on SELinux |
||
550 | |||
551 | ---- |
||
552 | |||
553 | h2. 8. Install external packages |
||
554 | *Please follow individual package installation instruction provided with them* |
||
555 | |||
556 | h3. Compile Xmipp for OpenMPI |
||
557 | |||
558 | * For more info, see http://xmipp.cnb.csic.es/twiki/bin/view/Xmipp/InstallingTheSoftware |
||
559 | * Go into Xmipp source directory |
||
560 | * Find openmpi directory |
||
561 | |||
562 | |||
563 | <pre> |
||
564 | $ locate libmpi.so |
||
565 | </pre> |
||
566 | |||
567 | |||
568 | |||
569 | <pre> |
||
570 | /usr/lib/openmpi/1.2.7-gcc/lib/libmpi.so |
||
571 | </pre> |
||
572 | |||
573 | |||
574 | |||
575 | * Setup Xmipp to use openmpi by changing three lines in SConstruct |
||
576 | |||
577 | |||
578 | <pre> |
||
579 | $ cp SConstruct SConstruct.orig |
||
580 | </pre> |
||
581 | |||
582 | |||
583 | |||
584 | <pre> |
||
585 | $ nano SConstruct |
||
586 | </pre> |
||
587 | |||
588 | |||
589 | |||
590 | <pre> |
||
591 | opts.Add('MPI_INCLUDE', 'MPI headers dir ', '/usr/lib/openmpi/1.2.7-gcc/include/') |
||
592 | opts.Add('MPI_LIBDIR', 'MPI libraries dir ', '/usr/lib/openmpi/1.2.7-gcc/lib/') |
||
593 | opts.Add('MPI_LIB', 'MPI library', 'mpi') |
||
594 | </pre> |
||
595 | |||
596 | |||
597 | |||
598 | * Compile |
||
599 | |||
600 | |||
601 | <pre> |
||
602 | $ sudo mpi-selector --yes --system --set `rpm --qf '%{NAME}-%{VERSION}-gcc-%{ARCH}\n' -q openmpi` |
||
603 | </pre> |
||
604 | |||
605 | |||
606 | |||
607 | <pre> |
||
608 | $ export PATH=$PATH:/usr/lib/openmpi/1.2.7-gcc/bin |
||
609 | </pre> |
||
610 | |||
611 | |||
612 | |||
613 | <pre> |
||
614 | $ ./scons.configure |
||
615 | </pre> |
||
616 | |||
617 | |||
618 | |||
619 | you should see the line: |
||
620 | |||
621 | <pre> |
||
622 | * Checking for MPI ... yes |
||
623 | </pre> |
||
624 | |||
625 | |||
626 | |||
627 | |||
628 | <pre> |
||
629 | $ ./scons.compile |
||
630 | </pre> |
||
631 | |||
632 | |||
633 | = 9. Install a PBS job submission system = |
||
634 | |||
635 | You'll need to install a "Portable Batch System":http://en.wikipedia.org/wiki/Portable_Batch_System for job submission, such as "TORQUE":http://en.wikipedia.org/wiki/TORQUE_Resource_Manager . I know Torque comes with Fedora 10, but not CentOS. |
||
636 | |||
637 | * An RPM is available in the EPEL testing section |
||
638 | |||
639 | |||
640 | <pre> |
||
641 | $ sudo yum -y --enablerepo=epel-testing install torque |
||
642 | </pre> |
||
643 | |||
644 | |||
645 | |||
646 | or another way to get packages |
||
647 | |||
648 | |||
649 | <pre> |
||
650 | $ wget http://centos.karan.org/el5/extras/testing/`uname -i`/RPMS/torque-2.1.9-1.el5.kb.`uname -i`.rpm |
||
651 | $ sudo yum -y localinstall --nogpgcheck torque-2.1.9-1.el5.kb.`uname -i`.rpm |
||
652 | $ #sudo rpm -Uhv torque-2.1.9-1.el5.kb.`uname -i`.rpm |
||
653 | |||
654 | </pre> |
||
655 | |||
656 | |||
657 | After installing torque it needs to be configured. Sorry, we have no documentation for configuring torque at this time. You may try http://www.clusterresources.com/products/torque-resource-manager.php |