<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Oh!HappyBlog@VPS &#187; Redmine</title>
	<atom:link href="http://ohhappy.org/blog/tag/redmine/feed" rel="self" type="application/rss+xml" />
	<link>http://ohhappy.org</link>
	<description>さくらのVPSでWordPressブログはじめました</description>
	<lastBuildDate>Mon, 23 Jan 2012 20:35:50 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Ubuntu11.10にインストールしたRedmine1.2.1をApache2 + Passengerで動かす</title>
		<link>http://ohhappy.org/blog/linux/412.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=ubuntu11-10%25e3%2581%25ab%25e3%2582%25a4%25e3%2583%25b3%25e3%2582%25b9%25e3%2583%2588%25e3%2583%25bc%25e3%2583%25ab%25e3%2581%2597%25e3%2581%259fredmine1-2-1%25e3%2582%2592apache2-passenger%25e3%2581%25a7%25e5%258b%2595%25e3%2581%258b%25e3%2581%2599</link>
		<comments>http://ohhappy.org/blog/linux/412.html#comments</comments>
		<pubDate>Mon, 17 Oct 2011 20:57:36 +0000</pubDate>
		<dc:creator>ohhappy</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Passenger]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Redmine]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://ohhappy.org/?p=412</guid>
		<description><![CDATA[Ubuntu11.10にインストールした 「Ruby on Railsで記述された、オープンソース(GPL)のプロジェクト管理ソフトウェア」である「Redmine1.2.1 」をApache2 + Passenger（R [...]]]></description>
			<content:encoded><![CDATA[<p>
Ubuntu11.10にインストールした 「Ruby on Railsで記述された、オープンソース(GPL)のプロジェクト管理ソフトウェア」である「<a href="http://redmine.jp/redmine_today/2011/07/13/redmine-1_2_1-released/" target="_blank">Redmine1.2.1</a> 」をApache2 + Passenger（Railsアプリケーションを実行するためのApacheモジュール）で動かしてみました。</p>

<h3>事前準備</h3>
<ul>
	<li>「g++」と「apache2-threaded-dev」をインストールしました。
<pre>
$ sudo apt-get install g++ apache2-threaded-dev
</pre>


</li>
</ul>


<h3>Passengerのインストール</h3>
<ul>
	<li>gemで、passengerをインストールしました。
<pre>
$ sudo gem install passenger
</pre>


</li>
<li>続いて、gemで、passengerのapache2-moduleをインストールしました。
<pre>
$ sudo passenger-install-apache2-module
:
 * To install Curl development headers with SSL support:
   Please run apt-get install libcurl4-openssl-dev or libcurl4-gnutls-dev, whichever you prefer.
:
$ sudo apt-get install libcurl4-openssl-dev
$ sudo passenger-install-apache2-module
The Apache 2 module was successfully installed.
Please edit your Apache configuration file, and add these lines:

   LoadModule passenger_module /var/lib/gems/1.8/gems/passenger-3.0.9/ext/apache2/mod_passenger.so
   PassengerRoot /var/lib/gems/1.8/gems/passenger-3.0.9
   PassengerRuby /usr/bin/ruby1.8

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 contin
$
</pre>


</li>

<li>以上でPassengerのインストールは、終了しました。</li>
</ul>

<h3>RedmineをApache2 + Passengerで動かす設定</h3>
<ul>
	<li>/etc/hostsをエディタ（nano）で編集し、以下の内容を追加しました。
<pre>
$ sudo nano /etc/hosts
</pre>


</li>
<li>【 /etc/hostsの内容 】
<pre>
127.0.1.1       ubuntu.redmine.local
</pre>


</li>
	<li>下記コマンドを実行して、ネットワークを再起動しました。
<pre>
$ sudo /etc/init.d/networking restart
</pre>


</li>
	<li>/etc/apache2/apache2.confをエディタで編集し以下の内容を追加しました。
<pre>
$ sudo nano /etc/apache2/apache2.conf
</pre>


</li>
	<li>【 /etc/apache2/apache2.confへの追加内容 】
<pre>
# passenger
LoadModule passenger_module /var/lib/gems/1.8/gems/passenger-3.0.9/ext/apache2/mod_passenger.so
PassengerRoot /var/lib/gems/1.8/gems/passenger-3.0.9
PassengerRuby /usr/bin/ruby1.8

&lt;VirtualHost *:80&gt;
     ServerName ubuntu.redmine.local
     DocumentRoot /home/ohhappy/RailsProjects/redmine/public
     &lt;Directory /&gt;
     Options FollowSymlinks
     AllowOverride None
     Order deny,allow
     &lt;/Directory&gt;
&lt;/VirtualHost&gt;
</pre>


</li>
	<li>以下のコマンドを実行し、apache2を再起動しました。
<pre>
$ sudo service apache2 restart
</pre>


</li>
<li>ブラウザで「http://ubuntu.redmine.local/」にアクセスし、Redmineが正常に動作することを確認しました。<br />
<a href="http://ohhappy.org/wp-content/uploads/2011/10/redmine-passenger.png"><img src="http://ohhappy.org/wp-content/uploads/2011/10/redmine-passenger-300x207.png" alt="" title="redmine-passenger" width="300" height="207" class="alignnone size-medium wp-image-418" /></a>
</li>
</ul>
<hr size=1>
<iframe src="http://rcm-jp.amazon.co.jp/e/cm?t=ohhappy0b-22&#038;o=9&#038;p=8&#038;l=as1&#038;asins=4844327305&#038;ref=tf_til&#038;fc1=000000&#038;IS2=1&#038;lt1=_blank&#038;m=amazon&#038;lc1=0000FF&#038;bc1=000000&#038;bg1=FFFFFF&#038;f=ifr" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
<hr size=1>]]></content:encoded>
			<wfw:commentRss>http://ohhappy.org/blog/linux/412.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu11.10にRedmine 1.2.1をインストール</title>
		<link>http://ohhappy.org/blog/linux/396.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=ubuntu11-10%25e3%2581%25abredmine-1-2-1%25e3%2582%2592%25e3%2582%25a4%25e3%2583%25b3%25e3%2582%25b9%25e3%2583%2588%25e3%2583%25bc%25e3%2583%25ab</link>
		<comments>http://ohhappy.org/blog/linux/396.html#comments</comments>
		<pubDate>Mon, 17 Oct 2011 11:58:54 +0000</pubDate>
		<dc:creator>ohhappy</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Redmine]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://ohhappy.org/?p=396</guid>
		<description><![CDATA[Ubuntu11.10では、Ubuntuソフトウェアーセンターからオープンソース(GPL)のプロジェクト管理ソフトウェアであるRedmine（バージョン1.1.3-4）が簡単にインストール出来るみたいですが、2011年7 [...]]]></description>
			<content:encoded><![CDATA[<p>
Ubuntu11.10では、Ubuntuソフトウェアーセンターからオープンソース(GPL)のプロジェクト管理ソフトウェアである<a href="http://redmine.jp/overview/" target="_blank">Redmine</a>（バージョン1.1.3-4）が簡単にインストール出来るみたいですが、2011年7月11日にRedmine 1.2.1がリリースされているようなので、最新のRedmine1.2.1をUbuntu11.10にインストールしてみました。
</p>
<h3>関連記事</h3>
<ul>
	<li><a href="http://ohhappy.org/blog/linux/337.html">Ubuntu11.10でtaskselを使用して一発でLAMP環境を構築する</a></li>
</ul>
<p>
「<a href="http://redmine.jp/redmine_today/2011/06/01/redmine-1_2_0-released/" target="_blank">Redmine.JP |  Redmine 1.2.0 リリース </a>」によると「Redmine 1.2.0より、Rails 2.3.11が必要です。」とのことですので、RubyGems(gem)を使用してRails 2.3.11をインストールしてRedmineの実行環境を整えることにしました。
</p>
<h3>Rails2.3.11のインストール</h3>
<ul>
	<li>まず始めにapt-getコマンドを使用して、RubyGems(gem)をインストールしました。
<pre>
$ sudo apt-get install rubygems1.8
$ gem -v
1.7.2
$
</pre>


</li>
	<li>次いで、RubyGems(gem)を使用して、Rails 2.3.11をインストールしました。
<pre>
$ sudo gem install rails -v=2.3.11 --include-dependencies
$ gem list
*** LOCAL GEMS ***
actionmailer (2.3.11)
actionpack (2.3.11)
activerecord (2.3.11)
activeresource (2.3.11)
activesupport (2.3.11)
rack (1.1.2)
rails (2.3.11)
rake (0.9.2)
$
</pre>


</li>
	<li>インストールしただけでは、PATHが通っていないので、「.bashrc」に以下のように環境変数の設定を行いました。
<pre>
$ nano ~/.bashrc
</pre>


<h4>【「.bashrc」に追加した環境変数の設定】</h4>
<pre>
export GEM_HOME=/var/lib/gems/1.8/
export PATH=$PATH:/var/lib/gems/1.8/bin
export RUBYLIB=$RUBYLIB:/var/lib/gems/1.8/lib
</pre>


</li>
<li>「.bashrc」の設定を以下のコマンドで読み込みました。
<pre>
$ source ~/.bashrc
</pre>


</li>
</ul>
<h3>Sqlite3のインストール</h3>
<ul>
	<li>Redmineで使用するデータベースにSQLiteを使用したかったので、apt-getコマンドを使用してsqlite3(プログラム本体）をインストールした後に、RubyGems(gem)を使用して、sqlite3（アダプタ：sqlite3-rubyからaqlite3に名称が変更されていました）をインストールしました。
<pre>
$ sudo apt-get install sqlite3 libsqlite3-dev libsqlite3-ruby
$ sudo gem install sqlite3
$ gem list
*** LOCAL GEMS ***
actionmailer (2.3.11)
actionpack (2.3.11)
activerecord (2.3.11)
activeresource (2.3.11)
activesupport (2.3.11)
rack (1.1.2)
rails (2.3.11)
rake (0.9.2)
sqlite3 (1.3.4)
</pre>


</li>
</ul>
<p>
以上で「Rails 2.3.11」の実行環境が出来たので、「<a href="http://redmine.jp/redmine_today/2011/06/01/redmine-1_2_1-released/" target="_blank">Redmine1.2.1</a> 」をインストールしました。
</p>
<h3>Redmine（1.2.1）のインストール</h3>
<ul>
	<li>ホームフォルダ以下にRailsプロジェクト用のフォルダを作成し、<a href="http://redmine.jp/download/" target="_blank">Redmine.JPのダウンロードページ</a>より、ソースコード（redmine-1.2.1.tar.gz）をRailsプロジェクト用のフォルダにダウンロードして解凍しました。
<pre>
$ mkdir RailsProjects
$ cd RailsProjects/
$ wget http://rubyforge.org/frs/download.php/75097/redmine-1.2.1.tar.gz
$ tar zxvf redmine-1.2.1.tar.gz
</pre>


</li>
	<li>解凍して作成されたフォルダ名「 redmine-1.2.1 」を「 redmine 」に変更しました。
<pre>
$ mv redmine-1.2.1 redmine
</pre>


</li>
<li>「config/database.yml.example 」をコピーして、SQLite3を使用する場合の「config/database.yml 」（下記）を作成しました。
<pre>
$ cd ./redmine/
$ cp ./config/database.yml.example ./config/database.yml
$ nano ./config/database.yml
</pre>


<h4>【「database.yml」の内容】</h4>
<pre>
production:
  adapter: sqlite3
  dbfile: db/redmine.db
  timeout: 5000
</pre>


 </li>
</li>
<li>セッション暗号化用鍵を生成しました。
<pre>
$ rake generate_session_store
$ rake ./config/initializers/session_store.rb
 the i18n 0.4.2 gem. Please `gem install -v=0.4.2 i18n`
（エラーが出たので、指示に従い「 i18n」をインストールしました。）
$ sudo gem install -v=0.4.2 i18n
（セッション暗号化用鍵の作成を再TRY)
$ rake generate_session_store
$ rake config/initializers/session_store.rb
rake/rdoctask is deprecated.  Use rdoc/task instead (in RDoc 2.4.2+)
WARNING: 'task :t, arg, :needs => [deps]' is deprecated.  Please use 'task :t, [args] => [deps]' instead.
    at /home/ohhappy/RailsProjects/redmine/lib/tasks/email.rake:170
</pre>


(上記のWARNINGは、気にしなくて良いようです。）
</li>
<li>SQLite3データベースを初期化し、デフォルトデータの読み込みを行いました。
<pre>
$ 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.
</pre>


</li>
	<li>上記終了の後、WebRickサーバーを起動しました。
<pre>
$  ruby1.8 ./script/server -e production
=> Booting WEBrick
=> Rails 2.3.11 application starting on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
</pre>


</li>
	<li>ブラウザで「http://localhost:3000/」にアクセスするとRedmineの初期画面が無事に表示されました。
右上の「ログイン」をクリックし、ユーザー名：admin、パスワード：adminでログイン出来ました。<br />
<a href="http://ohhappy.org/wp-content/uploads/2011/10/redmmine.png"><img src="http://ohhappy.org/wp-content/uploads/2011/10/redmmine-300x273.png" alt="" title="redmmine" width="300" height="273" class="alignnone size-medium wp-image-403" /></a>
</li>
</ul>
<hr size=1>
<iframe src="http://rcm-jp.amazon.co.jp/e/cm?t=ohhappy0b-22&#038;o=9&#038;p=8&#038;l=as1&#038;asins=4798121622&#038;ref=tf_til&#038;fc1=000000&#038;IS2=1&#038;lt1=_blank&#038;m=amazon&#038;lc1=0000FF&#038;bc1=000000&#038;bg1=FFFFFF&#038;f=ifr" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
<hr size=1>]]></content:encoded>
			<wfw:commentRss>http://ohhappy.org/blog/linux/396.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

