Project

General

Profile

Start with existing CentOS installation » History » Version 4

Amber Herold, 01/19/2010 09:09 PM

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