- 切換到安裝目錄:
cd /home/apps
- 備份舊有的資料:
mv redmine redmine_bak
- 取得最新的程式:
/usr/local/bin/svn co http://redmine.rubyforge.org/svn/branches/2.0-stable redmine
- 複製資料庫設定、上傳檔案、Theme:
cp /home/apps/redmine_bak/config/database.yml /home/apps/redmine/config/
cp -ai /home/apps/redmine_bak/files/* /home/apps/redmine/files/
cp -ai /home/apps/redmine_bak/public/themes/* /home/apps/redmine/public/themes/
- Plugins:先不要安裝與更新,等下面步驟完成後再來處理。
- 切換到 redmine 根目錄中:
cd redmine
- 更新 RubyGem:
gem update --system
- 檢查並更新 gems:
bundle install --without development test postgresql
- Generate a session store secret:
rake generate_secret_token
- 更新 Database Schema:
rake db:migrate RAILS_ENV=production
- 更新 Plugins 的 Database Schema:
rake redmine:plugins:migrate RAILS_ENV=production
- 清除 cache:
rake tmp:cache:clear
rake tmp:sessions:clear
- 啟動 WEBrick web server 來進行測試:
ruby script/rails server webrick -e production