Redmineの導入手順のソースを表示
←
Redmineの導入手順
ナビゲーションに移動
検索に移動
あなたには「このページの編集」を行う権限がありません。理由は以下の通りです:
この操作は、次のグループに属する利用者のみが実行できます:
登録利用者
。
このページのソースの閲覧やコピーができます。
[[Category:その他]] 本ページでは、Rubyで作成されたバグトラッキングシステムである「Redmine」の導入手順を記述します。今回、バージョン管理システムは「Mercurial」を使用します。 == 環境 == * OS : CentOS 5.4 * Web Server : Apache 2.2.17 * Database : MySQL 5.1.54 * Other : Redmine 1.1.0, Ruby 1.8.7, rubygems 1.4.2, Mercurial 1.7.3 == インストール == === MySQL === 入手先 :http://www.mysql.com/ <source lang="text"> $ tar zxvf mysql-5.1.54.tar.gz $ cd mysql-5.1.54 $ ./configure $ make # make install </source> === Apache === 入手先 : http://httpd.apache.org/ <source lang="text"> $ tar zxvf httpd-2.2.17.tar.gz $ cd httpd-2.2.17 $ ./configure $ make # make install </source> === Ruby === 入手先 : http://www.ruby-lang.org/ <source lang="text"> $ tar zxvf ruby-1.8.7-p330.tar.gz $ cd ruby-1.8.7-p330 $ ./configure $ make # make install </source> === RubyGems === 入手先 : http://rubyforge.org/projects/rubygems/ <source lang="text"> $ tar zxvf rubygems-1.4.2.tgz $ cd rubygems-1.4.2 # ruby setup.rb </source> === Ruby on Rails === RubyGemsからインストールします。[http://www.redmine.org/projects/redmine/wiki/RedmineInstall 公式サイト]にある通り、バージョン2.3.5のRailsをインストールします。 <source lang="text"> # gem install rails -v 2.3.5 </source> === Docutils === Mercurialをインストールするための準備として、Docutilsをインストールします。 入手先 : http://docutils.sourceforge.net/ <source lang="text"> $ tar zxvf docutils-0.7 $ cd docutils-0.7 # ./setup.py install </source> Pythonはインストール済みとします。 === Mercurial === 入手先 : http://mercurial.selenic.com/ <source lang="text"> $ tar zxvf mercurial-1.7.3.tar.gz $ cd mercurial-1.7.3 $ make all # make install </source> === Redmine === 入手先 : http://www.redmine.org/ <source lang="text"> $ tar zxvf redmine-1.1.0.tar.gz # gem install -v=0.4.2 i18n # mv redmine-1.1.0 /var/lib/redmine # cd /var/lib/redmine/ # rake generate_session_store </source> i18nはrakeに必要なためインストールします。 === Passenger === Passengerをインストールします。 <source lang="text"> # gem install passenger </source> Apache用モジュールをインストールします。 <source lang="text"> # export APXS2=/usr/local/apache2/bin/apxs # export PATH=/usr/local/apache2/bin:$PATH # passenger-install-apache2-module </source> 「Please edit your Apache configuration file, and add these lines:」の次の3行を控えて置きます。後に「httpd.conf」の設定で必要になります。 <source lang="text"> The Apache 2 module was successfully installed. Please edit your Apache configuration file, and add these lines: LoadModule passenger_module /usr/local/lib/ruby/gems/1.8/gems/passenger-3.0.2/ext/apache2/mod_passenger.so PassengerRoot /usr/local/lib/ruby/gems/1.8/gems/passenger-3.0.2 PassengerRuby /usr/local/bin/ruby After you restart Apache, you are ready to deploy any number of Ruby on Rails applications on Apache, without any further Ruby on Rails-specific configuration! Press ENTER to continue. </source> === MySQL用のデータベースアクセスライブラリ === MySQL用のデータベースアクセスライブラリをインストールします。 <source lang="text"> # gem install mysql -- --with-mysql-lib=/usr/local/lib/mysql/ </source> インストール中に「No definition for ...」から始まる行がいくつか出力されます。 「ld.so.conf」に「/usr/local/lib/mysql/」を追加します。 <source lang="text"> # vim /etc/ld.so.conf </source> 共有ライブラリを再認識させます。 <source lang="text"> # /sbin/ldconfig </source> == 設定 == === MySQL === ユーザ「mysql」を作成し、DBを初期化します。 <source lang="text"> # /usr/sbin/useradd mysql # /usr/local/bin/mysql_install_db --user=mysql </source> DBを起動し、rootのパスワードを設定します。 <source lang="text"> # /usr/local/bin/mysqld_safe --user=mysql & # /usr/local/bin/mysqladmin -u root password <password> </source> Redmineでアクセスするためのユーザ(redmine)を作成し、DBを作成します。 <source lang="text"> # mysql -u root -p </source> <source lang="sql"> mysql> grant all privileges on *.* to redmine@localhost identified by '<パスワード>' with grant option; mysql> create database redmine default character set utf8; </source> RedmineのDB接続設定を行います。 <source lang="text"> $ cd /var/lib/redmine/config/ $ cp database.yml.example database.yml $ vim database.yml </source> productionのセクションの「username:」に先ほど作成したユーザ名、「password:」にDBパスワードを追記します。 <source lang="text"> production: adapter: mysql database: redmine host: localhost username: redmine password: <パスワード> encoding: utf8 </source> DBを初期化します。 <source lang="text"> # rake db:migrate RAILS_ENV=production </source> 本コマンドで、以下のメッセージが表示される場合は、共有ライブラリの設定が不十分かもしれません。 <source lang="text"> (in /var/lib/redmine) rake aborted! Object is not missing constant Issue! (See full trace by running task with --trace) </source> 標準のワークフローを導入します。 <source lang="text"> # rake redmine:load_default_data RAILS_ENV=production </source> 「Select language:」と表示されたら「ja」を入力します。 === Apache === 「/usr/local/apache2/conf/httpd.conf」を編集します。 DocumentRootを以下に変更します。 <source lang="text"> # DocumentRoot "/usr/local/apache2/htdocs" DocumentRoot "/var/lib/redmine/public" </source> 以下を追記します。 <source lang="text"> <Directory "/var/lib/redmine/public"> Options Indexes FollowSymLinks AllowOverride None Order allow,deny Allow from all </Directory> LoadModule passenger_module /usr/local/lib/ruby/gems/1.8/gems/passenger-3.0.2/ext/apache2/mod_passenger.so PassengerRoot /usr/local/lib/ruby/gems/1.8/gems/passenger-3.0.2 PassengerRuby /usr/local/bin/ruby </source> 下の3行は、「passenger-install-apache2-module」の出力結果を必ず貼り付けてください。 == 起動 == === MySQL === # /usr/local/bin/mysqld_safe --user=mysql & === Apache === # /usr/local/apache2/bin/apachectl start Apache起動後、Redmine初期画面は以下のようになります。 [[ファイル:Redmine install.png|600px]] [http://blog.redmine.jp/articles/farend-basic-theme/ farend basic]というテーマを使用しています。 == 参考 == * 入門Redmine 第2版 Linux/Windows対応 / 前田 剛 * http://redmine.jp/tech_note/apache-passenger/ - Apache上でRuby on Railsアプリケーションを動かす/Passenger(mod_rails for Apache)の利用 == 更新履歴 == * ページ作成 -- 2011年1月23日 (日) 16:35 (JST)
Redmineの導入手順
に戻る。
ナビゲーション メニュー
個人用ツール
ログイン
名前空間
ページ
議論
日本語
表示
閲覧
ソースを閲覧
履歴表示
その他
検索
案内
メインページ
導入手順
CMS
Tips
仮想化
Java
ソフトウェア開発
その他
最近の更新
ツール
リンク元
関連ページの更新状況
特別ページ
ページ情報