Start with existing CentOS installation » History » Version 47
Amber Herold, 03/15/2010 04:01 PM
1 | 25 | Amber Herold | h1. Start with existing CentOS 5.3 64-bit 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 | 24 | Amber Herold | ---- |
129 | |||
130 | 28 | Amber Herold | h2. 4 MRC PHP Extension Installation and Testing |
131 | 13 | Amber Herold | |
132 | 28 | Amber Herold | h3. 4.1 Build the MRC module |
133 | 20 | Amber Herold | |
134 | 1 | Amber Herold | Download "php_mrc_src_1_5_1.tgz":http://emg.nysbc.org/software/dwd.php?id=N1HDb4ac22efb5b38b05fd3575d42d3e4adc2 |
135 | 27 | Amber Herold | |
136 | h4. cd to your php devel directory |
||
137 | 23 | Amber Herold | |
138 | 30 | Amber Herold | <pre> |
139 | 31 | Amber Herold | > cd /usr/include/php/ext/ |
140 | > mv [downloads]/php_mrc_src_1_5_1.tgz . |
||
141 | 30 | Amber Herold | </pre> |
142 | 1 | Amber Herold | |
143 | h4. Untar the archive |
||
144 | |||
145 | 30 | Amber Herold | <pre> |
146 | 32 | Amber Herold | > tar zxvf php_mrc_src_1_5_1.tgz |
147 | > cd mrc/ |
||
148 | 30 | Amber Herold | </pre> |
149 | 1 | Amber Herold | |
150 | 23 | Amber Herold | h4. Make sure that GD and FFTW 3 devel libraries are installed |
151 | |||
152 | 30 | Amber Herold | <pre> |
153 | 32 | Amber Herold | > phpize |
154 | > ./configure |
||
155 | > make |
||
156 | > make install |
||
157 | 30 | Amber Herold | </pre> |
158 | 1 | Amber Herold | |
159 | 28 | Amber Herold | h3. 4.2 Install MRC module |
160 | 23 | Amber Herold | |
161 | 30 | Amber Herold | h4. Check that mrc.so is in your php extension directory |
162 | 1 | Amber Herold | |
163 | 30 | Amber Herold | <pre> |
164 | 32 | Amber Herold | > ls /usr/lib/php/extensions |
165 | 30 | Amber Herold | </pre> |
166 | 23 | Amber Herold | |
167 | 30 | Amber Herold | You should see mrc.so listed. |
168 | |||
169 | 1 | Amber Herold | h4. Make sure that GD and FFTW 3 libraries are installed |
170 | |||
171 | * edit your php configuration file php.ini to add "mrc.so" extension. |
||
172 | * You might also increase the memory_limit field. It is set to 8M by default. The more the merrier! |
||
173 | * 4kx4k float MRC image is about 64MB |
||
174 | 30 | Amber Herold | <pre> |
175 | 32 | Amber Herold | > vi /etc/php.ini |
176 | 30 | Amber Herold | </pre> |
177 | 24 | Amber Herold | |
178 | 23 | Amber Herold | * increase memory |
179 | <pre> |
||
180 | 32 | Amber Herold | > memory_limit = 256M; Maximum amount of memory |
181 | 25 | Amber Herold | </pre> |
182 | 28 | Amber Herold | |
183 | 29 | Amber Herold | * Create the mrc.ini file |
184 | |||
185 | 30 | Amber Herold | <pre> |
186 | 32 | Amber Herold | > cd /etc/php.d |
187 | 30 | Amber Herold | vi mrc.ini |
188 | </pre> |
||
189 | |||
190 | 32 | Amber Herold | * add the following lines |
191 | 1 | Amber Herold | |
192 | <pre> |
||
193 | 23 | Amber Herold | ; Enable mrc extension module |
194 | 1 | Amber Herold | extension=mrc.so |
195 | </pre> |
||
196 | |||
197 | 32 | Amber Herold | *NOTE:* If PHP modules are already listed in PHP.ini do the following: |
198 | |||
199 | 23 | Amber Herold | * check extension_dir value |
200 | 1 | Amber Herold | <pre> |
201 | extension_dir = /usr/lib64/php/extensions |
||
202 | </pre> |
||
203 | |||
204 | 32 | Amber Herold | * add the following at the end of the [extension section] |
205 | 1 | Amber Herold | |
206 | 33 | Amber Herold | <pre> |
207 | 34 | Amber Herold | extension=mrc.so |
208 | 33 | Amber Herold | </pre> |
209 | 1 | Amber Herold | |
210 | 33 | Amber Herold | h4. Restart your webserver |
211 | 25 | Amber Herold | |
212 | 30 | Amber Herold | <pre> |
213 | /etc/init.d/apache2 restart |
||
214 | </pre> |
||
215 | 23 | Amber Herold | |
216 | OR |
||
217 | |||
218 | 30 | Amber Herold | <pre> |
219 | /etc/init.d/httpd restart |
||
220 | </pre> |
||
221 | 2 | Amber Herold | |
222 | 1 | Amber Herold | h3. 4.3 Test the MRC module installation |
223 | 34 | Amber Herold | |
224 | 36 | Amber Herold | Download this MRC file "mymrc.mrc":http://emg.nysbc.org/attachments/55/mymrc.mrc and the following 2 scripts into the same directory to test the PHP mrc extension. |
225 | 35 | Amber Herold | * gd module testing script "ex1.php":http://emg.nysbc.org/attachments/53/ex1.php |
226 | * fftw module testing script "ex2.php":http://emg.nysbc.org/attachments/54/ex2.php |
||
227 | 34 | Amber Herold | |
228 | 1 | Amber Herold | Run the scripts with the following commands: |
229 | 36 | Amber Herold | The expected results are shown below. If you get the same images, you've installed the extension properly. |
230 | 1 | Amber Herold | |
231 | <pre> |
||
232 | > php -q ex1.php | display |
||
233 | </pre> |
||
234 | |||
235 | 36 | Amber Herold | * gd module test result: |
236 | !http://emg.nysbc.org/attachments/57/ex1.php.png! |
||
237 | |||
238 | 35 | Amber Herold | <pre> |
239 | > php -q ex2.php | display |
||
240 | </pre> |
||
241 | |||
242 | 34 | Amber Herold | * fftw module test result: |
243 | 17 | Amber Herold | !http://emg.nysbc.org/attachments/58/ex2.php.png! |
244 | 2 | Amber Herold | |
245 | 13 | Amber Herold | ---- |
246 | 47 | Amber Herold | h2. 5 Setup MySQL (appiondata) databases |
247 | 1 | Amber Herold | |
248 | 47 | Amber Herold | [[Setup MySQL database]] |
249 | 1 | Amber Herold | |
250 | 47 | Amber Herold | |
251 | ---- |
||
252 | |||
253 | h2. 6 Compile and setup Appion python programs |
||
254 | |||
255 | 41 | Amber Herold | Download Myami. |
256 | 1 | Amber Herold | *TODO: Place link to file here!* |
257 | 41 | Amber Herold | Install leginon http://emg.nysbc.org/documentation/leginon/bk02ch04s06.php |
258 | 37 | Amber Herold | |
259 | 42 | Amber Herold | h3. Perform system check: |
260 | |||
261 | In addition to the downloads from our svn depository, there are several other requirements that you will get either from your OS installation source, or from its respective website. The system check in the Leginon package checks your system to see if you already have these requirements |
||
262 | |||
263 | cd your_download_area/Leginon-1.6-ALL/Leginon |
||
264 | python syscheck.py |
||
265 | |||
266 | If python is not installed, this, of course will not run. If you see any lines like "*** Failed...", then you have something missing. Otherwise, everything should result in "OK". |
||
267 | |||
268 | h3. Install the package in each folder with commands like these |
||
269 | |||
270 | *TODO: move these into a single installer, ask Jim* |
||
271 | |||
272 | cd /your_download_area/myami/leginon |
||
273 | python setup.py install |
||
274 | |||
275 | cd ../pyami |
||
276 | python setup.py install |
||
277 | cd ../pyScope |
||
278 | python setup.py install |
||
279 | cd ../sinedon |
||
280 | python setup.py install |
||
281 | cd ../numextension |
||
282 | python setup.py install |
||
283 | cd ../libcv |
||
284 | python setup.py install |
||
285 | cd ../imageviewer |
||
286 | python setup.py install |
||
287 | |||
288 | 44 | Amber Herold | h3. python-site-package-path: where the installed python packages went: |
289 | 43 | Amber Herold | |
290 | Python installer put the packages you installed to its site-packages directory. This enable all users on the same computer to access them. The easiest way to find where your installed package is called by python is to load a module from the package using interactive python command lines like this: |
||
291 | |||
292 | * Start python command line from shell |
||
293 | |||
294 | > python |
||
295 | |||
296 | * Import a module from the package. Let's try sinedon here. All packages installed through the above setup.py script should go to the same place. |
||
297 | |||
298 | python> import sinedon |
||
299 | |||
300 | * If the module is loaded successfully, call the module attribute __path__ (two underscrolls before "path" and two underscrolls after) will return the location of the module it is loaded from |
||
301 | |||
302 | python> sinedon.__path__ |
||
303 | |||
304 | RETURNS, For example, |
||
305 | python> <module 'sinedon' from '/usr/lib/python2.5/site-packages/sinedon/__init__.pyc'> |
||
306 | |||
307 | In this case, /usr/lib/python2.5/site-packages/ is your python-site-package-path. If you go to that directory, you will find all the packages you just installed. |
||
308 | |||
309 | h3. Configure leginon.cfg: |
||
310 | |||
311 | A skeleton (default) configuration file is available: |
||
312 | [python-site-package-path]/Leginon/config/default.cfg |
||
313 | |||
314 | * Copy default.cfg to leginon.cfg. |
||
315 | cp [python-site-package-path]/Leginon/config/default.cfg [python-site-package-path]/Leginon/config/leginon.cfg |
||
316 | |||
317 | * Add a directory for images. The rest is optional. |
||
318 | |||
319 | Example of the configuration that you should set: (Here we assume your leginon database is named "dbemdata", and Leginon log into the database as a user named "usr_object" with no password set). |
||
320 | |||
321 | [Images] |
||
322 | 1 | Amber Herold | path: your_storage_disk_path/leginon |
323 | 43 | Amber Herold | |
324 | 44 | Amber Herold | h3. Names used in the example installation |
325 | 1 | Amber Herold | |
326 | 44 | Amber Herold | From this point on, you will need to enter database user names for different configuration files and settings. These are NOT Leginon user names but what is required by MySQL database interaction. Consistent names are essential. In the example shown here, the leginon database is called "dbemdata", the project database is called "projectdata". The MySQL user name are the same, "usr_object", and in this case without a password. |
327 | |||
328 | h3. Configure sinedon.cfg: |
||
329 | |||
330 | *TODO: Consider moving this after we setup Mysql username.* |
||
331 | |||
332 | Sinedon is designed to be able to interact with multiple databases. It can be configured at global or user level. |
||
333 | |||
334 | * An example configuration file is available at: |
||
335 | /your_download_area/Leginon-1.6-ALL/sinedon/examples/sinedon.cfg |
||
336 | |||
337 | * Configurations for all users should be placed at the following path: |
||
338 | [python-site-package-path]/sinedon/sinedon.cfg |
||
339 | |||
340 | * Modify host,db,user,passwd to what is used. Note that the user here is the MySQL user Leginon uses to communicate with the database for all Leginon users. For Leginon that uses Project database, set the following: |
||
341 | |||
342 | [global] |
||
343 | host: your_database_host |
||
344 | user: usr_object |
||
345 | passwd: |
||
346 | |||
347 | [projectdata] |
||
348 | db: projectdata |
||
349 | |||
350 | [leginondata] |
||
351 | db: dbemdata |
||
352 | |||
353 | * Add database configuration if you intend to use grid-inserting robot. The Robot2 module uses the database to communicate to the robot. Applications that carries the name "Robot" requires this to be set. In general, using the same database as the general leginon database is fine. |
||
354 | |||
355 | [robot2] |
||
356 | db: dbemdata |
||
357 | 43 | Amber Herold | |
358 | 2 | Amber Herold | h3. 5.1 Compile FindEM |
359 | 1 | Amber Herold | |
360 | 37 | Amber Herold | * Goto appion/findem folder to make findem.exe |
361 | 2 | Amber Herold | |
362 | * Compile the libraries and binary |
||
363 | |||
364 | 12 | Amber Herold | <pre> |
365 | 2 | Amber Herold | $ make |
366 | </pre> |
||
367 | |||
368 | * Test findem.exe to see if it runs |
||
369 | |||
370 | <pre> |
||
371 | $ make test |
||
372 | </pre> |
||
373 | |||
374 | 11 | Amber Herold | *WARNING* |
375 | 2 | Amber Herold | Only if the first part fails, you must add the path to libg2c.so library file. |
376 | Otherwise skip to next section. |
||
377 | |||
378 | * locate libg2c.so library file |
||
379 | |||
380 | 1 | Amber Herold | <pre> |
381 | 2 | Amber Herold | $ ls /usr/lib/gcc/`uname -i`-redhat-linux/3.4.6/libg2c.so |
382 | </pre> |
||
383 | |||
384 | 1 | Amber Herold | <pre> |
385 | 2 | Amber Herold | $ locate libg2c.so |
386 | </pre> |
||
387 | |||
388 | * Edit Makefile with location of libg2c.so |
||
389 | 1 | Amber Herold | |
390 | 11 | Amber Herold | <pre> |
391 | $ nano Makefile |
||
392 | 2 | Amber Herold | </pre> |
393 | 13 | Amber Herold | |
394 | 2 | Amber Herold | * Example: EXLIBS=-L/usr/lib/gcc/i386-redhat-linux/3.4.6/ -lg2c |
395 | * Re-compile |
||
396 | |||
397 | 1 | Amber Herold | h3. 5.2 Compile Ace2 |
398 | |||
399 | 38 | Amber Herold | The 64 bit Ace2 binary is already available in the myami/bin directory. |
400 | Test it by changing directories to myami/bin and type the following commands: |
||
401 | <pre> |
||
402 | $ ./ace2.exe -h |
||
403 | $ ./ace2correct.exe -h |
||
404 | </pre> |
||
405 | Notice the help display. |
||
406 | 1 | Amber Herold | |
407 | 38 | Amber Herold | <pre> |
408 | If this does not work or you wish to compile it yourself follow the instructions here. |
||
409 | NOTE: |
||
410 | 39 | Amber Herold | ace2 typically requires fftw 3.2 or greater. This is significantly faster than 3.1 (which is distributed with CentOS). |
411 | There is a FFTW_WISDOM_ONLY flag in Image.m that can be commented in if you are using fftw 3.2 or greater. |
||
412 | 38 | Amber Herold | *TODO: Can we have the make file detect which version is installed?* |
413 | 2 | Amber Herold | |
414 | * Goto myami/appion/ace2 |
||
415 | * compile the libraries and binary |
||
416 | 1 | Amber Herold | * test to see if program runs |
417 | 2 | Amber Herold | |
418 | 13 | Amber Herold | $ make |
419 | 2 | Amber Herold | $ ./ace2.exe -h |
420 | 1 | Amber Herold | $ ./ace2correct.exe -h |
421 | 11 | Amber Herold | $ mv -v ./ace2*.exe ../bin |
422 | </pre> |
||
423 | 1 | Amber Herold | |
424 | 37 | Amber Herold | h3. 5.3 Compile Radermacher module |
425 | 1 | Amber Herold | |
426 | 2 | Amber Herold | * Goto appion/radermacher |
427 | |||
428 | 11 | Amber Herold | * compile the libraries and binary |
429 | 2 | Amber Herold | |
430 | <pre> |
||
431 | $ python ./setup.py build |
||
432 | </pre> |
||
433 | |||
434 | 1 | Amber Herold | * install module globally |
435 | 2 | Amber Herold | |
436 | <pre> |
||
437 | $ sudo python ./setup.py install |
||
438 | </pre> |
||
439 | |||
440 | * test installed module |
||
441 | 13 | Amber Herold | |
442 | 2 | Amber Herold | <pre> |
443 | 1 | Amber Herold | $ python |
444 | </pre> |
||
445 | |||
446 | 2 | Amber Herold | <pre> |
447 | 1 | Amber Herold | >>> import radermacher |
448 | 2 | Amber Herold | >>> <Ctrl-D> |
449 | 37 | Amber Herold | </pre> |
450 | 2 | Amber Herold | |
451 | 37 | Amber Herold | h3. 5.4 Test Appion |
452 | |||
453 | * Go into the appion directory |
||
454 | 1 | Amber Herold | * Add myami to PYTHONPATH if myami is built locally (in home directory) |
455 | 2 | Amber Herold | *TODO: what does this mean?* |
456 | 37 | Amber Herold | |
457 | 2 | Amber Herold | <pre> |
458 | $ export PYTHONPATH="/your-complete-path-to-myami:$PYTHONPATH" |
||
459 | 37 | Amber Herold | </pre> |
460 | 2 | Amber Herold | |
461 | 1 | Amber Herold | * Add appion to PYTHONPATH |
462 | 37 | Amber Herold | |
463 | 2 | Amber Herold | <pre> |
464 | 37 | Amber Herold | $ export PYTHONPATH="/your-complete-path-to-myami/appion:$PYTHONPATH" |
465 | </pre> |
||
466 | 2 | Amber Herold | |
467 | *TODO: Consider moving appionlib so you only need to set one path.* |
||
468 | |||
469 | * Run the test script |
||
470 | |||
471 | <pre> |
||
472 | $ ./check.sh |
||
473 | </pre> |
||
474 | |||
475 | *NOTE* |
||
476 | 45 | Amber Herold | You can ignore EMAN, MATLAB, and UCSF Chimera errors at this point |
477 | |||
478 | 2 | Amber Herold | ---- |
479 | |||
480 | 1 | Amber Herold | |
481 | 2 | Amber Herold | h2. 7 Install webpages (appionweb) |
482 | 13 | Amber Herold | |
483 | Refer to [[Start_with_existing_ANY_Linux_flavor_OS#3-Web-server-side-installation|Web server side installation]] |
||
484 | 2 | Amber Herold | |
485 | h3. Install MRC Tools |
||
486 | |||
487 | h4. Compile MRC tools |
||
488 | 1 | Amber Herold | |
489 | 2 | Amber Herold | * Go to your php devel directory and untar the archive |
490 | * If unsure where it is, use info.php to find it under *extension_dir* |
||
491 | 1 | Amber Herold | |
492 | 13 | Amber Herold | <pre> |
493 | 2 | Amber Herold | $ cd /usr/include/php/ext/ |
494 | $ sudo mkdir mrc |
||
495 | $ sudo chmod 777 mrc |
||
496 | $ sudo chown $USER mrc |
||
497 | </pre> |
||
498 | |||
499 | 13 | Amber Herold | * Unpackage MRC Tools from http://emg.nysbc.org/software/mrctools/ |
500 | 2 | Amber Herold | |
501 | <pre> |
||
502 | $ tar zxvf ~/php_mrc.tgz |
||
503 | $ cd mrc/ |
||
504 | </pre> |
||
505 | |||
506 | 1 | Amber Herold | * Compile and install the MRC module |
507 | 2 | Amber Herold | |
508 | <pre> |
||
509 | $ phpize |
||
510 | 13 | Amber Herold | $ ./configure |
511 | 1 | Amber Herold | $ make |
512 | 2 | Amber Herold | $ sudo make install |
513 | </pre> |
||
514 | 1 | Amber Herold | |
515 | 2 | Amber Herold | h4. Configure PHP for MRC Tools |
516 | 13 | Amber Herold | |
517 | 2 | Amber Herold | * Edit your php configuration file php.ini to add "mrc.so" extension. |
518 | |||
519 | 1 | Amber Herold | <pre> |
520 | 2 | Amber Herold | $ sudo nano /etc/php.d/mrc.ini |
521 | </pre> |
||
522 | |||
523 | 13 | Amber Herold | * add mrc.so to extensions |
524 | 2 | Amber Herold | |
525 | <pre> |
||
526 | ; Enable mrc extension module |
||
527 | extension=mrc.so |
||
528 | 13 | Amber Herold | </pre> |
529 | 2 | Amber Herold | |
530 | * To test MRC tools, go to this website: |
||
531 | http://emg.nysbc.org/software/mrctools/mrc_so.php |
||
532 | |||
533 | h3. Configure PHP |
||
534 | 13 | Amber Herold | |
535 | 2 | Amber Herold | * increase the memory limit, EM images are big 64MB: |
536 | |||
537 | <pre> |
||
538 | memory_limit = 256M; Maximum amount of memory |
||
539 | </pre> |
||
540 | 1 | Amber Herold | |
541 | * Turn error display on: |
||
542 | |||
543 | 2 | Amber Herold | <pre> |
544 | 13 | Amber Herold | display_errors = On |
545 | 2 | Amber Herold | </pre> |
546 | |||
547 | <pre> |
||
548 | error_reporting = E_ALL & ~E_NOTICE |
||
549 | </pre> |
||
550 | |||
551 | * restart the webserver |
||
552 | 15 | Amber Herold | |
553 | 2 | Amber Herold | <pre> |
554 | $ sudo /sbin/service httpd restart |
||
555 | </pre> |
||
556 | |||
557 | h3. Install DBEM and project php source |
||
558 | 13 | Amber Herold | |
559 | 2 | Amber Herold | Please consult the other [[Start_with_existing_ANY_Linux_flavor_OS#3-Web-server-side-installation|Install guide]] |
560 | |||
561 | h3. Configuration |
||
562 | |||
563 | h4. configure apache |
||
564 | 13 | Amber Herold | |
565 | 2 | Amber Herold | * allow REMOTE_HOST lookups in apache |
566 | |||
567 | <pre> |
||
568 | $ sudo nano /etc/httpd/conf/httpd.conf |
||
569 | </pre> |
||
570 | 13 | Amber Herold | |
571 | 2 | Amber Herold | * turn _HostnameLookups_ to On |
572 | |||
573 | <pre> |
||
574 | HostnameLookups On |
||
575 | </pre> |
||
576 | |||
577 | 1 | Amber Herold | * restart the webserver |
578 | 15 | Amber Herold | |
579 | 2 | Amber Herold | <pre> |
580 | $ sudo /sbin/service httpd restart |
||
581 | </pre> |
||
582 | 16 | Amber Herold | |
583 | 2 | Amber Herold | h4. configure project_1_2, dbem_1_5_1, and dbem_1_5_1/processing |
584 | |||
585 | Please consult the other [[Start_with_existing_ANY_Linux_flavor_OS#3-Web-server-side-installation|Install guide]] |
||
586 | |||
587 | h3. Initialize database tables from the web tools |
||
588 | |||
589 | Please consult [[Start_with_existing_ANY_Linux_flavor_OS#4-Create-a-test-project-and-processing-database|Create a test project and processing database]] |
||
590 | |||
591 | h3. Potential problems |
||
592 | |||
593 | h4. Firewall settings |
||
594 | |||
595 | You may need to configure your firewall to allow incoming HTTP (port 80) and MySQL (port 3306) traffic: |
||
596 | |||
597 | <pre> |
||
598 | $ system-config-securitylevel |
||
599 | </pre> |
||
600 | |||
601 | h4. Security-enhanced linux |
||
602 | |||
603 | "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: |
||
604 | |||
605 | <pre> |
||
606 | 13 | Amber Herold | $ sudo /usr/bin/chcon -R -t httpd_sys_content_t /var/www/html/ |
607 | </pre> |
||
608 | 2 | Amber Herold | |
609 | see "this website":http://docs.fedoraproject.org/selinux-apache-fc3/sn-simple-setup.html for more details on SELinux |
||
610 | |||
611 | ---- |
||
612 | 13 | Amber Herold | |
613 | h2. 8 Install external packages |
||
614 | |||
615 | 2 | Amber Herold | *Please follow individual package installation instruction provided with them* |
616 | |||
617 | h3. Compile Xmipp for OpenMPI |
||
618 | |||
619 | * For more info, see http://xmipp.cnb.csic.es/twiki/bin/view/Xmipp/InstallingTheSoftware |
||
620 | * Go into Xmipp source directory |
||
621 | * Find openmpi directory |
||
622 | |||
623 | <pre> |
||
624 | 13 | Amber Herold | $ locate libmpi.so |
625 | 2 | Amber Herold | </pre> |
626 | |||
627 | <pre> |
||
628 | /usr/lib/openmpi/1.2.7-gcc/lib/libmpi.so |
||
629 | </pre> |
||
630 | |||
631 | * Setup Xmipp to use openmpi by changing three lines in SConstruct |
||
632 | |||
633 | <pre> |
||
634 | $ cp SConstruct SConstruct.orig |
||
635 | </pre> |
||
636 | |||
637 | <pre> |
||
638 | $ nano SConstruct |
||
639 | </pre> |
||
640 | 13 | Amber Herold | |
641 | 2 | Amber Herold | <pre> |
642 | opts.Add('MPI_INCLUDE', 'MPI headers dir ', '/usr/lib/openmpi/1.2.7-gcc/include/') |
||
643 | opts.Add('MPI_LIBDIR', 'MPI libraries dir ', '/usr/lib/openmpi/1.2.7-gcc/lib/') |
||
644 | opts.Add('MPI_LIB', 'MPI library', 'mpi') |
||
645 | </pre> |
||
646 | |||
647 | * Compile |
||
648 | |||
649 | <pre> |
||
650 | $ sudo mpi-selector --yes --system --set `rpm --qf '%{NAME}-%{VERSION}-gcc-%{ARCH}\n' -q openmpi` |
||
651 | </pre> |
||
652 | |||
653 | <pre> |
||
654 | $ export PATH=$PATH:/usr/lib/openmpi/1.2.7-gcc/bin |
||
655 | </pre> |
||
656 | |||
657 | <pre> |
||
658 | $ ./scons.configure |
||
659 | </pre> |
||
660 | |||
661 | you should see the line: |
||
662 | |||
663 | <pre> |
||
664 | 13 | Amber Herold | * Checking for MPI ... yes |
665 | 2 | Amber Herold | </pre> |
666 | |||
667 | <pre> |
||
668 | 13 | Amber Herold | $ ./scons.compile |
669 | 2 | Amber Herold | </pre> |
670 | |||
671 | h2. 9 Install a PBS job submission system |
||
672 | |||
673 | 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. |
||
674 | |||
675 | * An RPM is available in the EPEL testing section |
||
676 | |||
677 | <pre> |
||
678 | $ sudo yum -y --enablerepo=epel-testing install torque |
||
679 | </pre> |
||
680 | |||
681 | or another way to get packages |
||
682 | |||
683 | 1 | Amber Herold | <pre> |
684 | $ wget http://centos.karan.org/el5/extras/testing/`uname -i`/RPMS/torque-2.1.9-1.el5.kb.`uname -i`.rpm |
||
685 | $ sudo yum -y localinstall --nogpgcheck torque-2.1.9-1.el5.kb.`uname -i`.rpm |
||
686 | $ #sudo rpm -Uhv torque-2.1.9-1.el5.kb.`uname -i`.rpm |
||
687 | </pre> |
||
688 | |||
689 | 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 |