Project

General

Profile

How to Update from v22 (Linux) » History » Version 12

Anchi Cheng, 02/03/2014 05:31 PM

1 8 Anchi Cheng
h1. How to upgrade to Leginon System version 30 from version 22 (Linux)
2 1 Anchi Cheng
3 7 Anchi Cheng
Leginon/Appion 3.0 release web image viewer will not be compatible with CentOS 5 due to prerequisites of REDUX, the new image server that is compatible with php 5.3 used in modern os.  The Leginon processing server code is still compatible with python 2.4 which came with CentOS 5 but the development from now on will assume python version 2.6 along with other default yum installed packages of CentOS 6.
4
5
Since this is a major change, if you have an older computer where all parts of Leginon are installed and want to keep the data in the old database, this is a good time to migrate the web server and processing server to a new computer and make the old CentOS 5 computer the dedicate database computer.
6
7 11 Anchi Cheng
h1. Upgrade database server moving from CentOS 5 to CentOS 6 (non-redux version only)
8 7 Anchi Cheng
9 11 Anchi Cheng
*If Database server is separate from web server, it can stay at CentOS 5 with MySQL 5.0.  You don't need to perform the followings*
10 1 Anchi Cheng
11 11 Anchi Cheng
If Database server is NOT separated from web server, you will need to export the data and import it back after OS upgrade since CentOS 6 has MySQL 5.1.  Direct file copy of the database files will not work.
12
13
Repeat the following for leginondb, projectdb, and any processing database that you would like to migrate:
14
15 10 Anchi Cheng
For example, for leginondb:
16
17 12 Anchi Cheng
1. Use mysqldump to create an xml file of the table structure and data  (substitute "database_host" with your database server hostname.  This assumes that the mysql user "usr_object" has proper privileges for these):
18 10 Anchi Cheng
<pre>
19 1 Anchi Cheng
mysqldump -h database_host -u usr_object -p --extended-insert leginondb > leginondb.sql
20
</pre>
21 10 Anchi Cheng
22
2. copy the resulting sql file to a safe place during OS upgrade.
23
24 11 Anchi Cheng
3. After OS upgrade and performing database setup in [[Database_Server_Installation]]
25
import that into the empty database ("usr_object" need to have privilages to create table):
26 10 Anchi Cheng
<pre>
27
mysql -h database_host -u usr_object -p < leginondb.sql
28
</pre>
29 1 Anchi Cheng
30 3 Anchi Cheng
h1. Upgrade web server
31 1 Anchi Cheng
32 3 Anchi Cheng
h2. Follow [[Web_Server_Installation|Complete Web Server Installation]] including os upgrade to CentOS 6 if you are upgrading from the non-redux version of myami 2.2
33 1 Anchi Cheng
34
Other OS with php 5.3 and above should also work but we can't provide instruction for all individual cases.
35
# Preliminary document for Ubuntu [[Myami_on_Ubuntu]]
36
37 4 Anchi Cheng
h1. Upgrade processing server
38 3 Anchi Cheng
39 6 Anchi Cheng
h2. OS upgrade to CentOS 6 upgrade is OPTIONAL for stand-alone processing server
40 5 Anchi Cheng
41 1 Anchi Cheng
h2. Download myami 3.0 source code
42
43
<pre>
44
svn co http://emg.nysbc.org/svn/myami/branches/myami-3.0/
45
</pre>
46
47
h2. Install Appion/Leginon Packages
48
49
h3. Install all the myami python packages _except appion_ using the following script:
50
51
<pre>
52
cd /your_download_area
53
cd myami
54
sudo ./pysetup.sh install
55
</pre>
56
57
That will install each package, and report any failures.  To determine the cause of failure, see the generated log file "pysetup.log".  If necessary, you can enter a specific package directory and run the python setup command manually.  For example, if sinedon failed to install, you can try again like this: 
58
59
<pre>
60
cd sinedon
61
sudo python setup.py install
62
</pre>
63
64
h3. Move leginon.cfg/instruments.cfg/sinedon.cfg if it was saved with the old installation.
65
66
Run this script to find out where it was:
67
<pre> 
68
cd /your_download_area/myami/leginion/
69
./configcheck.py
70
</pre>
71
If the script can not find leginon.cfg, and you found a copy of leginon.cfg in $PYTHONSITEPKG/leginon/config from the last installation, move that leginon.cfg to $PYTHONSITEPKG/leginon.
72
73
{{include(Appion:Run Database Update Script)}}
74
75
76
77
______
78
79 2 Anchi Cheng
[[How_to_Update_from_v22_(Instrument_Windows_Computer)| How to Update from v2.2 (Instrument Computer) >]]
80 1 Anchi Cheng
81
82
______