How to Update from v16 (Linux) » History » Version 44
Anchi Cheng, 03/28/2011 06:56 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 | 38 | Anchi Cheng | See [[Installation Troubleshooting]] and "Leginon Bulletin Board":http://emg.nysbc.org/projects/leginon/boards searching |
12 | 2 | Anchi Cheng | for "install" if you run into problems. |
13 | |||
14 | 39 | Anchi Cheng | h2. Check and correct the following before you start, because we did not put in the checks for you, and your upgrade will fail if it is incorrect. |
15 | |||
16 | h3. You must have an administrator user in your database |
||
17 | # Go to "http://your_host/dbem_1_5_1/adduser.php |
||
18 | # Check to see that you do have a user with "name" ( as in username) as "administrator" (all lower-case). If you don't have one, make one and save it. |
||
19 | |||
20 | h3. All users should be assigned to a group |
||
21 | # Go to "http://your_host/dbem_1_5_1/addgroup.php |
||
22 | # Create at least a group and save |
||
23 | # Go to "http://your_host/dbem_1_5_1/adduser.php |
||
24 | # If you did not have group created before, select each user and choose a group and then click save. If there is only one group that you just created, you will need to click save even though you can not make the group selection. |
||
25 | |||
26 | 1 | Anchi Cheng | h2. Packages required from NRAMM |
27 | 2 | Anchi Cheng | |
28 | 19 | Anchi Cheng | All Leginon (and Appion) packages distributed from NRAMM are now under one svn control called myami. |
29 | 2 | Anchi Cheng | |
30 | 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. |
||
31 | Here are the packages you need to install with python installer |
||
32 | |||
33 | |_.SVN subPackage Name|_.Reason for update:| |
||
34 | |numextension|package import method change| |
||
35 | |libcv|package import method change| |
||
36 | |leginon|new features| |
||
37 | |pyami|new features| |
||
38 | |sinedon|required for updating database| |
||
39 | |pyscope|new method for creating pythoncom modules| |
||
40 | |imageviewer|debug| |
||
41 | |||
42 | 21 | Amber Herold | h2. Download Leginon 2.0 source code |
43 | |||
44 | 14 | Anchi Cheng | {{include(appion:Download_Appion_Files_Shared)}} |
45 | 13 | Anchi Cheng | |
46 | 1 | Anchi Cheng | h2. Perform system check if you can't remember where you have installed your Leginon before. |
47 | |||
48 | 15 | Anchi Cheng | <pre>cd /your_download_area/myami/leginon |
49 | 11 | Anchi Cheng | python syscheck.py</pre> |
50 | |||
51 | 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". |
52 | |||
53 | 18 | Anchi Cheng | h2. Move your existing python processing packages to a backup directory: |
54 | 11 | Anchi Cheng | |
55 | 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. |
56 | |||
57 | For example, your Leginon folder is at /usr/lib/python/site-packages/Leginon |
||
58 | |||
59 | 10 | Anchi Cheng | <pre>cd /usr/lib/python/site-packages |
60 | 2 | Anchi Cheng | mkdir Leginon1_6_backup |
61 | mv Leginon Leginon1_6_backup</pre> |
||
62 | 10 | Anchi Cheng | |
63 | 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 |
||
64 | 1 | Anchi Cheng | |
65 | 10 | Anchi Cheng | |
66 | 17 | Anchi Cheng | {{include(appion:Install Appion Packages Shared)}} |
67 | 2 | Anchi Cheng | |
68 | h2. Copy your Leginon1.6 sinedon.cfg to the new installation |
||
69 | |||
70 | * Find your sinedon.cfg. Depending on your previous setting, look in the directories listed here in order: |
||
71 | *your home directory as described in syscheck.py |
||
72 | *The sinedon directory where it is called from. If unsure, start python command line and type these to find out: |
||
73 | <pre>python> import sinedon |
||
74 | python> sinedon</pre> |
||
75 | |||
76 | * If sinedon.cfg reside in the installed sinedon subpackage, you should copy it from your Leginon1,6 backup to the new installation. |
||
77 | <pre>cd /your_default_python_installation_path |
||
78 | cp Leginon_1_6_backup/sinedon/sinedon.cfg sinedon |
||
79 | </pre> |
||
80 | |||
81 | 31 | Anchi Cheng | h2. Copy your Leginon1.6 leginon.cfg to the new installation similarly |
82 | |||
83 | * Find your leginon.cfg. Depending on your previous setting, look in the directories listed here in order: |
||
84 | *your home directory as described in syscheck.py |
||
85 | *The leginon directory where it is called from. If unsure, start python command line and type these to find out: |
||
86 | <pre>python> import leginon |
||
87 | python> leginon</pre> |
||
88 | |||
89 | * If leginon.cfg reside in the installed leginon subpackage, you should copy it from your Leginon1,6 backup to the new installation. |
||
90 | <pre>cd /your_default_python_installation_path |
||
91 | cp Leginon_1_6_backup/Leginon/leginon.cfg leginon |
||
92 | </pre> |
||
93 | |||
94 | 2 | Anchi Cheng | h2. Back up all your databases |
95 | |||
96 | 40 | Anchi Cheng | *Very Important: Fix the bad tables before backup with mysqldump or the backup would be corrrupted. Sorry, it was our fault a long time ago.* |
97 | |||
98 | h3. Check and Fix your database for bad tables |
||
99 | 22 | Anchi Cheng | |
100 | 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. |
||
101 | |||
102 | # start mysql command line on your leginondb |
||
103 | <pre> |
||
104 | mysql -u usr_object your_leginon_database |
||
105 | </pre> |
||
106 | # display all tables |
||
107 | <pre> |
||
108 | mysql> show tables; |
||
109 | </pre> |
||
110 | 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: |
111 | 22 | Anchi Cheng | <pre> |
112 | mysql> select * from BindingSpecData; |
||
113 | mysql> select * from bindingspecdata; |
||
114 | </pre> |
||
115 | # remove the empty lowercased table |
||
116 | <pre> |
||
117 | mysql> drop table bindingspecdata; |
||
118 | </pre> |
||
119 | 25 | Anchi Cheng | # repeat 3-4 on launchedapplicationdata and nodespecdata |
120 | 22 | Anchi Cheng | |
121 | 24 | Anchi Cheng | h3. Backup |
122 | 22 | Anchi Cheng | |
123 | 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 |
124 | |||
125 | * mysqldump -u usr_object your_leginon_database > leginondb_1_6_backup_today's_date |
||
126 | * mysqldump -u usr_object your_project_database > projectdb_1_2_backup_today's_date |
||
127 | 28 | Anchi Cheng | * .... do the same to any of your processing databases if you have installed and used Appion 1.0 beta |
128 | 1 | Anchi Cheng | |
129 | 2 | Anchi Cheng | h2. Install updated Web viewers and tools |
130 | 28 | Anchi Cheng | |
131 | 29 | Anchi Cheng | *You will not need to upgrade php mrc tools*. |
132 | 2 | Anchi Cheng | |
133 | 41 | 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. |
134 | |||
135 | h2. Step through setup wizard in the myamiweb on your server |
||
136 | 42 | Anchi Cheng | |
137 | 41 | Anchi Cheng | The Setup Wizard will take you through the steps to create config.php and to create and initialize values for the new tables. For example, project database will contain a table called privileges when you finish. Your old config.php is not formatted correctly for the new viewers but the parameters for databases stands. You can enter them in the wizard. |
138 | 43 | Anchi Cheng | |
139 | 41 | Anchi Cheng | 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]] |
140 | 2 | Anchi Cheng | |
141 | 33 | Anchi Cheng | h2. Check and modify your [[Configure_sinedoncfg|sinedon.cfg]] to be compatible to the new version |
142 | 32 | Anchi Cheng | |
143 | 34 | Anchi Cheng | All module names are now all in lower cass. |
144 | 32 | Anchi Cheng | |
145 | 2 | Anchi Cheng | h2. Run database update scripts |
146 | |||
147 | 15 | Anchi Cheng | <pre>cd /your_download_area/myami/dbschema |
148 | 3 | Anchi Cheng | python schema-r12857.py |
149 | 1 | Anchi Cheng | python schema-r13713.py |
150 | 8 | Anchi Cheng | python schema-r14077.py |
151 | 44 | Anchi Cheng | python schema-r14380.py |
152 | python schema-r15293.py |
||
153 | 3 | Anchi Cheng | </pre> |
154 | |||
155 | 30 | Anchi Cheng | The first one updates UserData and GroupData so that new data viewing and processing privileges can be enforced |
156 | 4 | Anchi Cheng | The second is a wide-scale change on database schema many on appion processing databases, and some on projectdata and leginondata. |
157 | 30 | Anchi Cheng | The third fills in some appion data that was obtained with slow query in previous versions. |
158 | 44 | Anchi Cheng | The rest are debug update after the release of 2.0.0. |
159 | 5 | Anchi Cheng | |
160 | ______ |
||
161 | |||
162 | 6 | Anchi Cheng | [[How_to_Update_from_v16_(Microscope_Windows_Computer)|How to Update from v1.6 (Microscope Windows Computer) >]] |
163 | 5 | Anchi Cheng | |
164 | |||
165 | ______ |