2015年10月19日 星期一

Install Redmine 3.x on Windows 2012 R2

Reference:
Redmine Installation Guide
HowTo install rmagick gem on Windows
Ruby Development Kit Installation
Initial Configuration Fails with NameError
Redmine卡卡奇案

Downloads:
Redmine download
ImageMagick download
Ruby and Devkit download

版本搭配:
Ruby 2.0.0 (32bit), Devkit (32bit), ImageMagick-6.9.2 (32bit), mysql 5.6 (64bit), Redmine 3.1.1

  • Ruby 必須用 2.0.0,用 2.2.3 在安裝 Redmine 的 bundle exec rake generate_secret_token 會出現錯誤訊息如下,解法為 改用 Ruby 2.0.0
    • NameError: uninitialized constant ActionView::Helpers::ActiveModelHelper
    • LoadError: cannot load such file -- actionpack-action_caching
  • ImageMagick 用 32bit 才會有這兩個目錄
    • C:\Program Files (x86)\ImageMagick-6.x.x-Q16\include
    • C:\Program Files (x86)\ImageMagick-6.x.x-Q16\lib
安裝步驟:
  • install ruby
  • install Devkit
    • 解壓縮到 C:\DevKit
    • cd C:\DevKit
    • ruby dk.rb init
    • ruby dk.rb install
  • install ImageMagick
  • install mysql
  • create database
    • open Command Line
    • cd C:\Program Files\MySQL\MySQL Server 5.6\bin
    • mysql -uroot -p
    • CREATE DATABASE redmine CHARACTER SET utf8;
    • CREATE USER 'redmine'@'localhost' IDENTIFIED BY 'my_password';
    • GRANT ALL PRIVILEGES ON redmine.* TO 'redmine'@'localhost';
  • install Redmine
    • 解壓縮到 C:\redmine-3.1.1
    • cd C:\redmine-3.1.1
    • Copy config/database.yml.example to config/database.yml and edit this file
    • production:
        adapter: mysql
        database: redmine
        host: localhost
        username: redmine
        password: my_password
    • Copy config/configuration.yml.example to config/configuration.yml and edit this file
    • production:
        email_delivery:
          delivery_method: :smtp
          smtp_settings:
            address: "my_mail_server.mydomain.com"
            port: 25
            domain: "mydomain.com"
    • gem install bundler
    • gem install rmagick
    • bundle install
    • bundle exec rake generate_secret_token
    • set RAILS_ENV=production
    • bundle exec rake db:migrate
    • bundle exec rake redmine:load_default_data
  • Test Redmine installation
    • bundle exec rails server webrick -e production -b 0.0.0.0
    • 如果沒有加參數 -b 0.0.0.0 會變成只有 http://localhost:3000 能連上
  • Login Redmine
    • http://servername:3000
    • account: admin
    • password: admin
  • Redmine configuration:
2016/10/26 update:
找到一個 plugin (ckeditor)方便做內文編排,可以方便插入表格。

沒有留言:

張貼留言