migrate Redmine from 1.3.0 to 2.3.1 stable

You and I can normally follow the official article. http://www.redmine.org/projects/redmine/wiki/RedmineUpgrade

Keep DB available or start it

sudo service mysqld start

Requirements

sudo gem install bundler
sudo yum install -y gcc ruby-devel libxml2 libxml2-devel libxslt libxslt-devel
sudo yum install -y libffi libffi-devel

sudo bundle install --without development test postgresql sqlite rmagick

If you cannot accomplish with above command (I was so...), you should run following commands.

sudo yum install postgresql-devel
sudo yum install sqlite-devel
sudo yum install ImageMagick ImageMagick-devel

Download and extract Redmine and copy some files

wget http://rubyforge.org/frs/download.php/76933/redmine-2.3.1.tar.gz
tar xzf redmine-2.3.1.tar.gz
cp redmine-1.3.0/config/database.yml redmine-2.3.1/config/database.yml
cp redmine-1.3.0/config/configuration.yml redmine-2.3.1/config/configuration.yml
cp -pr redmine-1.3.0/files/ redmine-2.3.1/files/

cp -pr redmine-1.3.0/public/themes/* redmine-2.3.1/public/themes/

Migrate

rake generate_secret_token
rake db:migrate RAILS_ENV=production

Clean up

rake tmp:cache:clear
rake tmp:sessions:clear

Plugins

使っているプラグインはこんなの。

redmine_banner

0.0.9 is good

https://github.com/akiko-pusu/redmine_banner/tree/0.0.9

rake db:migrate_plugins RAILS_ENV=production

redmine_issue_templates

Should use trunk.

https://bitbucket.org/akiko_pusu/redmine_issue_templates/get/tip.zip

以前に入れていたのが最初期版だったため、migrationがうまくいかないので、手動でmigrateする。

ALTER TABLE issue_templates RENAME TO bak_issue_templates;
ALTER TABLE issue_template_settings RENAME TO bak_issue_template_settings;
DELETE FROM schema_migrations WHERE version LIKE '%redmine_issue_templates';

do install

rake db:migrate_plugins RAILS_ENV=production

do migrate manually

INSERT INTO issue_templates SELECT id, title, project_id, 9 , 3, note, description, true, updated_at, updated_at, issue_title, position, false FROM bak_issue_templates;
INSERT INTO issue_template_settings SELECT * FROM bak_issue_template_settings;

redmine_issue_extensions

Use 0.2.0. It is ok just replacing.

https://bitbucket.org/changeworld/redmine_issue_extensions/downloads/redmine_issue_extensions-0.2.0.zip

redmine_lightbox

https://github.com/zipme/redmine_lightbox

zipme版で。Undev版も動くけどサムネイルの表示がなかった。