heavenchou - 三, 2009/05/06 - 00:55
昨天我也抽空把自己的站由 Drupal 6.10 升級到 6.11,Drupal 6.11 檔案中有一份 UPGRADE.txt,內容我看了一下,和上一版的相同。其實我發現好幾版都沒有改過這個檔了,所以我就把上一版的拿出來用,因為我英文不好,當初升級時有加註了簡單的中文說明,這次升級起來就輕鬆多了。
底下是 Drupal 提供的 UPGRADE.txt 及我自己的中文說明。中文部份有一些註解,則是我自己的一些看法,僅供參考。
不知這份 UPGRADE.txt 有沒有版權?如果有的話,還請提醒我一聲,因為我原本只想把中文部份貼出來讓大家參考,但想想還是連英文都貼出來,免得我寫的說明太簡單不易明白,或是寫錯了也沒人知道。
// $Id: UPGRADE.txt,v 1.12 2008/01/04 16:15:58 goba Exp $ UPGRADING --------- Prior to upgrading, you should ensure that: * Your system meets or exceeds Drupal's minimum requirements as shown at http://drupal.org/requirements. * You have a backup of all your relevant data (#1). * Custom and contributed modules have been checked for compatibility (#11). * Custom and contributed themes have been checked for compatibility (#11). * You have read through this entire document. * 系統要符合最基本的要求 * 備份所有資料 * 檢查自行安裝的模組是否相容於要更新的版本 * 檢查自行安裝的版型是否相容於要更新的版本 * 要讀完這整篇文件 Let's begin! 1. Backup your database and Drupal directory - especially your "sites" directory which contains your configuration file and added modules and themes, any contributed or custom modules in your "modules" directory, and your "files" directory which contains uploaded files. If other files have modifications, such as .htaccess or robots.txt, those should be backed up as well. Note: for a single site setup, the configuration file is the "settings.php" file located at sites/default/settings.php. The default.settings.php file contains a clean copy for restoration purposes, if required. For multisite configurations, the configuration file is located in a structure like the following: sites/default/settings.php sites/example.com/settings.php sites/sub.example.com/settings.php sites/sub.example.com.path/settings.php More information on multisite configuration is located in INSTALL.txt. 備份資料庫及整個站的所有目錄,尤其是 sites 這個目錄。 註1:因為 sites 裡面放的是自行安裝的模組與版型,sites/default/files 則是一些使用者上傳的檔案,以及安裝與設定時產生的檔案。 註2:應該先執行步驟 3 把系統設成維護狀態會比較好,免得在備份期間, 又有使用者上傳資料。 註3:資料庫我是用網站的 cPanel 後台工具進行備份的。 2. If possible, log on as the user with user ID 1, which is the first account created and the main administrator account. User ID 1 will be able to automatically access update.php in step #10. There are special instructions in step #10 if you are unable to log on as user ID 1. Do not close your browser until the final step is complete. 儘可能使用 ID 1 (第一個建立的使用者) 登錄,否則就要使用步驟 10 的特殊方法。 3. Place the site in "Off-line" mode, to let the database updates run without interruption and avoid displaying errors to end users of the site. This option is at http://www.example.com/?q=admin/settings/site-maintenance (replace www.example.com with your installation's domain name and path). 將網站設定成維護狀態,資料庫更新時才不會被意外中斷。 註:我覺得此步驟應該在備份之前就先做會比較好。 4. If using a custom or contributed theme, switch to a core theme, such as Garland or Bluemarine. 若不是使用系統提供的預設版型,請先換成預設版型(Garland 或 Bluemarine)。 5. Disable all custom and contributed modules. 關閉所有自行安裝的模組。 6. Remove all old files and directories from the Drupal installation directory. Drupal 的安裝目錄,要移除全部的老舊目錄及檔案。 註:其實 sites 目錄可以先不要移除,此步驟與步驟 8 有關。 7. Unpack the new files and directories into the Drupal installation directory. 新版的檔案全部 copy 到 Drupal 的安裝目錄中。 註:此時我也把語言包的資料複製進去。 8. Copy your backed up "files" and "sites" directories to the Drupal installation directory. If other system files such as .htaccess or robots.txt were customized, re-create the modifications in the new versions of the files using the backups taken in step #1. 將原來的 sites 目錄及 files 目錄的檔案都 copy 回去。 若 .htaccess 及 robots.txt 曾經更改過,也要 copy 回去。 註1:files 在 Drupal 5.X 版時是在 sites 目錄之外, Drupal 6.X 版預設就移到 sites/default/files 目錄了。 註2:最好檢查 sites/default 目錄中原來 settings.php 和新版的 default.settings.php 有何差異。因為 settings.php 裡面有記錄資料庫的設 定,也有可能加了其他設定,例如擴增 php 的記憶體使用量,所以比對一下原 先的 settings.ph 與新版提供的 default.settings.php 會比較好。 9. Verify the new configuration file to make sure it has correct information. 檢查新站的設定是否正確。 10. Run update.php by visiting http://www.example.com/update.php (replace www.example.com with your Drupal installation's domain name and path). This step will update the core database tables to the new Drupal installation. Note: if you are unable to access update.php do the following: - Open your settings.php with a text editor. - There is a line that says $update_free_access = FALSE; Change it to $update_free_access = TRUE; - Once update.php is done, you must change the settings.php file back to its original form with $update_free_access = FALSE; 開啟你自己的站 http://www.example.com/update.php 來進行更新網站。 如果無法順利開啟 update.php , 則用編輯器開啟 settings.php , 把這行 $update_free_access = FALSE; 換成這行 $update_free_access = TRUE; 若成功後,還要再把該行改回 $update_free_access = FALSE; 11. Ensure that the versions of all custom and contributed modules match the new Drupal version to which you have updated. For a major update, such as from 5.x to 6.x, modules from previous versions will not be compatible and updated versions will be required. - For contributed modules, check http://drupal.org/project/modules for the version of a module matching your version of Drupal. - For custom modules, review http://drupal.org/update/modules to ensure that a custom module is compatible with the current version. 確定所有的模組有符合新的版本。若主要版本編號不同,則模組通常要更新。 12. Re-enable custom and contributed modules and re-run update.php to update custom and contributed database tables. 重新啟動額外的模組,並再次執行 update.php 去更新資料庫。 13. Return the site to its original theme (if you switched to a core theme like Garland or Bluemarine in step #4). If your site uses a custom or contributed theme, make sure it is compatible with your version of Drupal. - For contributed themes, check http://drupal.org/project/themes for the version of a theme matching your version of Drupal. - For custom themes, review http://drupal.org/update/theme to ensure that a custom theme is compatible with the current version. 設定回原先使用的版型,不過必須確認要符合新的版本。 14. Finally, return your site to "Online" mode so your visitors may resume browsing. As in step #3, this option is available in your administration screens at http://www.example.com/?q=admin/settings/site-maintenance (replace www.example.com with your installation's domain name and path). 最後,將網站設回 "Online" , 就可以使用了。 For more information on upgrading visit the Drupal handbook at http://drupal.org/upgrade
重要度:
文章分類:
電腦標籤:
- 瀏覽次數:24638
發表新回應