Install redmine2.3.0 (sqlserver2008 database)

Redmine2.3.0 is finally released, and many problems of the previous version have been fixed!!!


1. Preparation

Download railsinstaller (at the bottom of the page): http://railsinstaller.org/windows

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

Install sqlserver2008 (I won’t talk about how to install this, I think anyone who is related to the program will know it)


2. Start the installation

2.1 Run railsinstaller to install, remember to select the path to add to the environment variable, after installation, you will be asked to enter the name and email in an open console, after the input, you can continue to operate or close the window (through the console under the program --> railsinstaller The entrance can open the window again, and this window will be called the railsinstaller console later)


2.2 Unzip redmine to c:\sites (this directory is not required, but it is recommended to be here, and this will be used as an example later)


2.3 Install the following program in the railsinstaller console (the installation process needs to connect to the network), locate the redmine directory, such as: c:\sites\redmine-2.3.0

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 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 Create the database used by redmine in sqlserver2008. The database name we exemplified here is: redmine, the account number is: sa, and the password is: myredmine_pwd


2.6 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.7 Install the database (if there is an error in this step of installation, you can submit it through the comments, or contact me through qq48207475, remember to write csdn questions to contact)

Execute the following command in railsinstaller console

Generate database structure

set RAILS_ENV=production

rake db:migrate

load default data

set REDMINE_LANG=zh

rake redmine:load_default_data


2.8 Generate session key

Execute the following command in railsinstaller console

rake generate_secret_token


2.9 Start the service and test the installation (thin includes commands such as start, restart, stop, etc., you can get help by typing thin yourself)

Execute the following command in railsinstaller console

thin start -e production -p 3000

Open the browser and enter: http://localhost:3000/

Username/password is admin/admin

Remember to change your password after logging in.


3. Make a startup file to avoid entering the command to start the service every time (it can also be started by installing the service, this is not discussed in this article)

Create a new txt file in the directory of redmine, named start. The extension is bat, namely start.bat

By right-clicking start.bat, select Edit, and enter the following

@echo off

thin start -e production -p 3000


Guess you like

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