0
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

備忘録 Windowsに、Redmineをインストール

Posted at

1.ImageMagickのインストール

1.1 ImageMagickをダウンロードする。

ImageMagick

*dll.exe をダウンロードする

1.2 インストール時のオプション

「Install development header and libraries for C and C++」にチェックを入れる。

1.3 環境変数 Path に ImageMagickのパスが追加されていることを確認する。

2.Rubyのインストール

2.1.下記のダウンロードして実行する。

Ruby+Devkit 3.2.2-1 (x64)

2.2. インストール完了後、「Run 'ridk install'・・・」にチェックを付けたままFinish

2.3.コマンドウィンドウが起動するので、ENTERを入力し、完了したら、ENTERを入力し終了。

2.4.cmd(コマンドプロンプト)を「管理者で実行」する。

2.5.webrickをインストールする。

gem install webrick

2.6.rmagickをインストールする。

gem install rmagick

  

3.MariaDBのインストール

3.1. MarianDBをダウンロードする。

MarianDB

3.2. MarianDBのインストール

デフォルト文字コード UTF8 をチェックする。

3.3 Redmine のデータベースの作成

CREATE DATABASE redmine CHARACTER SET utf8mb4;
CREATE USER 'redmine'@’localhost’ IDENTIFIED BY 'PASSWORD';
GRANT ALL PRIVILEGES ON redmine.* TO 'redmine'@’localhost’;
exit

4 Redmineインストール

4.1 Redmineのダウンロード

Redmine 5.0.5

4.2 Redmineを任意のフォルダに解凍する。

D:\に展開し、D:\Redmine で参照できるようにする。

4.3 database.yml の変更

d:\redmine\config\database.yml.exampleをD:\redmine\config\database.ymlにコピーして、5行目付近のデータベースの情報を環境に合わせて書き換えて保存する。

production:
adapter: mysql2
database: redmine
host: localhost
username: redmine
password: "PASSWORD"
# Use "utf8" instead of "utfmb4" for MySQL prior to 5.7.7
encoding: utf8mb4

4.4 configuration.yml の変更

email_deliveryを変更する。
メールの設定例

GMAILを使用する場合は、2段階認証に設定し、使用する。

default:
  email_delivery:

・・・

production:
  email_delivery:

4.5 Gemfileの変更

3行目を下記のように書き換える。

ruby '>= 2.5.0', '< 3.2.3'

4.6 WebブラウザからのアクセスURLに/redmineを付ける場合の設定

D:\redmine\config\environment.rb の末尾に、下記を追記

Redmine::Utils::relative_url_root = "/redmine"

4.7 コマンドプロンプトを管理者権限で起動する。

カレントディレクトリを変更する。

D:

cd D:\redmine

4.8 bundler のインストール

gem install bundler
bundle install --without development test
bundle add webrick rmagick

4.9 Redmineをセットアップする。

set RAILS_ENV=production
bundle exec rake generate_secret_token
bundle exec rake db:migrate
bundle exec rake redmine:load_default_data

4.10 Redmineの自動起動

4.10.1 Thin Serviceをインストールする

gem install thin_service

4.10.2 コマンドプロンプトの文字コードをUTF8に変更する

chcp 65001

4.10.3 WindowsサービスにThin Serviceを登録する

thin_service install -N "Redmine Thin Service" -e production -p 3000 -c "d:\redmine" --prefix "/redmine"

ポートは、3000 です。

4.10.4 Thin Serviceを自動起動

Windowsサービスには手動起動設定として登録されていたので、OS起動時に自動起動するように設定変更する。

5.Redmineにアクセスする

ブラウザでhttp://localhost:3000/にアクセスする。

初期のIDとパスワードは共にadmin。

0
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?