Project

General

Profile

Start with existing CentOS installation » History » Version 3

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
----
156
157
h2. 5. Compile and setup python (pyappion) programs 
158
159
h3. 5.1. Compile FindEM 
160
161
 * Goto pyappion/findem folder to make findem.exe
162
163
 * Compile the libraries and binary
164
165
166
<pre>
167
$ make
168
</pre>
169
170
171
172
 * Test findem.exe to see if it runs
173
174
175
<pre>
176
$ make test
177
</pre>
178
179
180
181
*WARNING*
182
Only if the first part fails, you must add the path to libg2c.so library file.
183
Otherwise skip to next section.
184
185
 * locate libg2c.so library file
186
187
188
<pre>
189
$ ls /usr/lib/gcc/`uname -i`-redhat-linux/3.4.6/libg2c.so
190
</pre>
191
192
193
194
<pre>
195
$ locate libg2c.so
196
</pre>
197
198
199
200
 * Edit Makefile with location of libg2c.so
201
202
203
<pre>
204
$ nano Makefile
205
</pre>
206
207
208
209
 * Example: EXLIBS=-L/usr/lib/gcc/i386-redhat-linux/3.4.6/ -lg2c
210
 * Re-compile
211
212
h3. 5.2. Compile Ace2 
213
214
*WARNING*
215
ace2 typically requires fftw 3.2 or greater, but you can remove the FFTW_WISDOM_ONLY flag in Image.m
216
217
*NOTE*
218
64 bit binaries are included with pyappion
219
220
 * Goto pyappion/ace2
221
 * compile the libraries and binary
222
 * test to see if program runs
223
224
225
<pre>
226
$ make
227
$ ./ace2.exe -h
228
$ ./ace2correct.exe -h
229
$ mv -v ./ace2*.exe ../bin
230
</pre>
231
232
233
234
h3. 5.3. Compile Radermacher module 
235
236
 * Goto pyappion/radermacher
237
238
 * compile the libraries and binary
239
240
241
<pre>
242
$ python ./setup.py build
243
</pre>
244
245
246
247
 * install module globally
248
249
250
<pre>
251
$ sudo python ./setup.py install
252
</pre>
253
254
255
256
 * test installed module
257
258
259
<pre>
260
$ python
261
</pre>
262
263
264
265
266
<pre>
267
>>> import radermacher
268
>>> <Ctrl-D>
269
</pre>
270
271
272
273
h3. 5.4. Test PyAppion 
274
275
 * Go into pyappion directory
276
 * Add leginon to PYTHONPATH if Leginon is built locally
277
278
279
<pre>
280
$ export PYTHONPATH="$LEGINONPATH:$PYTHONPATH"
281
</pre>
282
283
284
285
 * Add pyappion lib to PYTHONPATH
286
287
288
<pre>
289
$ export PYTHONPATH="/your-complete-path-to-pyappion/lib:$PYTHONPATH"
290
</pre>
291
292
293
294
 * Run the test script
295
296
297
<pre>
298
$ ./check.sh
299
</pre>
300
301
302
303
*NOTE*
304
You can ignore EMAN, MATLAB, and UCSF Chimera errors at this point
305
306
----
307
308
h2. 6. Setup MySQL (appiondata) databases 
309
310
Refer to [http://code.google.com/p/appion/wiki/AppionInstall_with_Leginon#2._Setup_MySQL_databases]
311
312
h3. Configure MySQL 
313
314
Edit the configuration file:
315
316
317
<pre>
318
$ sudo nano /etc/my.cnf
319
</pre>
320
321
322
Add or edit the following lines:
323
324
325
<pre>
326
query_cache_type = 1
327
query_cache_size = 100M
328
query_cache_limit= 100M
329
</pre>
330
331
332
Restart MySQL
333
334
335
<pre>
336
$ sudo /sbin/service mysqld restart
337
</pre>
338
339
340
h3. Configure phpMyAdmin 
341
342
Edit the phpMyAdmin config file:
343
344
345
<pre>
346
$ sudo nano /etc/phpMyAdmin/config.inc.php
347
</pre> 
348
349
350
and change the following lines:
351
352
353
<pre>
354
$cfg['Servers'][$i]['AllowRoot']     = FALSE;
355
</pre>
356
357
358
Edit the phpMyAdmin apache config file:
359
360
361
<pre>
362
$ sudo nano /etc/httpd/conf.d/phpMyAdmin.conf
363
</pre>
364
365
366
and change the following lines:
367
368
369
<pre>
370
<Directory /usr/share/phpMyAdmin/>
371
   order deny,allow
372
   deny from all
373
   allow from 127.0.0.1
374
   allow from YOUR_IP_ADDRESS
375
</Directory>
376
</pre>
377
378
379
380
----
381
382
h2. 7. Install webpages (appionweb)
383
384
Refer to [http://code.google.com/p/appion/wiki/AppionInstall_with_Leginon#3._web_server-side_installation]
385
386
h3. Install MRC Tools 
387
388
h4. Compile MRC tools 
389
390
 * Go to your php devel directory and untar the archive
391
 * If unsure where it is, use info.php to find it under *extension_dir*
392
393
394
<pre>
395
$ cd /usr/include/php/ext/
396
$ sudo mkdir mrc
397
$ sudo chmod 777 mrc
398
$ sudo chown $USER mrc
399
</pre>
400
401
402
403
 * Unpackage MRC Tools from http://emg.nysbc.org/software/mrctools/
404
405
406
<pre>
407
$ tar zxvf ~/php_mrc.tgz
408
$ cd mrc/
409
</pre>
410
411
412
413
 * Compile and install the MRC module
414
415
416
<pre>
417
$ phpize
418
$ ./configure 
419
$ make
420
$ sudo make install
421
</pre>
422
423
424
425
h4. Configure PHP for MRC Tools 
426
427
 * Edit your php configuration file php.ini to add "mrc.so" extension.
428
429
430
<pre>
431
$ sudo nano /etc/php.d/mrc.ini
432
</pre>
433
434
435
436
 * add mrc.so to extensions
437
438
439
<pre>
440
; Enable mrc extension module
441
extension=mrc.so
442
</pre>
443
444
445
446
 * To test MRC tools, go to this website:
447
http://emg.nysbc.org/software/mrctools/mrc_so.php
448
449
h3. Configure PHP 
450
451
 * increase the memory limit, EM images are big 64MB:
452
453
454
<pre>
455
memory_limit = 256M; Maximum amount of memory
456
</pre>
457
458
459
 * Turn error display on:
460
461
462
<pre>
463
display_errors = On
464
</pre>
465
466
467
468
469
<pre>
470
error_reporting = E_ALL & ~E_NOTICE
471
</pre>
472
473
474
475
 * restart the webserver
476
477
478
<pre>
479
$ sudo /sbin/service httpd restart
480
</pre>
481
482
483
484
h3. Install DBEM and project php source 
485
486
Please consult the other [http://code.google.com/p/appion/wiki/AppionInstall_with_Leginon#3._web_server-side_installation Install guide]
487
488
h3. Configuration 
489
490
h4. configure apache 
491
492
 * allow REMOTE_HOST lookups in apache
493
494
495
<pre>
496
$ sudo nano /etc/httpd/conf/httpd.conf
497
</pre>
498
499
500
501
 * turn _HostnameLookups_ to On
502
503
504
<pre>
505
HostnameLookups On
506
</pre>
507
508
509
510
 * restart the webserver
511
512
513
<pre>
514
$ sudo /sbin/service httpd restart
515
</pre>
516
517
518
519
h4. configure project_1_2, dbem_1_5_1, and dbem_1_5_1/processing 
520
521
Please consult the other [http://code.google.com/p/appion/wiki/AppionInstall_with_Leginon#3._web_server-side_installation Install guide]
522
523
524
h3. Initialize database tables from the web tools 
525
526
Please consult [http://code.google.com/p/appion/wiki/AppionInstall_with_Leginon#4._Create_a_test_project_and_processing_database]
527
528
529
h3. Potential problems 
530
531
h4. Firewall settings 
532
533
You may need to configure your firewall to allow incoming HTTP (port 80) and MySQL (port 3306) traffic:
534
535
536
<pre>
537
$ system-config-securitylevel
538
</pre>
539
540
541
h4. Security-enhanced linux 
542
543
"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:
544
545
546
<pre>
547
$ sudo /usr/bin/chcon -R -t httpd_sys_content_t /var/www/html/
548
</pre>
549
550
551
see "this website":http://docs.fedoraproject.org/selinux-apache-fc3/sn-simple-setup.html  for more details on SELinux
552
553
----
554
555
h2. 8. Install external packages 
556
*Please follow individual package installation instruction provided with them*
557
558
h3. Compile Xmipp for OpenMPI 
559
560
 * For more info, see http://xmipp.cnb.csic.es/twiki/bin/view/Xmipp/InstallingTheSoftware
561
 * Go into Xmipp source directory
562
 * Find openmpi directory
563
564
565
<pre>
566
$ locate libmpi.so
567
</pre>
568
569
570
571
<pre>
572
/usr/lib/openmpi/1.2.7-gcc/lib/libmpi.so
573
</pre>
574
575
576
577
 * Setup Xmipp to use openmpi by changing three lines in SConstruct
578
579
580
<pre>
581
$ cp SConstruct SConstruct.orig
582
</pre>
583
584
585
586
<pre>
587
$ nano SConstruct
588
</pre>
589
590
591
592
<pre>
593
opts.Add('MPI_INCLUDE', 'MPI headers dir ', '/usr/lib/openmpi/1.2.7-gcc/include/')
594
opts.Add('MPI_LIBDIR', 'MPI libraries dir ', '/usr/lib/openmpi/1.2.7-gcc/lib/')
595
opts.Add('MPI_LIB', 'MPI library', 'mpi')
596
</pre>
597
598
599
600
 * Compile
601
602
603
<pre>
604
$ sudo mpi-selector --yes --system --set `rpm --qf '%{NAME}-%{VERSION}-gcc-%{ARCH}\n' -q openmpi`
605
</pre>
606
607
608
609
<pre>
610
$ export PATH=$PATH:/usr/lib/openmpi/1.2.7-gcc/bin
611
</pre>
612
613
614
615
<pre>
616
$ ./scons.configure
617
</pre>
618
619
620
621
you should see the line:
622
623
<pre>
624
* Checking for MPI ... yes
625
</pre>
626
627
628
629
630
<pre>
631
$ ./scons.compile
632
</pre>
633
634
635
= 9. Install a PBS job submission system =
636
637
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.
638
639
 * An RPM is available in the EPEL testing section
640
641
642
<pre>
643
$ sudo yum -y --enablerepo=epel-testing install torque
644
</pre>
645
646
647
648
or another way to get packages
649
650
651
<pre>
652
$ wget http://centos.karan.org/el5/extras/testing/`uname -i`/RPMS/torque-2.1.9-1.el5.kb.`uname -i`.rpm
653
$ sudo yum -y localinstall --nogpgcheck torque-2.1.9-1.el5.kb.`uname -i`.rpm
654
$ #sudo rpm -Uhv torque-2.1.9-1.el5.kb.`uname -i`.rpm
655
656
</pre>
657
658
659
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