Project

General

Profile

How to Update from v16 (Linux) » History » Revision 3

Revision 2 (Anchi Cheng, 05/11/2010 03:42 PM) → Revision 3/47 (Anchi Cheng, 05/12/2010 12:17 AM)

h1. How to Update from v16 (Linux) 

 The changes from v1.6 requires update of all in-house components of Leginon, dbemtools and database 
 but not the mrctools.  
 Don't forget that you need to also update the packages on the microscope-controlling computer 
 since the pyScope update need to be synchronized. 

 See [[Installation Troubleshooting]] and    "Leginon Bulletin Board":http://emg.nysbc.org/bb/viewforum.php?f=2    searching 
 for "install" if you run into problems. 

 h2. Packages required from NRAMM 

 All Leginon (and Appion) packages distributed from NRAMM are not under one svn control. 

 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. 
 Here are the packages you need to install with python installer 

 |_.SVN subPackage Name|_.Reason for update:| 
 |numextension|package import method change| 
 |libcv|package import method change| 
 |leginon|new features| 
 |pyami|new features| 
 |sinedon|required for updating database| 
 |pyscope|new method for creating pythoncom modules| 
 |imageviewer|debug| 

 h2. Check out SVN Source Files from the depository 

 From a text terminal:<pre> 
 cd ~ 
 svn co http://emg.nysbc.org/svn/myami/trunk Leginon2.0 
 </pre> 

 h2. Perform system check if you can't remember where you have installed your Leginon before. 

 <pre>cd ~/Leginon2.0/leginon 
 python syscheck.py</pre> 

 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". 

 h2. Move your existing packages to a backup directory: 

 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. 

 For example, your Leginon folder is at /usr/lib/python/site-packages/Leginon 

 <pre>cd /usr/lib/python/site-packages 
 mkdir Leginon1_6_backup 
 mv Leginon Leginon1_6_backup</pre> 

 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 

 h2. Install the subpackages you downloaded from NRAMM svn depository 

 * run syscheck.py again to make sure you have everything. 

 * Reinstall the subpackage in each folder with commands such as 
 <pre>cd ~/Leginon2.0/leginon 
 python setup.py install</pre> 

 h2. Copy your Leginon1.6 sinedon.cfg to the new installation 

 * Find your sinedon.cfg. Depending on your previous setting, look in the directories listed here in order: 
 *your home directory as described in syscheck.py 
 *The sinedon directory where it is called from. If unsure, start python command line and type these to find out: 
 <pre>python> import sinedon 
 python> sinedon</pre> 

 *    If sinedon.cfg reside in the installed sinedon subpackage, you should copy it from your Leginon1,6 backup to the new installation. 
 <pre>cd /your_default_python_installation_path 
 cp Leginon_1_6_backup/sinedon/sinedon.cfg sinedon 
 </pre> 

 h2. Back up all your databases 

 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 

 * mysqldump -u usr_object your_leginon_database > leginondb_1_6_backup_today's_date 
 * mysqldump -u usr_object your_project_database > projectdb_1_2_backup_today's_date 
 * .... do the same to any of your processing databases if you have installed and used Appion 1.0 

 h2. Install updated Web viewers and tools 

 See [[Install the Web Interface]] section in Complete Installation Chapter before coming back to put the new web tools (Now under subpackage myamiweb) to document root for next step. 

 h2. Reset installation status in the web server.    Do not use the setup Wizard as described.    Follow these instead: project database 

 You can do this directly by mysql commands. 

 > mysql projectdata 
 * Edit your own config.php instead.    It should look familiar to you. <pre>> mysql projectdata -u usr_object 
 * visit direct http://your_web_server/myamiweb/setup/initDBTables.php.    If it looks o.k., click next mysql> drop table install; 
 mysql> exit</pre> 

 Alternatively, you can use phpMyAdmin to initialize achieve this by visiting the tables. 
 * visit http://your_web_server/myamiweb/setup/updateDataReport.php.    It will add data in database, find the table and click on drop. 

 h2. Visit the updated tools for project database privileges table. management 

 See [[projecttools installation]] section in Complete Installation Chapter. 

 h2. Run database update scripts 

 <pre>cd ~/Leginon2.0/dbschema 
 python schema-r12857.py 
 python schema-r13713.py 
 </pre> 

 The first one update UserData and GroupData so that new data viewing and processing privileges can be enforced 
 The second is a wide-scale change on database schema many on appion processing databases with leginondata PresetData exposure time changed to be a float value. not finished