Processing Server Installation » History » Version 12
Amber Herold, 04/06/2010 02:19 PM
1 | 10 | Amber Herold | h1. Processing Server Installation |
---|---|---|---|
2 | 1 | Amber Herold | |
3 | 10 | Amber Herold | |
4 | h2. Install prerequisite supporting packages first if missing: |
||
5 | |||
6 | |||
7 | Follow the instruction for your specific Linux distribution. |
||
8 | |||
9 | For example, SUSE users can use YaST to install them; RedHat and CentOS users can use |
||
10 | yum. |
||
11 | |||
12 | h3. Required supporting packages: |
||
13 | |||
14 | |_.Name:|_.Download site:|_.yum package name|_.SuSE rpm name| |
||
15 | |Python 2.4 or newer| "http://www.python.org":http://www.python.org|python|python-devel| |
||
16 | |wxPython 2.5.2.8 or newer| "http://www.wxpython.org":http://www.wxpython.org|wxPython|python-wxGTK| |
||
17 | |MySQL Python client 1.2 or newer| "http://sourceforge.net/projects/mysql-python":http://sourceforge.net/projects/mysql-python|MySQL-python|python-mysql| |
||
18 | |Python Imaging Library (PIL) 1.1.4 or newer| "http://www.pythonware.com/products/pil/":http://www.pythonware.com/products/pil/|python-imaging|python-imaging| |
||
19 | |Python XML module 0.8.3 or newer| "http://pyxml.sourceforge.net":http://pyxml.sourceforge.net|PyXML|python-xml| |
||
20 | |NumPy 1.0.1 or newer| "http://www.scipy.org":http://www.scipy.org|numpy|numpy| |
||
21 | |SciPy 0.5.1 (tested, others may work)*| "http://www.scipy.org":http://www.scipy.org , "http://repos.opensuse.org/science":http://repos.opensuse.org/science *|scipy|python-scipy| |
||
22 | |||
23 | |||
24 | *SciPy may not build properly on some versions of SuSE due to an incompatible LAPACK |
||
25 | package that comes with SuSE. You can get scipy as well as a compatible LAPACK etc. from |
||
26 | http://repos.opensuse.org/science (need to specify your SuSE version and machine |
||
27 | etc.) |
||
28 | |||
29 | |||
30 | h2. Setup Appion programs |
||
31 | |||
32 | 1 | Amber Herold | Download Myami. |
33 | *TODO: Place link to file here!* |
||
34 | Install leginon http://emg.nysbc.org/documentation/leginon/bk02ch04s06.php |
||
35 | |||
36 | h3. Perform system check: |
||
37 | 8 | Amber Herold | |
38 | 1 | Amber Herold | In addition to the downloads from our svn repository, 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. |
39 | |||
40 | 10 | Amber Herold | <pre> |
41 | 1 | Amber Herold | cd your_download_area/Leginon-1.6-ALL/Leginon *TODO: fix this path* |
42 | python syscheck.py |
||
43 | 10 | Amber Herold | </pre> |
44 | 1 | Amber Herold | |
45 | 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". |
||
46 | |||
47 | 10 | Amber Herold | h3. Install the package in _each folder_ with commands like these |
48 | 1 | Amber Herold | |
49 | *TODO: move these into a single installer, ask Jim* |
||
50 | |||
51 | 10 | Amber Herold | <pre> |
52 | 1 | Amber Herold | cd /your_download_area/myami/leginon |
53 | python setup.py install |
||
54 | |||
55 | cd ../pyami |
||
56 | python setup.py install |
||
57 | cd ../pyScope |
||
58 | python setup.py install |
||
59 | cd ../sinedon |
||
60 | python setup.py install |
||
61 | cd ../numextension |
||
62 | python setup.py install |
||
63 | cd ../libcv |
||
64 | python setup.py install |
||
65 | cd ../imageviewer |
||
66 | python setup.py install |
||
67 | 10 | Amber Herold | </pre> |
68 | 1 | Amber Herold | |
69 | h3. python-site-package-path: where the installed python packages went: |
||
70 | |||
71 | 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: |
||
72 | |||
73 | * Start python command line from shell |
||
74 | 10 | Amber Herold | <pre>> python</pre> |
75 | 1 | Amber Herold | |
76 | * 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. |
||
77 | 10 | Amber Herold | <pre>python> import sinedon</pre> |
78 | 1 | Amber Herold | |
79 | |||
80 | * 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 |
||
81 | 10 | Amber Herold | <pre> |
82 | 1 | Amber Herold | python> sinedon.__path__ |
83 | |||
84 | RETURNS, For example, |
||
85 | python> <module 'sinedon' from '/usr/lib/python2.5/site-packages/sinedon/__init__.pyc'> |
||
86 | 10 | Amber Herold | </pre> |
87 | 1 | Amber Herold | 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. |
88 | |||
89 | 10 | Amber Herold | h3. Configure leginon.cfg |
90 | 1 | Amber Herold | |
91 | A skeleton (default) configuration file is available: |
||
92 | 11 | Amber Herold | <pre> |
93 | [python-site-package-path]/Leginon/config/default.cfg |
||
94 | </pre> |
||
95 | 1 | Amber Herold | |
96 | * Copy default.cfg to leginon.cfg. |
||
97 | 10 | Amber Herold | <pre> |
98 | 1 | Amber Herold | cp [python-site-package-path]/Leginon/config/default.cfg [python-site-package-path]/Leginon/config/leginon.cfg |
99 | </pre> |
||
100 | |||
101 | 11 | Amber Herold | * Add a directory for images |
102 | <pre> |
||
103 | 1 | Amber Herold | [Images] |
104 | path: your_storage_disk_path/leginon |
||
105 | 11 | Amber Herold | </pre> |
106 | |||
107 | The rest of the configuration options are fine left as default assuming your leginon database is named "leginondb", and Leginon logs into the database as a user named "usr_object" with no password set. |
||
108 | 1 | Amber Herold | |
109 | h3. Names used in the example installation |
||
110 | |||
111 | 10 | 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 "leginondb", the project database is called "projectdb". The MySQL user name are the same, "usr_object", and in this case without a password. |
112 | 1 | Amber Herold | |
113 | h3. Configure sinedon.cfg: |
||
114 | |||
115 | *TODO: Consider moving this after we setup Mysql username.* |
||
116 | |||
117 | Sinedon is designed to be able to interact with multiple databases. It can be configured at global or user level. |
||
118 | |||
119 | * An example configuration file is available at: |
||
120 | /your_download_area/Leginon-1.6-ALL/sinedon/examples/sinedon.cfg |
||
121 | |||
122 | * Configurations for all users should be placed at the following path: |
||
123 | [python-site-package-path]/sinedon/sinedon.cfg |
||
124 | |||
125 | * 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: |
||
126 | 10 | Amber Herold | <pre> |
127 | 1 | Amber Herold | [global] |
128 | host: your_database_host |
||
129 | user: usr_object |
||
130 | passwd: |
||
131 | |||
132 | [projectdata] |
||
133 | db: projectdb |
||
134 | |||
135 | [leginondata] |
||
136 | db: leginondb |
||
137 | 10 | Amber Herold | </pre> |
138 | 1 | Amber Herold | |
139 | * 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. |
||
140 | 10 | Amber Herold | <pre> |
141 | 1 | Amber Herold | [robot2] |
142 | db: leginondb |
||
143 | 10 | Amber Herold | </pre> |
144 | 1 | Amber Herold | |
145 | 10 | Amber Herold | h3. Compile FindEM |
146 | 1 | Amber Herold | |
147 | * Goto appion/findem folder to make findem.exe |
||
148 | |||
149 | * Compile the libraries and binary |
||
150 | |||
151 | <pre> |
||
152 | $ make |
||
153 | </pre> |
||
154 | |||
155 | * Test findem.exe to see if it runs |
||
156 | |||
157 | <pre> |
||
158 | $ make test |
||
159 | </pre> |
||
160 | |||
161 | *WARNING* |
||
162 | Only if the first part fails, you must add the path to libg2c.so library file. |
||
163 | Otherwise skip to next section. |
||
164 | |||
165 | * locate libg2c.so library file |
||
166 | |||
167 | <pre> |
||
168 | $ ls /usr/lib/gcc/`uname -i`-redhat-linux/3.4.6/libg2c.so |
||
169 | </pre> |
||
170 | |||
171 | <pre> |
||
172 | $ locate libg2c.so |
||
173 | </pre> |
||
174 | |||
175 | * Edit Makefile with location of libg2c.so |
||
176 | |||
177 | <pre> |
||
178 | $ nano Makefile |
||
179 | </pre> |
||
180 | |||
181 | * Example: EXLIBS=-L/usr/lib/gcc/i386-redhat-linux/3.4.6/ -lg2c |
||
182 | * Re-compile |
||
183 | |||
184 | 12 | Amber Herold | h3. Compile Ace2 |
185 | 1 | Amber Herold | |
186 | The 64 bit Ace2 binary is already available in the myami/bin directory. |
||
187 | Test it by changing directories to myami/bin and type the following commands: |
||
188 | <pre> |
||
189 | $ ./ace2.exe -h |
||
190 | $ ./ace2correct.exe -h |
||
191 | </pre> |
||
192 | Notice the help display. |
||
193 | |||
194 | <pre> |
||
195 | If this does not work or you wish to compile it yourself follow the instructions here. |
||
196 | NOTE: |
||
197 | ace2 typically requires fftw 3.2 or greater. This is significantly faster than 3.1 (which is distributed with CentOS). |
||
198 | There is a FFTW_WISDOM_ONLY flag in Image.m that can be commented in if you are using fftw 3.2 or greater. |
||
199 | *TODO: Can we have the make file detect which version is installed?* |
||
200 | |||
201 | * Goto myami/appion/ace2 |
||
202 | * compile the libraries and binary |
||
203 | * test to see if program runs |
||
204 | |||
205 | $ make |
||
206 | $ ./ace2.exe -h |
||
207 | $ ./ace2correct.exe -h |
||
208 | $ mv -v ./ace2*.exe ../bin |
||
209 | </pre> |
||
210 | |||
211 | 12 | Amber Herold | h3. Compile Radermacher module |
212 | 1 | Amber Herold | |
213 | * Goto appion/radermacher |
||
214 | |||
215 | * compile the libraries and binary |
||
216 | |||
217 | <pre> |
||
218 | $ python ./setup.py build |
||
219 | </pre> |
||
220 | |||
221 | * install module globally |
||
222 | |||
223 | <pre> |
||
224 | $ sudo python ./setup.py install |
||
225 | </pre> |
||
226 | |||
227 | * test installed module |
||
228 | |||
229 | <pre> |
||
230 | $ python |
||
231 | </pre> |
||
232 | |||
233 | <pre> |
||
234 | >>> import radermacher |
||
235 | >>> <Ctrl-D> |
||
236 | </pre> |
||
237 | |||
238 | 12 | Amber Herold | h3. Test Appion |
239 | 1 | Amber Herold | |
240 | 3 | Amber Herold | If appion is installed locallaly in your home directory (you are the only user that can execute it), |
241 | you will need to add myami and appion to the python path. |
||
242 | |||
243 | 1 | Amber Herold | * Go into the appion directory |
244 | 2 | Amber Herold | |
245 | Open .bashrc in your home directory and edit it at the end of the file: |
||
246 | 1 | Amber Herold | Add the following lines: |
247 | 2 | Amber Herold | |
248 | <pre> |
||
249 | 6 | Amber Herold | $ export PYTHONPATH="/your-complete-path-to-myami":"/your-complete-path-to-myami/appion":$PYTHONPATH |
250 | 3 | Amber Herold | $ export PATH="/your-complete-path-to-myami/appion/bin":$PATH |
251 | 1 | Amber Herold | </pre> |
252 | |||
253 | * Add appion to PYTHONPATH |
||
254 | |||
255 | <pre> |
||
256 | 3 | Amber Herold | $ export PYTHONPATH="/your-complete-path-to-myami/appion":$PYTHONPATH |
257 | 1 | Amber Herold | </pre> |
258 | |||
259 | *TODO: Consider moving appionlib so you only need to set one path.* |
||
260 | |||
261 | 4 | Amber Herold | To confirm the changes, open a new terminal and type: |
262 | 5 | Amber Herold | <pre> |
263 | 4 | Amber Herold | $ export |
264 | 1 | Amber Herold | </pre> |
265 | 6 | Amber Herold | |
266 | Look for the PATH and PYTHONPATH in the output. The paths that you entered should be there. |
||
267 | 4 | Amber Herold | |
268 | 1 | Amber Herold | * Run the test script |
269 | 3 | Amber Herold | |
270 | If you have installed appion for all users (the script does not exist yet) or it is local and you have added the paths above, you are ready to run the test. |
||
271 | 1 | Amber Herold | |
272 | <pre> |
||
273 | $ ./check.sh |
||
274 | </pre> |
||
275 | |||
276 | *NOTE* |
||
277 | You can ignore EMAN, MATLAB, and UCSF Chimera errors at this point |