Project

General

Profile

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

Anchi Cheng, 06/07/2010 11:28 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
h2. Back up all your databases
70
71 22 Anchi Cheng
h3. Check your database for bad tables
72
73
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.
74
75
# start mysql command line on your leginondb
76
<pre>
77
mysql -u usr_object your_leginon_database
78
</pre>
79
# display all tables
80
<pre>
81
mysql> show tables;
82
</pre>
83 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:
84 22 Anchi Cheng
<pre>
85
mysql> select * from BindingSpecData;
86
mysql> select * from bindingspecdata;
87
</pre>
88
# remove the empty lowercased table
89
<pre>
90
mysql> drop table bindingspecdata;
91
</pre>
92 25 Anchi Cheng
# repeat 3-4 on launchedapplicationdata and nodespecdata
93 22 Anchi Cheng
94 24 Anchi Cheng
h3. Backup
95 22 Anchi Cheng
96 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
97
98
* mysqldump -u usr_object your_leginon_database > leginondb_1_6_backup_today's_date
99
* mysqldump -u usr_object your_project_database > projectdb_1_2_backup_today's_date
100 28 Anchi Cheng
* .... do the same to any of your processing databases if you have installed and used Appion 1.0 beta
101 1 Anchi Cheng
102 2 Anchi Cheng
h2. Install updated Web viewers and tools
103 28 Anchi Cheng
104 29 Anchi Cheng
*You will not need to upgrade php mrc tools*.
105 2 Anchi Cheng
106 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]]
107 2 Anchi Cheng
108
h2. Run database update scripts
109
110 15 Anchi Cheng
<pre>cd /your_download_area/myami/dbschema
111 3 Anchi Cheng
python schema-r12857.py
112 1 Anchi Cheng
python schema-r13713.py
113 8 Anchi Cheng
python schema-r14077.py
114 3 Anchi Cheng
</pre>
115
116
The first one update UserData and GroupData so that new data viewing and processing privileges can be enforced
117 4 Anchi Cheng
The second is a wide-scale change on database schema many on appion processing databases, and some on projectdata and leginondata.
118 27 Anchi Cheng
The third fill in some appion data that was obtained with slow query in previous versions.
119 5 Anchi Cheng
120
______
121
122 6 Anchi Cheng
[[How_to_Update_from_v16_(Microscope_Windows_Computer)|How to Update from v1.6 (Microscope Windows Computer) >]]
123 5 Anchi Cheng
124
125
______