Redmine 1.x升级到2.0.3

本来想按步骤再再写写Redmine的这个升级故事的1.x到2.0.3,还特别找了以下文章内容,以期参考:

Redmine v1.4.x 升級到 Redmine v2.0.x 的升級步驟

基本更新步驟:
切換到安裝目錄:
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
更新 Plugins:¶
Redmine V2.0.x 的 Plugins 目錄從 Redmine V1.x 的 /vendor/plugins 移到 /plugins。
建議的更新方式是一個一個慢慢來,更新完成再進行下一個。
更新流程:(安裝一個 plugin 後,執行 3-5 步驟,確認沒有錯誤後,再安裝下一個 plugin)
切換到 redmine 根目錄中:
cd redmine
檢查並更新 gems (非必要,除非有提醒再執行):
bundle install –without development test postgresql
安裝一個 Plugin:
更新 Database Schema:
rake db:migrate RAILS_ENV=production
更新 Plugins 的 Database Schema:
rake redmine:plugins:migrate RAILS_ENV=production
啟動 WEBrick web server 來進行測試:
ruby script/rails server webrick -e production

如何将Turnkey Redmine 虚拟机从Redmine 1.0.5 升级到1.2

#0
/etc/init.d/apache2 stop
#1
cd /var/www
#2
mv railsapp railsappOLD
#3
svn co http://redmine.rubyforge.org/svn/branches/1.2-stable railsapp
#4
cp ./railsappOLD/config/database.yml ./railsapp/config/database.yml
#5
cp ./railsappOLD/config/email.yml ./railsapp/config/email.yml
#6
cp -r ./railsappOLD/files ./railsapp/filesrak
#7
sudo chown -R root:www-data /var/www/railsapp
#8
cd /var/www/railsapp
#9 (inside the /var/www/railsapp folder)
sudo chown -R www-data:www-data files log tmp
#10 (this command takes a little time – be patient)
gem install rails -v=2.3.11
#11
gem install rack
#12
gem install rack -v=1.1.1
#13 (inside the /var/www/railsapp folder)
rake generate_session_store
#14 (inside the /var/www/railsapp folder)
rake db:migrate RAILS_ENV=production
#15 (inside the /var/www/railsapp folder)
sudo chown -R www-data:www-data files log tmp public/plugin_assets
#16 (inside the /var/www/railsapp folder)
rake db:migrate:upgrade_plugin_migrations RAILS_ENV=production
#17 (inside the /var/www/railsapp folder)
rake db:migrate_plugins RAILS_ENV=production
#18
sudo chmod -R 755 files log/ tmp/ public/plugin_assets
#19 (inside the /var/www/railsapp folder)
rake tmp:cache:clear
#20 (inside the /var/www/railsapp folder)
rake tmp:sessions:clear
#21
/etc/init.d/apache2 start

后来发现如果按说明基本没有什么问题。以下一些内容算是一些参照索引吧:

1. 需要bundler:gem install bundler

2. 安装 Redmine 1.4 ,用Ubuntu Server 11.10
3. How to Install Redmine 2.0.1 on Ubuntu 12.04

# tasksel install lamp-server

# apt-get install ruby-full libmysqlclient-dev libmagickwand-dev libapache2-mod-passenger

# wget http://production.cf.rubygems.org/rubygems/rubygems-1.8.24.tgz
# tar xzvf rubygems-1.8.24.tgz
# cd rubygems-1.8.24
# ruby stup.rb

# ln -s /usr/bin/gem1.8 /usr/bin/gem

# gem install bundler

# wget http://files.rubyforge.vm.bytemark.co.uk/redmine/redmine-2.0.1.tar.gz
# tar xzvf redmine-2.0.1.tar.gz
# mv redmine-2.0.1.tar.gz redmine
# mv redmine /var/www/redmine
# cd /var/www/redmine

# bundle install –without development test postgresql sqlite

# mysql -u root -p
create database redmine character set utf8;
create user ‘redmine’@’localhost’ identified by ‘my_password’;
grant all privileges on redmine.* to ‘redmine’@’localhost’;

# vi config/database.yml
production:
adapter: mysql
database: redmine
host: localhost
username: redmine
password: password

# rake generate_secret_token

# RAILS_ENV=production rake db:migrate

# RAILS_ENV=production rake redmine:load_default_data

# vi /etc/apache2/mods-available/passenger.conf
PassengerDefaultUser www-data

# vi /etc/apache2/sites-available/default
DocumentRoot /var/www/redmine/public

RailsBaseURI /redmine

# a2enmod passenger

# mkdir redmine/public/plugin_assets
# chown -R www-data:www-data redmine/
# chmod -R 755 redmine/
# chmod -R 777 redmine/public/plugin_assets
# chmod -R 777 redmine/files

# service apache2 restart

4. 其实还需要安装安装以下包:

libmysqlclient-dev

libmagickcore-dev

libmagickwand-dev

postgresql-server-dev-8.4

libsqlite3-dev

5. 运行时需要:

mkdir -p ./tmp/pids
touch log/produciton.log
chmod 0666 log/production.log
mkdir -p public/plugin_assets

6. 重要的参考:Upgrading

generate_secret_token

http://www.redmine.org/boards/2/topics/30624
Solved 🙂 problem is passenger module .

1) gem install passenger
2) passenger-install-apache2-module
3).1 vi /etc/apache2/mods_enabled/passenger.load
#change module path to :
LoadModule passenger_module /var/lib/gems/1.8/gems/passenger-3.0.12/ext/apache2/mod_passenger.so
.2 vi /etc/apache2/mods_enabled/passenger.conf
#change conf to

PassengerRoot /var/lib/gems/1.8/gems/passenger-3.0.12
PassengerRuby /usr/bin/ruby1.8
configuration options provided by passenger-install-command. module path may change by time becouse of version

>>>>
LoadModule passenger_module /var/lib/gems/1.8/gems/passenger-3.0.15/ext/apache2/mod_passenger.so << 这行是要加在passenger.load里的,否则只会列出当前目录文件的列表

PassengerRoot /var/lib/gems/1.8/gems/passenger-3.0.15
PassengerRuby /usr/bin/ruby1.8

7. 其它参考:

http://antontw.blogspot.com/2008/11/linux-svn-http-mysql-auth.html
http://www.debuntu.org/2006/05/20/54-how-to-subversion-svn-with-apache2-and-dav
http://www.linuxidc.com/Linux/2012-07/66234.htm

http://code.google.com/p/mod-auth-external/wiki/Installation

8. 原来创建的视图有些小问题了,主要是现在这样的内容需要自己生成或者自己去个性dav_svn配置。

CREATE VIEW users_auth_external AS SELECT u.login AS username, u.hashed_password AS passwd, GROUP_CONCAT(CONCAT(CONCAT(p.identifier, '_'), r.name)) AS groups FROM `members` m INNER JOIN users u ON m.user_id = u.id INNER JOIN projects p ON m.project_id = p.id INNER JOIN member_roles mr ON mr.member_id = m.id INNER JOIN roles r ON mr.role_id = r.id WHERE u.status = 1 GROUP BY username;

9. 还是参考:

http://www.redmine.org/projects/redmine/wiki/Repositories_access_control_with_apache_mod_dav_svn_and_mod_perl 注:新的验证方法用这个配置还是方便,改mysql_auth的源码也是一个方案

http://serverfault.com/questions/355503/svn-authentication-over-apache-dav-and-redmine-not-work

http://www.redmine.org/boards/2/topics/3597?r=3827

http://www.redmine.org/projects/redmine/wiki/Repositories_access_control_with_apache_mod_dav_svn_and_mod_perl?version=24#Testing-the-configuration

http://www.redmine.org/boards/2/topics/24386?r=25722#message-25722
http://www.redmine.org/boards/2/topics/24386?r=24411#message-24411
http://www.redmine.org/issues/7410
http://redmine.rubyforge.org/svn/trunk/extra/svn/Redmine.pm
http://code.google.com/p/redminerepositorycontrol/
http://www.redmine.org/issues/5236
http://www.webdotdev.com/nvd/content/view/209/
http://dev.mysql.com/doc//refman/5.5/en/encryption-functions.html
http://www.redmine.org/boards/2/topics/6387
http://www.linuxquestions.org/questions/linux-server-73/apache-2-2-authtype-digest-pam-module-mysql-configuration-and-guidance-needed-789958/

10. 重要的插件:
https://github.com/ciaranj/redmine_burndown
http://www.redminebacklogs.net/en/installation.html#
https://github.com/backlogs/redmine_backlogs

11. 还有几个库会在安装插件的时候用到,因为时间原因,以上资料用来升级Redmine是足够了,插件因为时间关系暂时是没好。

libxslt

cucumber-rails, gherkin

12.

打赏

发表评论

电子邮件地址不会被公开。 必填项已用*标注