Project

General

Profile

Start with existing CentOS installation » History » Version 16

Amber Herold, 01/27/2010 10:00 AM

1 1 Amber Herold
h1. Start with existing CentOS installation
2 5 Amber Herold
3
{{>toc}}
4 1 Amber Herold
5 13 Amber Herold
h2. 3 Download additional software 
6 2 Amber Herold
7 13 Amber Herold
h3. 3.1 Install the additional package repositories 
8 2 Amber Herold
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 13 Amber Herold
h4. 3.1.1 Extra Packages for Enterprise Linux (EPEL) 
21 2 Amber Herold
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 13 Amber Herold
h4. 3.1.2 RPM Fusion 
32 2 Amber Herold
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 13 Amber Herold
h3. 3.2 Update current packages 
44 2 Amber Herold
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 1 Amber Herold
123 2 Amber Herold
<pre>
124
$ sudo reboot
125
</pre>
126 1 Amber Herold
127 13 Amber Herold
h2. 4 Download and install Leginon and associated packages 
128
129 10 Amber Herold
Refer to [[Start_with_existing_ANY_Linux_flavor_OS#5-Processing-server-side-installation|Processing server-side installation]]
130 2 Amber Herold
131
----
132
133 13 Amber Herold
h2. 5 Compile and setup python (pyappion) programs 
134 2 Amber Herold
135 13 Amber Herold
h3. 5.1 Compile FindEM 
136 2 Amber Herold
137 12 Amber Herold
* Goto pyappion/findem folder to make findem.exe
138 2 Amber Herold
139 12 Amber Herold
* Compile the libraries and binary
140 2 Amber Herold
141
<pre>
142
$ make
143
</pre>
144
145 12 Amber Herold
* Test findem.exe to see if it runs
146 2 Amber Herold
147
<pre>
148
$ make test
149
</pre>
150
151
*WARNING*
152
Only if the first part fails, you must add the path to libg2c.so library file.
153
Otherwise skip to next section.
154
155 11 Amber Herold
* locate libg2c.so library file
156 2 Amber Herold
157
<pre>
158
$ ls /usr/lib/gcc/`uname -i`-redhat-linux/3.4.6/libg2c.so
159
</pre>
160
161 1 Amber Herold
<pre>
162 2 Amber Herold
$ locate libg2c.so
163
</pre>
164
165 1 Amber Herold
* Edit Makefile with location of libg2c.so
166 2 Amber Herold
167
<pre>
168
$ nano Makefile
169
</pre>
170 1 Amber Herold
171 11 Amber Herold
* Example: EXLIBS=-L/usr/lib/gcc/i386-redhat-linux/3.4.6/ -lg2c
172
* Re-compile
173 2 Amber Herold
174 13 Amber Herold
h3. 5.2 Compile Ace2 
175 2 Amber Herold
176
*WARNING*
177
ace2 typically requires fftw 3.2 or greater, but you can remove the FFTW_WISDOM_ONLY flag in Image.m
178
179 1 Amber Herold
*NOTE*
180 2 Amber Herold
64 bit binaries are included with pyappion
181 1 Amber Herold
182 11 Amber Herold
* Goto pyappion/ace2
183 1 Amber Herold
* compile the libraries and binary
184 11 Amber Herold
* test to see if program runs
185 2 Amber Herold
186
<pre>
187
$ make
188
$ ./ace2.exe -h
189 1 Amber Herold
$ ./ace2correct.exe -h
190 2 Amber Herold
$ mv -v ./ace2*.exe ../bin
191
</pre>
192
193 13 Amber Herold
h3. 5.3 Compile Radermacher module 
194 2 Amber Herold
195 11 Amber Herold
* Goto pyappion/radermacher
196 2 Amber Herold
197 11 Amber Herold
* compile the libraries and binary
198 1 Amber Herold
199 2 Amber Herold
<pre>
200 1 Amber Herold
$ python ./setup.py build
201 2 Amber Herold
</pre>
202
203 11 Amber Herold
* install module globally
204 2 Amber Herold
205
<pre>
206
$ sudo python ./setup.py install
207
</pre>
208
209 1 Amber Herold
* test installed module
210 2 Amber Herold
211
<pre>
212
$ python
213
</pre>
214
215
<pre>
216
>>> import radermacher
217
>>> <Ctrl-D>
218
</pre>
219
220 13 Amber Herold
h3. 5.4 Test PyAppion 
221 2 Amber Herold
222 11 Amber Herold
* Go into pyappion directory
223
* Add leginon to PYTHONPATH if Leginon is built locally
224 2 Amber Herold
225
<pre>
226
$ export PYTHONPATH="$LEGINONPATH:$PYTHONPATH"
227
</pre>
228
229 11 Amber Herold
* Add pyappion lib to PYTHONPATH
230 2 Amber Herold
231
<pre>
232
$ export PYTHONPATH="/your-complete-path-to-pyappion/lib:$PYTHONPATH"
233
</pre>
234 1 Amber Herold
235
* Run the test script
236 2 Amber Herold
237
<pre>
238
$ ./check.sh
239
</pre>
240
241
*NOTE*
242
You can ignore EMAN, MATLAB, and UCSF Chimera errors at this point
243
244
----
245
246 13 Amber Herold
h2. 6 Setup MySQL (appiondata) databases 
247 2 Amber Herold
248 13 Amber Herold
Refer to [[Start_with_existing_ANY_Linux_flavor_OS#2-Setup-MySQL-databases|Setup MySQL databases]]
249 2 Amber Herold
250
h3. Configure MySQL 
251
252
Edit the configuration file:
253
254
<pre>
255
$ sudo nano /etc/my.cnf
256
</pre>
257
258
Add or edit the following lines:
259
260
<pre>
261
query_cache_type = 1
262
query_cache_size = 100M
263
query_cache_limit= 100M
264
</pre>
265
266
Restart MySQL
267
268
<pre>
269
$ sudo /sbin/service mysqld restart
270
</pre>
271
272
h3. Configure phpMyAdmin 
273
274
Edit the phpMyAdmin config file:
275
276
<pre>
277
$ sudo nano /etc/phpMyAdmin/config.inc.php
278
</pre> 
279
280
and change the following lines:
281
282
<pre>
283
$cfg['Servers'][$i]['AllowRoot']     = FALSE;
284
</pre>
285
286
Edit the phpMyAdmin apache config file:
287 1 Amber Herold
288
<pre>
289 2 Amber Herold
$ sudo nano /etc/httpd/conf.d/phpMyAdmin.conf
290
</pre>
291
292
and change the following lines:
293
294 1 Amber Herold
<pre>
295 2 Amber Herold
<Directory /usr/share/phpMyAdmin/>
296
   order deny,allow
297
   deny from all
298
   allow from 127.0.0.1
299
   allow from YOUR_IP_ADDRESS
300
</Directory>
301
</pre>
302
303
----
304
305 13 Amber Herold
h2. 7 Install webpages (appionweb)
306 2 Amber Herold
307 14 Amber Herold
Refer to [[Start_with_existing_ANY_Linux_flavor_OS#3-Web-server-side-installation|Web server side installation]]
308 2 Amber Herold
309
h3. Install MRC Tools 
310
311 1 Amber Herold
h4. Compile MRC tools 
312 2 Amber Herold
313 13 Amber Herold
* Go to your php devel directory and untar the archive
314
* If unsure where it is, use info.php to find it under *extension_dir*
315 2 Amber Herold
316
<pre>
317
$ cd /usr/include/php/ext/
318
$ sudo mkdir mrc
319 1 Amber Herold
$ sudo chmod 777 mrc
320 2 Amber Herold
$ sudo chown $USER mrc
321
</pre>
322 1 Amber Herold
323 13 Amber Herold
* Unpackage MRC Tools from http://emg.nysbc.org/software/mrctools/
324 2 Amber Herold
325
<pre>
326
$ tar zxvf ~/php_mrc.tgz
327
$ cd mrc/
328
</pre>
329
330 13 Amber Herold
* Compile and install the MRC module
331 2 Amber Herold
332
<pre>
333
$ phpize
334
$ ./configure 
335
$ make
336
$ sudo make install
337 1 Amber Herold
</pre>
338 2 Amber Herold
339
h4. Configure PHP for MRC Tools 
340
341 13 Amber Herold
* Edit your php configuration file php.ini to add "mrc.so" extension.
342 1 Amber Herold
343 2 Amber Herold
<pre>
344
$ sudo nano /etc/php.d/mrc.ini
345 1 Amber Herold
</pre>
346 2 Amber Herold
347 13 Amber Herold
* add mrc.so to extensions
348 2 Amber Herold
349
<pre>
350 1 Amber Herold
; Enable mrc extension module
351 2 Amber Herold
extension=mrc.so
352
</pre>
353
354 13 Amber Herold
* To test MRC tools, go to this website:
355 2 Amber Herold
http://emg.nysbc.org/software/mrctools/mrc_so.php
356
357
h3. Configure PHP 
358
359 13 Amber Herold
* increase the memory limit, EM images are big 64MB:
360 2 Amber Herold
361
<pre>
362
memory_limit = 256M; Maximum amount of memory
363
</pre>
364
365 13 Amber Herold
* Turn error display on:
366 2 Amber Herold
367
<pre>
368
display_errors = On
369
</pre>
370
371 1 Amber Herold
<pre>
372
error_reporting = E_ALL & ~E_NOTICE
373
</pre>
374 2 Amber Herold
375 13 Amber Herold
* restart the webserver
376 2 Amber Herold
377
<pre>
378
$ sudo /sbin/service httpd restart
379
</pre>
380
381
h3. Install DBEM and project php source 
382
383 15 Amber Herold
Please consult the other [[Start_with_existing_ANY_Linux_flavor_OS#3-Web-server-side-installation|Install guide]]
384 2 Amber Herold
385
h3. Configuration 
386
387
h4. configure apache 
388
389 13 Amber Herold
* allow REMOTE_HOST lookups in apache
390 2 Amber Herold
391
<pre>
392
$ sudo nano /etc/httpd/conf/httpd.conf
393
</pre>
394
395 13 Amber Herold
* turn _HostnameLookups_ to On
396 2 Amber Herold
397
<pre>
398
HostnameLookups On
399
</pre>
400
401 13 Amber Herold
* restart the webserver
402 2 Amber Herold
403
<pre>
404
$ sudo /sbin/service httpd restart
405
</pre>
406
407
h4. configure project_1_2, dbem_1_5_1, and dbem_1_5_1/processing 
408 1 Amber Herold
409 15 Amber Herold
Please consult the other [[Start_with_existing_ANY_Linux_flavor_OS#3-Web-server-side-installation|Install guide]]
410 2 Amber Herold
411
h3. Initialize database tables from the web tools 
412
413 16 Amber Herold
Please consult [[Start_with_existing_ANY_Linux_flavor_OS#4-Create-a-test-project-and-processing-database|Create a test project and processing database]]
414 2 Amber Herold
415
h3. Potential problems 
416
417
h4. Firewall settings 
418
419
You may need to configure your firewall to allow incoming HTTP (port 80) and MySQL (port 3306) traffic:
420
421
<pre>
422
$ system-config-securitylevel
423
</pre>
424
425
h4. Security-enhanced linux 
426
427
"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:
428
429
<pre>
430
$ sudo /usr/bin/chcon -R -t httpd_sys_content_t /var/www/html/
431
</pre>
432
433
see "this website":http://docs.fedoraproject.org/selinux-apache-fc3/sn-simple-setup.html  for more details on SELinux
434
435
----
436
437 13 Amber Herold
h2. 8 Install external packages 
438
439 2 Amber Herold
*Please follow individual package installation instruction provided with them*
440
441
h3. Compile Xmipp for OpenMPI 
442
443 13 Amber Herold
* For more info, see http://xmipp.cnb.csic.es/twiki/bin/view/Xmipp/InstallingTheSoftware
444
* Go into Xmipp source directory
445
* Find openmpi directory
446 2 Amber Herold
447
<pre>
448
$ locate libmpi.so
449
</pre>
450
451
<pre>
452
/usr/lib/openmpi/1.2.7-gcc/lib/libmpi.so
453
</pre>
454
455 13 Amber Herold
* Setup Xmipp to use openmpi by changing three lines in SConstruct
456 2 Amber Herold
457
<pre>
458
$ cp SConstruct SConstruct.orig
459
</pre>
460
461
<pre>
462
$ nano SConstruct
463
</pre>
464
465
<pre>
466
opts.Add('MPI_INCLUDE', 'MPI headers dir ', '/usr/lib/openmpi/1.2.7-gcc/include/')
467
opts.Add('MPI_LIBDIR', 'MPI libraries dir ', '/usr/lib/openmpi/1.2.7-gcc/lib/')
468
opts.Add('MPI_LIB', 'MPI library', 'mpi')
469
</pre>
470
471 13 Amber Herold
* Compile
472 2 Amber Herold
473
<pre>
474
$ sudo mpi-selector --yes --system --set `rpm --qf '%{NAME}-%{VERSION}-gcc-%{ARCH}\n' -q openmpi`
475
</pre>
476
477
<pre>
478
$ export PATH=$PATH:/usr/lib/openmpi/1.2.7-gcc/bin
479
</pre>
480
481
<pre>
482
$ ./scons.configure
483
</pre>
484
485
you should see the line:
486
487
<pre>
488
* Checking for MPI ... yes
489
</pre>
490
491
<pre>
492
$ ./scons.compile
493
</pre>
494
495 13 Amber Herold
h2. 9 Install a PBS job submission system
496 2 Amber Herold
497
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.
498
499 13 Amber Herold
* An RPM is available in the EPEL testing section
500 2 Amber Herold
501
<pre>
502
$ sudo yum -y --enablerepo=epel-testing install torque
503
</pre>
504
505
or another way to get packages
506
507
<pre>
508
$ wget http://centos.karan.org/el5/extras/testing/`uname -i`/RPMS/torque-2.1.9-1.el5.kb.`uname -i`.rpm
509
$ sudo yum -y localinstall --nogpgcheck torque-2.1.9-1.el5.kb.`uname -i`.rpm
510
$ #sudo rpm -Uhv torque-2.1.9-1.el5.kb.`uname -i`.rpm
511
</pre>
512
513
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