Project

General

Profile

Start with existing CentOS installation » History » Version 12

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