How to Update from v16 (Microscope Windows Computer) » History » Version 2
Anchi Cheng, 05/18/2010 10:15 PM
1 | 1 | Anchi Cheng | h1. How to Update from v16 (Window) |
---|---|---|---|
2 | |||
3 | 2 | Anchi Cheng | The changes from v1.6 requires update of all in-house components of Leginon, dbemtools and database |
4 | but not the mrctools. |
||
5 | Don't forget that you need to also update the packages on the microscope-controlling computer |
||
6 | since the pyScope update need to be synchronized. |
||
7 | 1 | Anchi Cheng | |
8 | 2 | Anchi Cheng | See [[Installation Troubleshooting]] and "Leginon Bulletin Board":http://emg.nysbc.org/bb/viewforum.php?f=2 searching |
9 | 1 | Anchi Cheng | for "install" if you run into problems. |
10 | |||
11 | h2. Packages required from NRAMM |
||
12 | |||
13 | 2 | Anchi Cheng | All Leginon (and Appion) packages distributed from NRAMM are now under one svn control. |
14 | |||
15 | 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. |
||
16 | 1 | Anchi Cheng | Here are the packages you need to install with python installer |
17 | |||
18 | 2 | Anchi Cheng | |_.SVN subPackage Name|_.Reason for update:| |
19 | |numextension|package import method change| |
||
20 | |libcv|package import method change| |
||
21 | |leginon|new features| |
||
22 | |pyami|new features| |
||
23 | |sinedon|required for updating database| |
||
24 | |pyscope|new method for creating pythoncom modules| |
||
25 | |imageviewer|debug| |
||
26 | 1 | Anchi Cheng | |
27 | 2 | Anchi Cheng | Because numextension and libcv requires extra compiler, we have created |
28 | window installer for them for python 2.5 and made them available through "http://www.leginon.org/":http://www.leginon.org/ |
||
29 | 1 | Anchi Cheng | |
30 | 2 | Anchi Cheng | h2. Check out SVN Source Files from the depository |
31 | 1 | Anchi Cheng | |
32 | 2 | Anchi Cheng | Assuming that you have installed some kind of svn client such as TortoiseSVN "http://tortoisesvn.tigris.org/", you can use your mouse to do the following |
33 | *Create Leginon2.0 directory somewhere at your convenience |
||
34 | *Change directory into Leginon2.0 |
||
35 | *Right-click the mouse botton in this directory window and select Tortoise svn |
||
36 | Checkout in the menu:!http://emg.nysbc.org/software/leginon/images/images/svnmenu.png! |
||
37 | *Set up svn checkout window like this, but check out from http://emg.nysbc.org/svn/myami/trunk and save it to Leginon2.0 folder !http://emg.nysbc.org/software/leginon/images/images/svnco.png! |
||
38 | |||
39 | |||
40 | h2. Perform system check if you can't remember where you have installed your Leginon before. |
||
41 | |||
42 | *Go to ~/Leginon2.0/leginon |
||
43 | *Double click on syscheck.py |
||
44 | |||
45 | 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". |
||
46 | |||
47 | 1 | Anchi Cheng | h2. Uninstall your existing packages: |
48 | |||
49 | Although new installation overwrite the old in most cases, problem has been observed in |
||
50 | the past. Therefore, it is best to remove the old files before new installation. |
||
51 | |||
52 | Use "Add or Remove Programs" application in "Control Panel" to do this. Leginon related |
||
53 | packages are shown with prefix "Python 2.5" |
||
54 | |||
55 | If you didn't use Installer to install previously, the packages may not show up in the |
||
56 | 2 | Anchi Cheng | Programs list. Simply remove or rename the folder containing the old packages in this case. |
57 | 1 | Anchi Cheng | |
58 | 2 | Anchi Cheng | h2. Move your existing packages to a backup directory: |
59 | 1 | Anchi Cheng | |
60 | 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. |
61 | 1 | Anchi Cheng | |
62 | 2 | Anchi Cheng | For example, your Leginon folder is at C:\\python25\Lib\site-packages\Leginon |
63 | 1 | Anchi Cheng | |
64 | 2 | Anchi Cheng | <pre>Go to C\\python25\site-packages |
65 | Create Leginon1_6_backup folder |
||
66 | Move Leginon fold into Leginon1_6_backup folder</pre> |
||
67 | 1 | Anchi Cheng | |
68 | 2 | Anchi Cheng | 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 |
69 | 1 | Anchi Cheng | |
70 | 2 | Anchi Cheng | h2. Install the subpackages you downloaded from NRAMM svn depository |
71 | |||
72 | 1 | Anchi Cheng | * Start a command line Window from Start Menu |
73 | |||
74 | * Reinstall the package in each folder with commands such as |
||
75 | 2 | Anchi Cheng | <pre>cd Your_Download_Place\Leginon 2.0\leginon |
76 | 1 | Anchi Cheng | c:\\python25\python.exe setup.py install</pre> |
77 | 2 | Anchi Cheng | * run syscheck.py again to make sure you have everything. |
78 | 1 | Anchi Cheng | |
79 | 2 | Anchi Cheng | h2. Copy your Leginon1.6 sinedon.cfg to the new installation |
80 | 1 | Anchi Cheng | |
81 | 2 | Anchi Cheng | * Find your sinedon.cfg. Depending on your previous setting, look in the directories listed here in order: |
82 | *your home directory as described in syscheck.py |
||
83 | *The sinedon directory where it is called from. If unsure, start python command line and type these to find out: |
||
84 | <pre>python> import sinedon |
||
85 | python> sinedon</pre> |
||
86 | 1 | Anchi Cheng | |
87 | 2 | Anchi Cheng | * If sinedon.cfg reside in the installed sinedon subpackage, you should copy it from your Leginon1.6 backup to the new installation. |
88 | <pre>go to C:\\python25\Lib\site-packages\ |
||
89 | copy Leginon_1_6_backup\sinedon\sinedon.cfg into the new sinedon folder |
||
90 | </pre> |
||
91 | 1 | Anchi Cheng | |
92 | 2 | Anchi Cheng | h2. Back up all your databases |
93 | 1 | Anchi Cheng | |
94 | 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 |
95 | 1 | Anchi Cheng | |
96 | 2 | Anchi Cheng | * mysqldump -u usr_object your_leginon_database > leginondb_1_6_backup_today's_date |
97 | * mysqldump -u usr_object your_project_database > projectdb_1_2_backup_today's_date |
||
98 | * .... do the same to any of your processing databases if you have installed and used Appion 1.0 |
||
99 | 1 | Anchi Cheng | |
100 | 2 | Anchi Cheng | h2. Install updated Web viewers and tools |
101 | 1 | Anchi Cheng | |
102 | 2 | 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. |
103 | |||
104 | h2. Run database update scripts |
||
105 | |||
106 | <pre>cd ~/Leginon2.0/dbschema |
||
107 | python schema-r12857.py |
||
108 | python schema-r13713.py |
||
109 | </pre> |
||
110 | |||
111 | The first one update UserData and GroupData so that new data viewing and processing privileges can be enforced |
||
112 | The second is a wide-scale change on database schema many on appion processing databases, and some on projectdata and leginondata. |