はじめに
CentOS 6.5に Redmineをインストールする方法について説明します。
最終目標は、既に作成済みのGitLabリポジトリーとの連携です。
この記事では、Redmineのインストールのみについて記載し、次の記事で、連携についての説明をしたいと思います。
GitLab環境の作成に興味がある方は、前の記事をご覧ください。
追記2(CentOS7)
CentOS7 で redmineを導入する方法を公開しました。CentOS7でredmineをとお考えの方は、こちらへどうぞ。
Redmine用データベースの作成
[bash]
# mysql -uroot -p
> create database redmine default character set utf8;
> grant all on redmine.* to ‘redmine’@’localhost’ identified by ‘xxxxxxxx’;
> flush privileges;
> exit;
[/bash]
ライブラリーのインストール
[bash]
# yum install ImageMagick ImageMagick-devel
# yum install ipa-pgothic-fonts
[/bash]
Redmineのインストール
以下のURLにアクセスし、Redmineの最新版あたりをダウンロードください。
http://rubyforge.org/frs/?group_id=1850
[bash]
# tar xvzf redmine-2.4.0.tar.gz
# mv redmine-2.4.0 /var/lib/redmine
# cd /var/lib/redmine
# cp config/database.yml.example config/database.yml
# nano config/database.yml
[/bash]
Mysqlへの接続パスワードを調整します。
[diff]
production:
adapter: mysql2
database: redmine
host: localhost
username: root
– password: “”
+ password: “xxxxxxx”
encoding: utf8
[/diff]
設定ファイル作成
[bash]
# cp config/configuration.yml.example config/configuration.yml
# nano config/configuration.yml
[/bash]
以下の部分、お好きなフォントを指定ください。
[diff]
– rmagick_font_path:
+ rmagick_font_path: /usr/share/fonts/ipa-pgothic/ipagp.ttf
[/diff]
バンドルインストールとデータベース作成
[bash]
# bundle install –without development test postgresql sqlite
# bundle exec rake generate_secret_token
# RAILS_ENV=production bundle exec rake db:migrate
[/bash]
Passengerインストール(既に導入済みであればよみ飛ばしてください)
[bash]
# gem install passenger
# passenger-install-apache2-module
# passenger-install-apache2-module –snippet > /etc/httpd/conf.d/passenger.conf
[/bash]
ApacheとPassenger連携を調整
[bash]
# chown -R apache:apache /var/lib/redmine
# ln -s /var/lib/redmine/public /var/www/html/redmine
# echo “RailsBaseURI /redmine” >> /etc/httpd/conf.d/passenger.conf
# service httpd restart
[/bash]
動作確認
http://myhost.jp/redmine へアクセスすると、トップページが表示されます。
admin/admin でログイン出来ればOKです。
Redmine初期設定
Redmine本家のサイトによい記事がありますので、そちらを参照ください。
Redmineを使い始めるための初期設定
http://redmine.jp/tech_note/first-step/admin/
以上
Leave a comment