Project

General

Profile

Start with existing CentOS installation » History » Version 11

Amber Herold, 01/27/2010 09:13 AM

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