Project

General

Profile

How to Update from v16 (Linux) » History » Version 33

Anchi Cheng, 07/23/2010 10:52 PM

1 1 Anchi Cheng
h1. How to Update from v16 (Linux)
2 2 Anchi Cheng
3 19 Anchi Cheng
The changes from v1.6 requires update of all in-house components of Leginon, dbemtools (called myamiweb in the new version) and database
4 28 Anchi Cheng
but *not the php mrctools*. 
5 19 Anchi Cheng
6 20 Anchi Cheng
*This processing package upgrade instruction includes that for installing Appion's processing scripts and executables.  They have more supporting package requirement.  Therefore, if you do not plan to use Appion on this computer, you may skip it.*
7 19 Anchi Cheng
8 2 Anchi Cheng
Don't forget that you need to also update the packages on the microscope-controlling computer
9
since the pyScope update need to be synchronized.
10
11
See [[Installation Troubleshooting]] and  "Leginon Bulletin Board":http://emg.nysbc.org/bb/viewforum.php?f=2  searching
12
for "install" if you run into problems.
13
14 1 Anchi Cheng
h2. Packages required from NRAMM
15 2 Anchi Cheng
16 19 Anchi Cheng
All Leginon (and Appion) packages distributed from NRAMM are now under one svn control called myami.
17 2 Anchi Cheng
18
A few updates are needed for preparation of python 3.0 compatibility where the method for importing module is changed.  They will still run under python 2.4 and up.
19
Here are the packages you need to install with python installer
20
21
|_.SVN subPackage Name|_.Reason for update:|
22
|numextension|package import method change|
23
|libcv|package import method change|
24
|leginon|new features|
25
|pyami|new features|
26
|sinedon|required for updating database|
27
|pyscope|new method for creating pythoncom modules|
28
|imageviewer|debug|
29
30 21 Amber Herold
h2. Download Leginon 2.0 source code
31
32 14 Anchi Cheng
{{include(appion:Download_Appion_Files_Shared)}}
33 13 Anchi Cheng
34 1 Anchi Cheng
h2. Perform system check if you can't remember where you have installed your Leginon before.
35
36 15 Anchi Cheng
<pre>cd /your_download_area/myami/leginon
37 11 Anchi Cheng
python syscheck.py</pre>
38
39 12 Anchi Cheng
You should have all the supporting packages installed for v1.6. If you see any lines like "*** Failed...", then you have something missing. Otherwise, everything should result in "OK".
40
41 18 Anchi Cheng
h2. Move your existing python processing packages to a backup directory:
42 11 Anchi Cheng
43 2 Anchi Cheng
At the beginning of the syscheck.py output, the location of the exisiting Leginon folder is shown. Although new installation overwrite the old in most cases, problem has been observed in the past. Therefore, it is best to remove the old files from the path before new installation.  Better yet, copy into a backup folder because we need some configuration files from them.
44
45
For example, your Leginon folder is at /usr/lib/python/site-packages/Leginon
46
47 10 Anchi Cheng
<pre>cd /usr/lib/python/site-packages
48 2 Anchi Cheng
mkdir Leginon1_6_backup
49
mv Leginon Leginon1_6_backup</pre>
50 10 Anchi Cheng
51
Be aware that in some cases the installed package name is different (capitalized) from your svn package name and that numextension amd libCV are not in its own subdirectory in the python library but just the compiled .so files
52 1 Anchi Cheng
53 10 Anchi Cheng
54 17 Anchi Cheng
{{include(appion:Install Appion Packages Shared)}}
55 2 Anchi Cheng
56
h2. Copy your Leginon1.6 sinedon.cfg to the new installation
57
58
* Find your sinedon.cfg. Depending on your previous setting, look in the directories listed here in order:
59
*your home directory as described in syscheck.py
60
*The sinedon directory where it is called from. If unsure, start python command line and type these to find out:
61
<pre>python> import sinedon
62
python> sinedon</pre>
63
64
*  If sinedon.cfg reside in the installed sinedon subpackage, you should copy it from your Leginon1,6 backup to the new installation.
65
<pre>cd /your_default_python_installation_path
66
cp Leginon_1_6_backup/sinedon/sinedon.cfg sinedon
67
</pre>
68
69 31 Anchi Cheng
h2. Copy your Leginon1.6 leginon.cfg to the new installation similarly
70
71
* Find your leginon.cfg. Depending on your previous setting, look in the directories listed here in order:
72
*your home directory as described in syscheck.py
73
*The leginon directory where it is called from. If unsure, start python command line and type these to find out:
74
<pre>python> import leginon
75
python> leginon</pre>
76
77
*  If leginon.cfg reside in the installed leginon subpackage, you should copy it from your Leginon1,6 backup to the new installation.
78
<pre>cd /your_default_python_installation_path
79
cp Leginon_1_6_backup/Leginon/leginon.cfg leginon
80
</pre>
81
82 2 Anchi Cheng
h2. Back up all your databases
83
84 22 Anchi Cheng
h3. Check your database for bad tables
85
86
We've found this on two databases outside NRAMM that there are empty tables created that causes a bad database backup.  Please check and correct your database first before your backup.
87
88
# start mysql command line on your leginondb
89
<pre>
90
mysql -u usr_object your_leginon_database
91
</pre>
92
# display all tables
93
<pre>
94
mysql> show tables;
95
</pre>
96 28 Anchi Cheng
# if you find both BindngSpecData and bindingspecdata, you have a problem.  The former has data in there and the later does not.  If you have data in both tables, please contact us.  We will need to create a customized solution. You can check like this:
97 22 Anchi Cheng
<pre>
98
mysql> select * from BindingSpecData;
99
mysql> select * from bindingspecdata;
100
</pre>
101
# remove the empty lowercased table
102
<pre>
103
mysql> drop table bindingspecdata;
104
</pre>
105 25 Anchi Cheng
# repeat 3-4 on launchedapplicationdata and nodespecdata
106 22 Anchi Cheng
107 24 Anchi Cheng
h3. Backup
108 22 Anchi Cheng
109 2 Anchi Cheng
We will be doing a database update that is not backward compatible,  Make sure you back up all your current databases before performing the update
110
111
* mysqldump -u usr_object your_leginon_database > leginondb_1_6_backup_today's_date
112
* mysqldump -u usr_object your_project_database > projectdb_1_2_backup_today's_date
113 28 Anchi Cheng
* .... do the same to any of your processing databases if you have installed and used Appion 1.0 beta
114 1 Anchi Cheng
115 2 Anchi Cheng
h2. Install updated Web viewers and tools
116 28 Anchi Cheng
117 29 Anchi Cheng
*You will not need to upgrade php mrc tools*.
118 2 Anchi Cheng
119 26 Anchi Cheng
See [[Install the Web Interface]] section in Complete Installation Chapter to put the new web tools (Now under subpackage myamiweb) to document root for the web server.  The Setup Wizard will take you through the steps to create config.php and to create and initialize values for the new tables.  You will be asked about whether you want to enable myamiweb user login feature that restricts individual user's access to projects and administrator features.  Read about it [[appion:User Management|here]]
120 2 Anchi Cheng
121 33 Anchi Cheng
h2. Check and modify your [[Configure_sinedoncfg|sinedon.cfg]] to be compatible to the new version
122 32 Anchi Cheng
123
We now have consistent module names all in lower cass.
124
125 2 Anchi Cheng
h2. Run database update scripts
126
127 15 Anchi Cheng
<pre>cd /your_download_area/myami/dbschema
128 3 Anchi Cheng
python schema-r12857.py
129 1 Anchi Cheng
python schema-r13713.py
130 8 Anchi Cheng
python schema-r14077.py
131 3 Anchi Cheng
</pre>
132
133 30 Anchi Cheng
The first one updates UserData and GroupData so that new data viewing and processing privileges can be enforced
134 4 Anchi Cheng
The second is a wide-scale change on database schema many on appion processing databases, and some on projectdata and leginondata.
135 30 Anchi Cheng
The third fills in some appion data that was obtained with slow query in previous versions.
136 5 Anchi Cheng
137
______
138
139 6 Anchi Cheng
[[How_to_Update_from_v16_(Microscope_Windows_Computer)|How to Update from v1.6 (Microscope Windows Computer) >]]
140 5 Anchi Cheng
141
142
______