I’m hungry

おもにAmazonでの衝動買いや技術的な話をぼちぼちと。

redmineインストールメモ

2011-06-23 19:26:17 | ネットサービス/テクノロジ
redmineを入れたときの備忘メモ。


■redmineグループ作成する

$ /usr/sbin/groupadd redmine

■redmineユーザを作成する

$ /usr/sbin/useradd -u 111 -g 111 -s /bin/bash -d /home/redmine -m redmine
$ /usr/sbin/usermod -U redmine
$

■本家 http://redmine.jp/download/ からリリース版をダウンロードして,展開,シンボリックリンク張る

$ cd /home/redmine
$ wget http://rubyforge.org/frs/download.php/74944/redmine-1.2.0.tar.gz
$ tar -xozf redmine-1.2.0.tar.gz
$ ln -s redmine-1.2.0 redmine

■環境変数RAILS_ROOTを設定

$ vi .bashrc

export RAILS_ROOT=/home/redmine/redmine

$

■MySQLにredmine用のユーザを作成して権限付与する

$ mysql -uroot -p -hlocalhost

Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 6025
Server version: 5.1.57-log MySQL Community Server (GPL)

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> create database redmine character set utf8;

mysql> create user 'redmine'@'localhost' identified by 'your_password_yeah!';

mysql> grant all privileges on redmine.* to 'redmine'@'localhost';

mysql>

■database.ymlにDBサーバー名、アクセス用ユーザ、パスワードを記載

$ cd /home/redmine/redmine/config
$ cp database.yml.example database.yml
$ vi database.yml

# MySQL (redmine).

production:
adapter: mysql
database: redmine
host: localhost
username: redmine
password: your_password_yeah!
encoding: utf8

$


■configuration.ymlにメールサーバーの設定を記載

$ cd config
$ cp configuration.yml.example configuration.yml
$ vi configuration.yml

default:
# Outgoing emails configuration (see examples above)
email_delivery:
delivery_method: :smtp
smtp_settings:
address: localhost
port: 25
domain: hello.example.com



■セッションストア秘密鍵を生成してDB(redmineデータベース)にテーブル作成

$ rake generate_session_store

$ rake db:migrate RAILS_ENV="production"


■標準(推奨される)データを登録

$ rake redmine:load_default_data RAILS_ENV="production"

Select language: bg, bs, ca, cs, da, de, el, en, en-GB, es, eu, fa, fi, fr, gl, he, hr, hu, id, it, ja, ko, lt, lv, mk, mn, nl, no, pl, pt, pt-BR, ro, ru, sk, sl, sr, sr-YU, sv, th, tr, uk, vi, zh, zh-TW [en] ja
====================================
Default configuration data loaded.
$


■Apache上で動作させるためにPassengerをインストール,Railsアプリケーションを実行するためのApacheモジュールのコンパイルとインストール

$ gem install passenger
$ passenger-install-apache2-module
$

Apacheモジュールをコンパイル,インストールする最中にapacheの設定ファイルの書き方がメッセージで表示される

LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-3.0.7/ext/apache2/mod_passenger.so
PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-3.0.7
PassengerRuby /usr/bin/ruby

<VirtualHost *:80>
ServerName www.yourhost.com
DocumentRoot /somewhere/public # <-- be sure to point to 'public'!
<Directory /somewhere/public>
AllowOverride all # <-- relax Apache security settings
Options -MultiViews # <-- MultiViews must be turned off
</Directory>
</VirtualHost>

ので反映する。


■apacheのユーザ権限で上書き

redmineディレクトリ配下はapacheの実行ユーザ権限にする必要あり

$ cd /home/redmine
$ chown -R apache:apache ./redmine
$










Comment    この記事についてブログを書く
  • X
  • Facebookでシェアする
  • はてなブックマークに追加する
  • LINEでシェアする
« awsメモ(RDS) | TOP | Amazon S3のバケットに特定の... »
最新の画像もっと見る

post a comment

ブログ作成者から承認されるまでコメントは反映されません。

Recent Entries | ネットサービス/テクノロジ