(file) Return to TWikiUpgradeGuide.txt CVS log (file) (dir) Up to [RizwankCVS] / geekymedia_web / twiki / data / TWiki

  1 rizwank 1.1 %META:TOPICINFO{author="PeterThoeny" date="1093847381" format="1.0" version="1.1"}%
  2             %TOC%
  3             %STARTINCLUDE%
  4             ---# TWiki Upgrade Guide
  5             
  6             _Upgrade from the previous TWiki 01-Feb-2003 production release to TWiki 01-Sep-2004_
  7             
  8             ---++ Overview
  9             
 10             This guide describes how to upgrade from TWiki 01-Feb-2003 to TWiki 01-Sep-2004. This is a major new release. You can chose between an automated upgrade using a script or a manual update.
 11             
 12             ---++ Upgrade Requirements
 13             
 14             	* Please review the AdminSkillsAssumptions before you upgrade TWiki
 15             	* To upgrade from a 01-Feb-2003 standard installation to the latest 01-Sep-2004 TWiki Production Release, follow the instructions below
 16             	* __NOTE:__ To upgrade from a *pre-01-Feb-2003* TWiki, start with %TWIKIWEB%.TWikiUpgradeTo01Feb2003
 17             	* To upgrade from a Beta of the new release, or if you made custom modifications to the application, read through all new reference documentation, then use the procedure below as a guideline
 18             
 19             ---++ Major Changes Compared to TWiki 01-Feb-2003
 20             
 21             	* Automatic upgrade script, and easier first-time installation
 22 rizwank 1.1 	* Attractive new skins, using a standard set of CSS classes, and a TWikiSkinBrowser to help you choose
 23             	* New easier-to-use save options
 24             	* Many improvements to SEARCH
 25             	* Improved support for internationalisation
 26             	* Better topic management screens
 27             	* More pre-installed Plugins: CommentPlugin, EditTablePlugin, RenderListPlugin, SlideShowPlugin, SmiliesPlugin, SpreadSheetPlugin, TablePlugin
 28             	* Improved Plugins API and more Plugin callbacks
 29             	* Better support for different authentication methods
 30             	* Many user interface and usability improvements
 31             	* And many more enhancements, see the complete change log at TWikiHistory
 32             
 33             
 34             ---++ Automated Upgrade Procedure from 01-Feb-2003 to 01-Sep-2004 Release
 35             
 36             With the 01-Sep-2004 Release, for the first time, comes a helper script for upgrading from a previous version. This feature is currently at beta stage, it has only been sanity tested under Unix. It should be worth giving it a try, it won't mess up your existing
 37             TWiki installation because it leaves that untouched.
 38             
 39             If you would prefer to do things manually than trust a beta script, skip to the [[#ManualUpgradeProcedure][manual upgrade procedure]] below.
 40             
 41             The upgrade script is called ="UpgradeTwiki"=, and is found in the root of the distribution.
 42             
 43 rizwank 1.1 It will:
 44             
 45             	* Create a new TWiki installation, placing the files from the distribution there as appropriate
 46             	* Where possible, merge the changes you've made in your existing topics into the new twiki
 47             	* Where not possible, it will tell you, and you can inspect those differences manually
 48             	* Create new configuration files for the new TWiki based on your existing configuation information
 49             	* Set the permissions in the new TWiki so that it should work straight away
 50             	* Attempt to setup authentication for your new TWiki, if you are using .htaccess in the old one
 51             	* Tell you what else you need to do
 52             
 53             To perform the upgrade, you need to:
 54             
 55             	* Check first if there is a newer =UpgradeTwiki= script available, see TWiki:Codev.UpgradeTwiki
 56             	* Create a new directory for your new installation: Let's call this =distro/=
 57             	* Put the distribution zip file in =distro/=
 58             	* Unzip it
 59             	* Choose a directory for the new installation.  I will call this =new_twiki=.  This directory must not already exist.
 60             	* Change directory to =distro/= and run: %BR%
 61             	  =./UpgradeTwiki <full path to new_twiki>=
 62             
 63             Assuming all goes well, =UpgradeTwiki= will give you the final instructions.
 64 rizwank 1.1 
 65             There are a few points worth noting:
 66             
 67             	* =UpgradeTwiki= may not be able to merge all the changes you made in your existing TWiki into the new installation, but it will tell you which ones it couldn't deal with
 68             	* =UpgradeTwiki= creates the new installation in a new directory tree. It makes a complete copy of all your existing data, so:
 69             		* Clearly you need to point it to a location where there is enough space
 70             		* If you have symlinks under your =data/= directory in your existing installation, these are reproduced as actual directories in the new structure.	It is up to you to pull these sub-directories out again and re-symlink as needed
 71             	* =UpgradeTwiki= doesn't deal with custom templates or Plugins, you will have to reinstall these in the new installation
 72             	* If you have done tricky stuff with $OS in your existing =TWiki.cfg= file, then you will need to manually examine the new =TWiki.cfg= file and possibly put your tricky changes in there manually
 73             
 74             If you use it, and would be kind enough to add your experiences to TWiki:Codev.UpgradeTwiki, it would be much appreciated.  The report of your experience will help to make =UpgradeTwiki= more robust.
 75             
 76             #ManualUpgradeProcedure
 77             ---++ Manual Upgrade Procedure from 01-Feb-2003 to 01-Sep-2004 Release
 78             
 79             The following steps describe the upgrade assuming that =$TWIKIROOT= is the root of your current 01-Feb-2003 release.  As written this will require some downtime.  A process for switching over without downtime is described at the end of this section.
 80             
 81             	1. *Back up and prepare*:
 82             		* Back up all existing TWiki directories =$TWIKIROOT/bin=, =$TWIKIROOT/pub=, =$TWIKIROOT/data=, =$TWIKIROOT/templates=, =$TWIKIROOT/lib=
 83             		* Create a temporary directory and unpack the ZIP file there
 84             	1. *Update files in TWiki root*:
 85 rizwank 1.1 		* Overwrite all =*.html= and =*.txt= files in =$TWIKIROOT= with the new ones
 86             	1. *Update template files*:
 87             		* Overwrite all template files in =$TWIKIROOT/templates= with the new ones
 88             			* If you have customized your templates, make sure to merge those changes back to the new files
 89             		* If you have customized skins or loaded new skins, make sure to merge or apply those changes to the new files
 90             		* Change to *view* templates and skins:
 91             			* Add =%<nop>BROADCASTMESSAGE%= somewhere on the top of the rendered HTML page (see the new =view.tmpl= for reference)
 92             		* Changes to *edit* templates and skins:
 93             			* Change the form action from =preview= to =save=: %BR%
 94             			  =&lt;form name="main" action="%<nop>SCRIPTURLPATH%/<b>save</b>%<nop>SCRIPTSUFFIX%/%<nop>WEB%/%<nop>TOPIC%" method="post"&gt;=
 95             			* Change the topic action to the following: %BR%
 96             			  =%<nop>TMPL:DEF{"topicaction"}%= %BR%
 97             		=&lt;input type="submit" class="twikiSubmit" name="action" value="Cancel" id="cancel" /&gt;= %BR%
 98             		=&lt;input type="submit" class="twikiSubmit" name="action" value="Preview" id="preview" /&gt;= %BR%
 99             		=&lt;input type="submit" class="twikiSubmit" name="action" value="Checkpoint" id="checkpoint" /&gt;= %BR%
100             		=&lt;input type="submit" class="twikiSubmit" name="action" value="QuietSave" id="quietsave" /&gt;= %BR%
101             			  =&lt;input type="submit" class="twikiSubmit" name="action" value="Save" id="save" /&gt;%<nop>TMPL:END%=
102             	1. *Update script files*:
103             		* Overwrite all script files in =$TWIKIROOT/bin= with the new ones.
104             			* If necessary, rename the scrips to include the required extension, e.g. =.cgi=
105             		* Edit =$TWIKIROOT/bin/setlib.cfg= and point =$twikiLibPath= to the __absolute__ file path of =$TWIKIROOT/lib= 
106 rizwank 1.1 		* Edit your existing =$TWIKIROOT/bin/.htaccess= file to include a directive for the new =rdiffauth= script:%BR%
107             		  =&lt;Files "rdiffauth"&gt;= %BR%
108             		  =&nbsp; &nbsp; require valid-user= %BR%
109             		  =&lt;/Files&gt;=
110             		* Pay attention to the file and directory permissions, the scripts need to be executable, e.g. =chmod 775 $TWIKIROOT/bin/*=
111             			* Certain hosted environments require a =755= (do so if you get a "Premature end of script headers" messages in the Apache error log)
112             		* For Windows hosts, make sure the correct path to the perl interpreter is changed in the first line of every script file. See also [[WindowsInstallCookbook#Editing_the_CGI_scripts][WindowsInstallCookbook]]
113             	1. *Update library files*:
114             		* Overwrite the =TWiki.cfg= configuration file in =$TWIKIROOT/lib= with the new one
115             		* Restore the configuration values from the backup. You typically need to configure just the ones in the section "variables that need to be changed when installing on a new server"
116             		* Overwrite the =TWiki.pm= library in =$TWIKIROOT/lib= with the new one
117             		* Copy and overwrite all subdirectories below =$TWIKIROOT/lib= with the new ones. Make sure to preserve any extra Plugins you might have in =$TWIKIROOT/lib/TWiki/Plugins= 
118             		* Pay attention to the file and directory permissions, the library files should not be executable but the directory files should be, e.g. =chmod 664 `find -type f $TWIKIROOT/lib`= (for files) and =chmod 775 `find -type d $TWIKIROOT/lib`= (for directories)
119             	1. *Update data files*:
120             		* Run the =bin/testenv= script from the browser (e.g. =http://localhost/bin/testenv=) to verify if the cgi-scripts are running as user =nobody=. In case not:
121             			* The =*,v= RCS repository files delivered with the installation package are locked by user =nobody= and need to be changed to the user of your cgi-scripts, for example =www-data=
122             			* Run the =testenv= script from your browser; in the %BROWN% *Fix* %ENDCOLOR% line you can <u>relock</u> all the rcs files *(recommended)*
123             			* Alternatively, execute the shell script commands described in [[TWikiInstallationGuide#StepTwo]]
124             		* In the temporary =twiki/data/TWiki= directory where you unzipped the installation package:
125             			* Remove the files you do *not* want to upgrade: =InterWikis.*=, =TWikiRegistration.*=, =TWikiRegistrationPub.*=, =WebPreferences.*=, =WebStatistics.*= and all =WebTopic*= files
126             		* Rename in the temporary directory the file =$TWIKIROOT/data/TWiki/TWikiPreferences.*= to =TWikiPreferencesSave.*=.
127 rizwank 1.1 		* Move all remaining =*.txt= and =*.txt,v= files from the temporary =data/TWiki= directory to your =$TWIKIROOT/data/TWiki= directory, overwriting the existing ones
128             		* Merge your original =TWikiPreferencesSave.txt= settings into =$TWIKIROOT/data/TWiki/TWikiPreferences.txt=. Notable changes are:
129             			* New WIKIWEBMASTERNAME setting to avoid notifications being trapped by spam filters
130             			* New ATTACHFILESIZELIMIT setting for maximum size of FileAttachments in KB, 0 for no limit
131             			* New READTOPICPREFS and TOPICOVERRIDESUSER settings to allow override Preference settings in topics
132             			* Changed FINALPREFERENCES:
133             				* <nop>Set FINALPREFERENCES = PREVIEWBGIMAGE, WIKITOOLNAME, WIKIWEBMASTER, SMTPMAILHOST, SMTPSENDERHOST, ALLOWWEBMANAGE, READTOPICPREFS, TOPICOVERRIDESUSER
134             		* Move the =data/_default= directory from the temporary location to your =$TWIKIROOT/data= directory
135             		* Make sure that the directories and files below =$TWIKIROOT/data= are writable by your cgi-script user
136             	1. *Adapt the other webs (all other than =TWiki= and =_default=)*:
137             		* Add WebLeftBar topic. See WebLeftBarExample for a clean example, and TWiki.WebLeftBarCookbook for more information. (WebLeftBar is used by the TWiki.PatternSkin skin)
138             		* Add WebSearchAdvanced topic, which has this one line: %BR%
139             		  =%<nop>INCLUDE{"%<nop>TWIKIWEB%.WebSearchAdvanced"}%=
140             		* Consider changing WebPreferences settings:
141             			* New NOAUTOLINK setting to prevent automatic linking of WikiWords and acronyms
142             			* Changed FINALPREFERENCES:
143             				* <nop>Set FINALPREFERENCES = NOSEARCHALL, ATTACHFILESIZELIMIT, WIKIWEBMASTER, WEBCOPYRIGHT, WEBTOPICLIST, DENYWEBVIEW, ALLOWWEBVIEW, DENYWEBCHANGE, ALLOWWEBCHANGE, DENYWEBRENAME, ALLOWWEBRENAME
144             	1. *Update pub files*:
145             		* Move all subdirectories below =pub/TWiki= from your temporary directory into your =$TWIKIROOT/pub/TWiki= directory
146             		* Make sure that the directories and files below =$TWIKIROOT/pub/TWiki= are writable by your cgi-script user
147             		* Move all files in =pub/icn= directory from the temporary location to your =$TWIKIROOT/pub/icn= directory
148 rizwank 1.1 	1. *Verify installation*:
149             		* Execute the =$TWIKIROOT/bin/testenv= script from your browser (e.g. =http://localhost/bin/testenv=) to see if it reports any issues; address any potential problems
150             		* Test your updated TWiki installation to see if you can view, create, edit and rename topics; upload and move attachments; register users
151             		* Test if the installed Plugins work as expected. You should see the list of installed Plugins in [[%TWIKIWEB%.WebHome]]
152             
153             *Note:* These steps assume a downtime during the time of upgrade. You could install the new version in parallel to the existing one and switch over in an instant without affecting the users. As a guideline, install the new version into =$TWIKIROOT/bin1=, =$TWIKIROOT/lib1=, =$TWIKIROOT/templates1=, =$TWIKIROOT/data/TWiki1= (from =data/TWiki=), =$TWIKIROOT/pub/TWiki1= (from =pub/TWiki=), and configure =TWiki.cfg= to point to the same data and pub directory like the existing installation. Once tested and ready to go, reconfigure =$TWIKIROOT/bin1/setlib.cfg= and =$TWIKIROOT/lib1/TWiki.cfg=, then rename =$TWIKIROOT/bin= to =$TWIKIROOT/bin2=, =$TWIKIROOT/bin1= to =$TWIKIROOT/bin=. Do the same with the =lib=, =templates= and =data/TWiki= directories.
154             
155             ---++ Known Issues
156             
157             	* Check TWiki:Codev/KnownIssuesOfTWiki01Sep2004 for known issues of TWiki 01-Sep-2004 production release
158             
159             -- TWiki:Main.PeterThoeny - 29 Aug 2004 %BR%
160             
161             %STOPINCLUDE%
162             

Rizwan Kassim
Powered by
ViewCVS 0.9.2