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