Upgrade redmine to 2.3.0 (this article uses sqlserver2008 as the database as an example, other databases only need to be modified to their own in the database connection configuration)

redmine2.3.0 was finally released, although it was not found in the first time

When the modification date (start date start_date, planned completion date due_date) existed in 2.2.3 before, the problem of the value and oldvalue time format error in the update record details (specifically mm-dd-yyyy) has also been solved.


1. Preparation

Download redmine2.3.0 (this article takes this version as an example): http://rubyforge.org/frs/?group_id=1850

backup database


2. Start the upgrade

2.1 Unzip redmine-2.3.0 to c:\sites\ redmine-2.3.0 (this directory is not required, but it is recommended to use it here as an example), do not overwrite the original directory


2.2 Copy the following content in the original version installation directory to the new version directory

Attachment: Copy the files folder

Plugins: copy the plugins folder (if you have not installed the plugin yourself, ignore this operation)

Theme: copy the public/themes folder (if you have not installed the theme yourself, ignore this operation)


2.3 Install the following programs in the railsinstaller console (the installation process needs to connect to the network) (you can open the railsinstaller console through the console entry under the program --> railsinstaller)

First modify the package acquisition address: http://ruby.taobao.org/

gem sources --remove https://rubygems.org/
gem sources -a https://ruby.taobao.org/
gem sources -l

gem install rdoc thin

gem install activerecord sqlserver adapter

gem install tiny_tds

bundle install --without development test rmagick


2.4 Modify the GemFile file under redmine (such as: c:\sites\redmine-2.3.0)

Add the following content, otherwise it will prompt that it cannot connect when starting the service at the end.

gem "thin"



2.5 Modify the database connection string in redmine

Copy <RedMine_Root>/config/database.yml.example to <RedMine_Root>/config/database.yml and modify the "production" setting. 

In addition to production, the adapter types of development and test also need to be changed to sql, and we actually use production, and the other two are just for later execution, do not prompt us to install mysql related dll


production:
  adapter: sqlserver
  database: redmine
  host: localhost
  username: sa
  password: myredmine_pwd
  encoding: utf8


development:
  adapter: sqlserver
  database: redmine_development
  host: localhost
  username: root
  password: ""
  encoding: utf8


# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
  adapter: sqlserver
  database: redmine_test
  host: localhost
  username: root
  password: ""
  encoding: utf8



2.6 升级数据库(如果在安装此步骤出现错误,可以通过评论提出,也可以通过qq48207475联系我,记得写上csdn问题联系)

在railsinstaller控制台中执行以下命令

升级数据库结构

set RAILS_ENV=production

rake db:migrate

如果有安装过插件则执行,没有则忽略以下一条命令

rake redmine:plugins:migrate RAILS_ENV=production 

2.7 生成session密钥

在railsinstaller控制台中执行以下命令

rake generate_secret_token


2.8执行清理

rake tmp:cache:clear

rake tmp:seesions:clear


2.9 启动服务,并测试安装(thin 包含start ,restart,stop等命令,可以自己通过输入thin 来获取帮助)

在railsinstaller控制台中执行以下命令

thin start -e production -p 3000

打开浏览器输入:http://localhost:3000/


3.制作启动文件来避免每次都输入启动服务的命令(也可以通过安装服务来启动,这个不在此文章内谈这个)

在redmine的目录下新建一个txt文件,取名start.扩展名为bat,即start.bat

通过右键start.bat,选择编辑,输入以下内容

@echo off

thin start -e production -p 3000



4.原文参考:http://www.redmine.org/projects/redmine/wiki/RedmineUpgrade


Guess you like

Origin blog.csdn.net/DeleteElf/article/details/8725015