ラベル プロジェクト管理 の投稿を表示しています。 すべての投稿を表示
ラベル プロジェクト管理 の投稿を表示しています。 すべての投稿を表示

2014年10月30日木曜日

Redmine 2.6.0へアップグレード

redmine 2.5.3を2.6.0へアップグレード(tarボール版)

不満のあったPDFエクスポートが改善されたようなので2.6へアップしてみました。
でも2.6.1がすぐリリースされそうな予感ですが・・・

手順は以前アップグレードした時と同じです。

OS:CentOS 6.4
DB:PostgreSQL9.2.3
redmine:/home/redmine/public_html/
※プラグインは一切に使用していない

ruby:1.9.3p392
gem:1.8.23

●現在のGemList

# gem list --local

*** LOCAL GEMS ***

actionmailer (3.2.19, 3.2.17, 3.2.13)
actionpack (3.2.19, 3.2.17, 3.2.13)
activemodel (3.2.19, 3.2.17, 3.2.13)
activerecord (3.2.19, 3.2.17, 3.2.13)
activeresource (3.2.19, 3.2.17, 3.2.13)
activesupport (3.2.19, 3.2.17, 3.2.13)
arel (3.0.3, 3.0.2)
awesome_nested_set (2.1.6)
bigdecimal (1.1.0)
builder (3.0.0)
bundler (1.3.4)
capybara (2.1.0)
childprocess (0.5.3)
coderay (1.1.0, 1.0.9)
daemon_controller (1.1.2)
erubis (2.7.0)
fastthread (1.0.7)
ffi (1.9.3)
hike (1.2.3, 1.2.2, 1.2.1)
i18n (0.6.11, 0.6.9, 0.6.1)
io-console (0.3)
journey (1.0.4)
jquery-rails (2.0.3)
json (1.8.1, 1.8.0, 1.7.7, 1.5.5)
mail (2.5.4, 2.5.3)
metaclass (0.0.4)
mime-types (1.25.1, 1.23, 1.21)
mini_portile (0.5.3)
minitest (2.5.1)
mocha (1.0.0)
multi_json (1.10.1, 1.10.0, 1.7.7, 1.7.3, 1.7.2)
net-ldap (0.3.1)
nokogiri (1.6.1)
passenger (3.0.19)
pg (0.17.1, 0.15.1, 0.15.0)
polyglot (0.3.5, 0.3.4, 0.3.3)
rack (1.4.5)
rack-cache (1.2)
rack-openid (1.4.2, 1.3.1)
rack-ssl (1.3.4, 1.3.3)
rack-test (0.6.2)
rails (3.2.19, 3.2.17, 3.2.13)
railties (3.2.19, 3.2.17, 3.2.13)
rake (10.1.1, 10.1.0, 10.0.4, 0.9.2.2)
rdoc (3.12.2, 3.9.5)
redcarpet (2.3.0)
rmagick (2.13.3, 2.13.2)
ruby-openid (2.3.0, 2.1.8)
rubyzip (1.1.3)
selenium-webdriver (2.41.0)
shoulda (3.3.2)
shoulda-context (1.0.2)
shoulda-matchers (1.4.1)
sprockets (2.2.2)
thor (0.19.1, 0.18.1, 0.18.0)
tilt (1.4.1, 1.4.0, 1.3.6)
treetop (1.4.15, 1.4.14, 1.4.12)
tzinfo (0.3.42, 0.3.39, 0.3.37)
websocket (1.0.7)
xpath (2.0.0)
yard (0.8.7.4)


●DBバックアップ
dbname:redmine(-U でdbuser指定), dbuser:redmine, バックアップはredmineのソースディレクトリに保存(db_日付.dumpで作成)

# /usr/local/pgsql/bin/pg_dump -U redmine -Fc redmine > /home/redmine/public_html/db_`date +%Y%m%d`.dump

●redmineのバックアップと2.6.0用ディレクトリの作成
public_htmlをpublic_html_253でバックアップ

# mv /home/redmine/public_html /home/redmine/public_html_253
# mkdir /home/redmine/public_html
# chmod 775 /home/redmine/public_html

●redmine2.6.0のダウンロード
ソース解凍後に2.6.0用ディレクトリにソースを移動

# cd /usr/local/src/
# wget http://www.redmine.org/releases/redmine-2.6.0.tar.gz
# tar zxvf redmine-2.6.0.tar.gz
# mv ./redmine-2.6.0/* /home/redmine/public_html/

●設定ファイル等のコピー
追加したfarend_fancyというテーマも移行します。

# cd /home/redmine/public_html_253/
# cp ./config/database.yml /home/redmine/public_html/config/
# cp ./config/additional_environment.rb /home/redmine/public_html/config/
# cp -rf ./files/* /home/redmine/public_html/files/
# cp -r ./public/themes/farend_fancy /home/redmine/public_html/public/themes/

私はプラグインを使用していないため移行作業はありませんが移行するならば
# cp -r ./plugins/* /home/redmine/public_html/plugins/

ただし新バージョンでは動作しないことも考えられるためスムーズに移行できるとは限らない。redmine2.6に対応したバージョンがリリースされているか事前にチェックした方が良さそうです。

今はプラグインはここかな?
# mkdir ./public/plugin_assets

# cp -r /home/redmine/public_html_252/public/plugin_assets /home/redmine/public_html/public/plugin_assets

●依存Gem関連のインストール
redmineはGemの依存管理をBundlerが行っているためBundlerをインストールしておく

# gem install bundler

# cd /home/redmine/public_html
# bundle install --without development test mysql sqlite sqlserver
(ImageMagickがインストールされていない場合はオプションにrmagic付加すればよい)

Fetching gem metadata from https://rubygems.org/.........
Resolving dependencies...
Installing rake (10.3.2) 
Using i18n (0.6.11) 
Using multi_json (1.10.1) 
Using activesupport (3.2.19) 
Installing builder (3.0.4) 
Using activemodel (3.2.19) 
Using erubis (2.7.0) 
Using journey (1.0.4) 
Using rack (1.4.5) 
Using rack-cache (1.2) 
Using rack-test (0.6.2) 
Using hike (1.2.3) 
Using tilt (1.4.1) 
Using sprockets (2.2.2) 
Using actionpack (3.2.19) 
Using mime-types (1.25.1) 
Using polyglot (0.3.5) 
Using treetop (1.4.15) 
Using mail (2.5.4) 
Using actionmailer (3.2.19) 
Using arel (3.0.3) 
Using tzinfo (0.3.42) 
Using activerecord (3.2.19) 
Using activeresource (3.2.19) 
Using bundler (1.3.4) 
Using coderay (1.1.0) 
Using rack-ssl (1.3.4) 
Using json (1.8.1) 
Using rdoc (3.12.2) 
Using thor (0.19.1) 
Using railties (3.2.19) 
Installing jquery-rails (3.1.2) 
Using net-ldap (0.3.1) 
Using pg (0.17.1) 
Using ruby-openid (2.3.0) 
Using rack-openid (1.4.2) 
Using rails (3.2.19) 
Installing rbpdf (1.18.2) 
Using redcarpet (2.3.0) 
Installing request_store (1.0.5) 
Using rmagick (2.13.3) 


●仕上げ


# rake generate_secret_token

# rake db:migrate RAILS_ENV=production

==  AddPasswordChangedAtToUser: migrating =====================================
-- add_column(:users, :passwd_changed_on, :datetime)
   -> 0.0587s
==  AddPasswordChangedAtToUser: migrated (0.0588s) ============================

==  InsertBuiltinGroups: migrating ============================================
==  InsertBuiltinGroups: migrated (0.7091s) ===================================

# rake redmine:plugins:migrate RAILS_ENV=production
# rake tmp:cache:clear
# rake tmp:sessions:clear

# chown -R daemon:daemon /home/redmine/public_html
# /usr/local/apache/bin/apachectl restart

データベースに大きな変更は無いようですね。
usersにパスワード変更日のようなフィールドが追加されたぐらいですかね。


Redmineの管理>情報
Environment:
  Redmine version                2.6.0.stable
  Ruby version                   1.9.3-p392 (2013-02-22) [i686-linux]
  Rails version                  3.2.19
  Environment                    production
  Database adapter               PostgreSQL
SCM:
  Subversion                     1.6.11
  Git                            1.7.1
  Filesystem                     
Redmine plugins:
  no plugin installed

チケットの一覧をPDFで出力すると列幅が小さく見ずらい状態でしたが幅が広がり見やすくなりましたね。







2011年7月27日水曜日

CentOS5にRedmine1.2+PostgreSQL

Redmine1.2にて今まで悩み続けていたPDFの日本語文字化けがついに解消されました。

では早速

OS:CentOS5
Web:Apache2.2.19(ソースから) 尚、Railsの実行ではPassengerを使用
DB:PostgreSQL8.4.8(ソースから)
Ruby:Ruby Enterprise Edition
Rails:2.3.11
/home/redmine/public_htmlにRedmineを配置させます。

OSインストールは割愛させて頂きますが、私はインストール時のパッケージ選択ではbaseのみ選択しています。(5.3ですがよろしければこちらを参考にどうぞ)

●必要パッケージをインストール
# yum groupinstall "Development Tools"
# yum install openssl-devel readline-devel zlib-devel curl-devel zlib-devel

●Apacheのインストール(ソースからインストール)
細かい設定は省略します
# cd /usr/local/src
# wget http://archive.apache.org/dist/httpd/httpd-2.2.19.tar.gz
# tar zxvf httpd-2.2.19.tar.gz
# cd httpd-2.2.19
# ./configure --prefix=/usr/local/apache --enable-so --enable-mods-shared=all
# make;make install

# vi /usr/local/apache/conf/httpd.conf
 ServerAdmin 管理者メールアドレス
 ServerName localhost:80
 DocumentRoot "/home" ←後ほど変更します
 Include conf/extra/httpd-userdir.conf  ←コメント解除

自動起動
# vi /etc/rc.local
追記
/usr/local/apache/bin/apachectl start

・ApacheLogのローテーションは設定おきましょう(推奨)

●PostgreSQLのインストール(ソースからインストール)
8.4.3ですがよろしければこちらを参考にどうぞ(PL/pgsqlをインストールすること)
※DB名:redmine、ユーザ:redmine、パスワード:redmine

●Ruby 1.8.7
# cd /usr/local/src
# wget http://rubyenterpriseedition.googlecode.com/files/ruby-enterprise-1.8.7-2011.03.tar.gz
# tar zxvf ruby-enterprise-1.8.7-2011.03.tar.gz
# cd ./ruby-enterprise-1.8.7-2011.03
# ./installer --dont-install-useful-gems --no-dev-docs

※--dont-install-useful-gems → gemパッケージは後で手動インストールするのでここでは不要
※--no-dev-docs → 開発向けドキュメントは不要

Press Enter to continue, or Ctrl-C to abort. →Enterでインストールを進めます

[/opt/ruby-enterprise-1.8.7-2011.03] : /usr/local/ →インストール先の指定(推奨です)
・
・
make install
/usr/bin/install -c -m 0755 iconv.so /usr/local/lib/ruby/site_ruby/1.8/i686-linux
--------------------------------------------
Installing useful libraries...
/usr/local/bin/ruby /usr/local/bin/gem sources --update
source cache successfully updated
Updating /usr/local/bin/irb...
Updating /usr/local/bin/ri...
Updating /usr/local/bin/testrb...
Updating /usr/local/bin/erb...
Updating /usr/local/bin/gem...
Updating /usr/local/bin/rdoc...
--------------------------------------------
Ruby Enterprise Edition is successfully installed!
If want to use Phusion Passenger (http://www.modrails.com) in combination
with Ruby Enterprise Edition, then you must reinstall Phusion Passenger against
Ruby Enterprise Edition, as follows:
  /usr/local/bin/passenger-install-apache2-module
Make sure you don't forget to paste the Apache configuration directives that
the installer gives you.

If you ever want to uninstall Ruby Enterprise Edition, simply remove this
directory:
  /usr/local
If you have any questions, feel free to visit our website:
  http://www.rubyenterpriseedition.com
Enjoy Ruby Enterprise Edition, a product of Phusion (www.phusion.nl) :-)

こんな感じでインストールが終了します。

●Rubygems
バージョンチェック
# gem -v
1.5.2

※インストール先が/opt/ruby-enterprise-1.8.7-2011.03の場合は絶対パス(フルパス)で指定

●Rack 1.1.1のインストール
# gem install rack -v=1.1.1 --no-rdoc --no-ri
Fetching: rack-1.1.1.gem (100%)
Successfully installed rack-1.1.1
1 gem installed

●i18n 0.4.2のインストール
# gem install i18n -v=0.4.2 --no-rdoc --no-ri
Fetching: i18n-0.4.2.gem (100%)
Successfully installed i18n-0.4.2
1 gem installed

●pgのインストール
PostgreSQLへのパスは私の環境ですのでご自分のパスに読み替えてください。
# export PATH=$PATH:/usr/local/pgsql/bin
# gem install pg -- --with-pgsql-dir=/usr/local/pgsql/ --with-pgsql-lib=/usr/local/pgsql/lib/ --with-pgsql-include=/usr/local/pgsql/include/ --no-rdoc --no-ri
上記でインストールをするとWikiページをPDF等で出力する際、Internal Errorが発生することがわかりました。
# gem install pg -- --with-pg-dir=/usr/local/pgsql/ --with-pg-lib=/usr/local/pgsql/lib/ --with-pg-include=/usr/local/pgsql/include/ --no-rdoc --no-ri
Fetching: pg-0.11.0.gem (100%)
Building native extensions. This could take a while...
Successfully installed pg-0.11.0
1 gem installed
Installing ri documentation for pg-0.11.0...
Installing RDoc documentation for pg-0.11.0...

●postgres-prのインストール
# gem install postgres-pr --no-rdoc --no-ri
Fetching: postgres-pr-0.6.3.gem (100%)
Successfully installed postgres-pr-0.6.3
1 gem installed

●Rails 2.3.11のインストール
# gem install -v=2.3.11 rails

# gem list
*** LOCAL GEMS ***
actionmailer (2.3.11)
actionpack (2.3.11)
activerecord (2.3.11)
activeresource (2.3.11)
activesupport (2.3.11)
i18n (0.4.2)
pg (0.11.0)
postgres-pr (0.6.3)
rack (1.1.1)
rails (2.3.11)
rake (0.8.7)

Redmine1.2系はrake0.8.7が必要です。もしrakeが0.8.7ではない場合は別途インストールします。
# gem install rake -v=0.8.7 --no-rdoc --no-ri

●Redmineのインストール
# mkdir -p /home/redmine/public_html
# chmod -R 755 /home/redmine/public_html
# cd /home/redmine/public_html
 
開発版or安定版(私は開発版を使用しています)
 
v1.2開発版  # svn checkout http://redmine.rubyforge.org/svn/trunk/ ./
v1.2安定版  # svn checkout http://redmine.rubyforge.org/svn/branches/1.2-stable/ ./

# cp -p ./config/database.yml.example ./config/database.yml
# vi ./config/database.yml
production:
adapter: postgresql

 database: redmine ←postgresqlで作成したDB名
 host: localhost
 username: redmine ←DB接続ユーザ
 password: "redmine" ←DB接続ユーザパスワード

# cp -p ./config/configuration.yml.example ./config/configuration.yml
# vi ./config/configuration.yml
一番下にあるproduction:にメール情報を追記(以下はローカルからの発信な場合)
production:
   email_delivery: 

     delivery_method: :smtp
      smtp_settings:
         address: "localhost"
         port: 25

●初期設定
# cd /home/redmine/public_html/

# rake generate_session_store
(in /home/redmine/public_html)

# rake db:migrate RAILS_ENV="production"
(in /home/redmine/public_html)

# 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と入力

開発版の場合rake db:migrate RAILS_ENV="production"実行時、gem versionエラーが発生することがありますこの場合/config/environment.rbを書き換えます。(正しいかどうかわらないが回避できた)
RAILS_GEM_VERSION = '2.3.14' unless defined? RAILS_GEM_VERSION
 ↓
RAILS_GEM_VERSION = '2.3.11' unless defined? RAILS_GEM_VERSION

 
●Passengerのインストール
# gem install passenger --no-rdoc --no-ri
Fetching: fastthread-1.0.7.gem (100%)
Building native extensions. This could take a while...
Fetching: daemon_controller-0.2.6.gem (100%)
Fetching: passenger-3.0.7.gem (100%)
Successfully installed fastthread-1.0.7
Successfully installed daemon_controller-0.2.6
Successfully installed passenger-3.0.7
3 gems installed

●PassengerのApache用モジュールのインストール
Apacheをソースからインストールしたのでapxs2、path環境変数を設定する必要がある
# export APXS2=/usr/local/apache/bin/apxs
# export PATH=/usr/local/apache/bin:$PATH

# passenger-install-apache2-module
Welcome to the Phusion Passenger Apache 2 module installer, v3.0.7.
This installer will guide you through the entire installation process. It
shouldn't take more than 3 minutes in total.
Here's what you can expect from the installation process:

1. The Apache 2 module will be installed for you.
2. You'll learn how to configure Apache.
3. You'll learn how to deploy a Ruby on Rails application.

Don't worry if anything goes wrong. This installer will advise you on how to
solve any problems.

Press Enter to continue, or Ctrl-C to abort.
 
途中でnot foundが出たら解決して再度実行
・
・
・
以下をApache設定のため保存しておく
LoadModule passenger_module /usr/local/lib/ruby/gems/1.8/gems/passenger-3.0.7/ext/apache2/mod_passenger.so
PassengerRoot /usr/local/lib/ruby/gems/1.8/gems/passenger-3.0.7
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.

--------------------------------------------
Deploying a Ruby on Rails application: an example

Suppose you have a Rails application in /somewhere. Add a virtual host to your
Apache configuration file and set its DocumentRoot to /somewhere/public:


VirtualHostでの運用の場合は以下を参考に
 <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>


And that's it! You may also want to check the Users Guide for security and
optimization tips, troubleshooting and other useful information:

/usr/local/lib/ruby/gems/1.8/gems/passenger-3.0.7/doc/Users guide Apache.html

Enjoy Phusion Passenger, a product of Phusion (www.phusion.nl) :-)
http://www.modrails.com/

Phusion Passenger is a trademark of Hongli Lai & Ninh Bui.

●Apache用設定ファイルの新規作成
# vi /usr/local/apache/conf/extra/passnger.conf

#保存した行を記述
LoadModule passenger_module /usr/local/lib/ruby/gems/1.8/gems/passenger-3.0.7/ext/apache2/mod_passenger.so
PassengerRoot /usr/local/lib/ruby/gems/1.8/gems/passenger-3.0.7
PassengerRuby /usr/local/bin/ruby

#Passengerが追加するHTTPヘッダ削除を追記
Header always unset "X-Powered-By"
Header always unset "X-Rack-Cache"
Header always unset "X-Content-Digest"
Header always unset "X-Runtime"

#必要に応じてPassengerのチューニングのための設定を追加(任意)
※内容をまだ理解していないので私は適用しませんでした。
#PassengerMaxPoolSize 20
#PassengerMaxInstancesPerApp 4
#PassengerPoolIdleTime 3600
#PassengerUseGlobalQueue on
#PassengerHighPerformance on
#PassengerStatThrottleRate 10
#RailsSpawnMethod smart
#RailsAppSpawnerIdleTime 86400
#RailsFrameworkSpawnerIdleTime 0

以上でpassnger.confはおしまいですので保存します

httpd.confにpassnger.confを読み込ませる
# vi /usr/local/apache/conf/httpd.conf

最後にでも追記
Include conf/extra/passnger.conf
ついでにDocumentRootをRedmineとする(IPで接続できるように)
"/home" → "/home/redmine/public_html/public"
Apacheのユーザが書き込みできるように設定
# chown -R daemon:daemon /home/redmine
# /usr/local/apache/bin/apachectl restart

これでIPアドレスによる接続はできると思います
アクセスできない場合・・・selinuxOFF、iptablesで80ポート開放もチェックしてみよう



●Redmineログのローテーション
# cd /home/redmine/public_html
# cp ./config/additional_environment.rb.example ./config/additional_environment.rb
# vi ./config/additional_environment.rb
以下追記
#Logger.new(PATH,NUM_FILES_TO_ROTATE,FILE_SIZE)
config.logger = Logger.new(config.log_path, 2, 1000000)
config.logger.level = Logger::INFO

●Wikiで使えるHTML タグの追加
# vi ./lib/redcloth3.rb
一番下の方にALLOWED_TAGS = %w(redpre pre code notextile)という行がありこれに使いたいタグを追記していきます。私はFONTとBRを足しました。
ALLOWED_TAGS = %w(redpre pre code notextile)
 ↓
ALLOWED_TAGS = %w(redpre pre code notextile font br)

●テーマを追加
日本語環境でRedmineの画面を見やすくすることを目的としたRedmine用テーマ「farend basic」を使えるようにします。
# cd /usr/local/src/
# wget http://blog.redmine.jp/assets/2010/03/23/redmine_theme_farend_basic_20110523.tgz
# tar zxvf redmine_theme_farend_basic_20110523.tgz
# cp -R ./farend_basic /home/project/public/themes/
# apache再起動

Redmineの管理画面から「管理」>「設定」>「表示」→テーマをfarend_basicに変更します。
保存ボタンを押すのを忘れずに!
とりあえずここまでで本日はおしまい・・・

日本語ヘルプもできたみたいです。
http://www.redmine.org/projects/redmine/wiki/JaGuide

参考サイト
http://blog.redmine.jp/articles/redmine-1_2-installation_centos/
http://www.redmine.org/projects/redmine/wiki/JaRedmineInstall

2010年9月1日水曜日

Redmine1.0.1へアップデート(svn)

日本時間8/23にRedmine 1.0.1が正式リリースされました。
前回1.0.0 RCをインストールしたのでこれをアップデートします。(開発版です)

私がインストールした手順についてはこちらです。(CentOS+PostgreSQL)

データベースのバックアップ
# /usr/local/pgsql/bin/pg_dump -U [db username] -Fc --file=[backup filename] [dbname]

Redmineのインストールディレクトリへ移動
# cd /home/redmine/

SVN レポジトリからチェックアウト
# svn update
U test/unit/issue_status_test.rb

A test/unit/helpers/issue_moves_helper_test.rb
U test/unit/helpers/application_helper_test.rb
U test/unit/lib/redmine/menu_manager_test.rb
U test/unit/lib/redmine/scm/adapters/git_adapter_test.rb
U test/unit/lib/redmine/menu_manager/menu_item_test.rb
U test/unit/lib/redmine_test.rb
U test/unit/user_test.rb
U test/unit/query_test.rb
U test/unit/mailer_test.rb
U test/exemplars/attachment_exemplar.rb
U test/test_helper.rb
U test/functional/issues_controller_test.rb
A test/functional/auto_completes_controller_test.rb
A test/functional/context_menus_controller_test.rb
U test/functional/account_controller_test.rb
U test/functional/calendars_controller_test.rb
U test/functional/journals_controller_test.rb
U test/functional/gantts_controller_test.rb
U test/functional/users_controller_test.rb
A test/functional/issue_moves_controller_test.rb
A test/functional/activities_controller_test.rb
U test/functional/projects_controller_test.rb
A test/functional/files_controller_test.rb
A test/functional/previews_controller_test.rb
U test/functional/auth_sources_controller_test.rb
U test/functional/versions_controller_test.rb
U test/integration/issues_api_test.rb
U test/integration/routing_test.rb
U test/integration/issues_test.rb
A test/integration/layout_test.rb
U test/fixtures/enabled_modules.yml
U app/helpers/projects_helper.rb
A app/helpers/calendars_helper.rb
U app/helpers/issues_helper.rb
U app/helpers/queries_helper.rb
U app/helpers/journals_helper.rb
A app/helpers/issue_moves_helper.rb
U app/helpers/application_helper.rb
U app/models/change.rb
U app/models/query.rb
U app/models/member.rb
U app/models/mailer.rb
U app/models/user.rb
U app/models/issue_status.rb
U app/models/changeset.rb
U app/controllers/issues_controller.rb
A app/controllers/auto_completes_controller.rb
A app/controllers/context_menus_controller.rb
U app/controllers/journals_controller.rb
U app/controllers/timelog_controller.rb
U app/controllers/users_controller.rb
A app/controllers/issue_moves_controller.rb
A app/controllers/files_controller.rb
U app/controllers/application_controller.rb
A app/controllers/previews_controller.rb
U app/controllers/versions_controller.rb
U app/controllers/boards_controller.rb
U app/controllers/groups_controller.rb
U app/controllers/projects_controller.rb
U app/controllers/account_controller.rb
U app/controllers/calendars_controller.rb
U app/controllers/gantts_controller.rb
A app/controllers/activities_controller.rb
A app/views/auto_completes
A app/views/auto_completes/issues.html.erb
A app/views/context_menus
A app/views/context_menus/issues.html.erb
U app/views/welcome/index.rhtml
A app/views/journals/index.rxml
U app/views/layouts/base.rhtml
A app/views/issue_moves
A app/views/issue_moves/new.rhtml
U app/views/users/_memberships.rhtml
U app/views/users/show.rhtml
A app/views/files
A app/views/files/index.html.erb
A app/views/previews
A app/views/previews/issue.html.erb
U app/views/messages/show.rhtml
A app/views/versions/index.html.erb
U app/views/versions/show.rhtml
U app/views/boards/index.rhtml
U app/views/attachments/_form.rhtml
U app/views/news/_news.rhtml
U app/views/news/index.rhtml
U app/views/repositories/diff.rhtml
U app/views/admin/_menu.rhtml
U app/views/admin/projects.rhtml
D app/views/projects/activity.rhtml
D app/views/projects/list_files.rhtml
D app/views/projects/roadmap.rhtml
U app/views/projects/show.rhtml
U app/views/projects/_form.rhtml
A app/views/projects/_members_box.html.erb
U app/views/projects/index.rhtml
U app/views/calendars/show.html.erb
U app/views/gantts/show.html.erb
U app/views/wiki/special_date_index.rhtml
A app/views/activities
A app/views/activities/index.html.erb
D app/views/issues/changes.rxml
D app/views/issues/preview.html.erb
D app/views/issues/move.rhtml
D app/views/issues/context_menu.rhtml
D app/views/issues/auto_complete.html.erb
U app/views/issues/_relations.rhtml
U app/views/issues/_action_menu.rhtml
U app/views/issues/_history.rhtml
U app/views/issues/_form.rhtml
U app/views/issues/bulk_edit.rhtml
U app/views/issues/index.rhtml
U app/views/issues/_sidebar.rhtml
U app/views/issues/show.rhtml
U app/views/issues/_changesets.rhtml
U app/views/issues/_list_simple.rhtml
U app/views/issues/_edit.rhtml
U app/views/issues/new.rhtml
A db/migrate/20100819172912_enable_calendar_and_gantt_modules_where_appropriate.rb
U db/migrate/20100705164950_change_changes_path_length_limit.rb
U vendor/plugins/open_id_authentication/lib/open_id_authentication.rb
U config/settings.yml
D config/locales/sr-CY.yml
U config/locales/lt.yml
A config/locales/sr-YU.yml
U config/locales/ro.yml
U config/locales/lv.yml
U config/locales/zh.yml
U config/locales/pt.yml
U config/locales/ca.yml
U config/locales/pt-BR.yml
U config/locales/tr.yml
U config/locales/ru.yml
U config/locales/en-GB.yml
U config/locales/id.yml
U config/locales/el.yml
U config/locales/en.yml
U config/locales/gl.yml
U config/locales/cs.yml
U config/locales/es.yml
A config/locales/mk.yml
U config/locales/zh-TW.yml
U config/locales/eu.yml
U config/locales/ko.yml
U config/locales/mn.yml
U config/locales/it.yml
U config/locales/sk.yml
U config/locales/sl.yml
U config/locales/uk.yml
U config/locales/sr.yml
U config/locales/da.yml
U config/locales/sv.yml
U config/locales/de.yml
U config/locales/bg.yml
U config/locales/ja.yml
U config/locales/he.yml
U config/locales/fi.yml
U config/locales/bs.yml
U config/locales/fr.yml
U config/locales/nl.yml
U config/locales/hr.yml
U config/locales/pl.yml
U config/locales/th.yml
U config/locales/no.yml
U config/locales/hu.yml
U config/locales/vi.yml
U config/routes.rb
U doc/CHANGELOG
U lib/redmine/export/pdf.rb
U lib/redmine/scm/adapters/git_adapter.rb
U lib/redmine/version.rb
U lib/redmine/helpers/gantt.rb
U lib/redmine.rb
A lib/tasks/permissions.rake
U lib/tasks/yardoc.rake
A lib/tasks/ci.rake
U public/javascripts/jstoolbar/lang/jstoolbar-mk.js
A public/javascripts/jstoolbar/lang/jstoolbar-sr-yu.js
U public/javascripts/jstoolbar/lang/jstoolbar-it.js
U public/javascripts/jstoolbar/lang/jstoolbar-sr.js
D public/javascripts/calendar/lang/calendar-sr-CY.js
U public/javascripts/calendar/lang/calendar-mk.js
A public/javascripts/calendar/lang/calendar-sr-yu.js
U public/javascripts/calendar/lang/calendar-it.js
U public/javascripts/calendar/lang/calendar-sr.js
U public/javascripts/application.js
U public/stylesheets/calendar.css
A public/stylesheets/context_menu_rtl.css
A public/stylesheets/rtl.css
G public/stylesheets/application.css
Updated to revision 4051.

db:migrateの実行
# rake db:migrate RAILS_ENV="production"
(in /home/redmine)

== ChangeChangesPathLengthLimit: migrating ===================================
-- change_column(:changes, :path, :text, {:null=>true, :default=>nil})
-> 0.2495s
-- change_column(:changes, :path, :text, {:null=>false})
-> 0.0728s
-- change_column(:changes, :from_path, :text)
-> 0.0443s
== ChangeChangesPathLengthLimit: migrated (0.3670s) ==========================

== EnableCalendarAndGanttModulesWhereAppropriate: migrating ==================
== EnableCalendarAndGanttModulesWhereAppropriate: migrated (0.0298s) =========

プラグイン関連(0.8.xから継続してアップグレードしてきた場合)
# rake db:migrate:upgrade_plugin_migrations RAILS_ENV=production

ちなみに私は1.0.0 からですので実行する必要がないのですが、どうなるか行ってみたところ・・・旧バージョンに関するものがないので実行する必要なしと表示されました。
(in /home/redmine)

Cannot find old migration table - assuming nothing needs to be done

プラグイン関連
# rake db:migrate_plugins RAILS_ENV=production
(in /home/redmine)
Migrating engines...
Migrating acts_as_activity_provider...
Migrating acts_as_attachable...
Migrating acts_as_customizable...
Migrating acts_as_event...
Migrating acts_as_list...
Migrating acts_as_searchable...
Migrating acts_as_tree...
Migrating acts_as_versioned...
Migrating acts_as_watchable...
Migrating awesome_nested_set...
Migrating classic_pagination...
Migrating coderay-0.9.2...
Migrating gravatar...
Migrating open_id_authentication...
Migrating prepend_engine_views...
Migrating rfpdf...
Migrating ruby-net-ldap-0.0.4...
Migrating trunk...
 
Clean upの実行
# rake tmp:cache:clear
# rake tmp:sessions:clear
 
アプリケーションサーバの再起動(Apache)
# /usr/local/apache/bin/apachectl restart
 
 
完了です。
参照した本家のページ http://www.redmine.org/wiki/redmine/RedmineUpgrade

2010年7月21日水曜日

CentOS+Redmine+PostgreSQL

Redmine 1.0.0 release candidateがリリースされたのでインストールしてみました。
また、RORがApache上で稼働できるようPassengerをインストールしています。
※Apacheではバーチャルホストを利用して公開

●構成
CentOS 5.5
Apache 2.2.15 + Passenger(mod_rails)
PostgreSQL 8.4.3
Ruby 1.8.7-p299
RubyGems 1.3.7
Rails 2.3.5
Redmine Checked out revision 3858.

※私は、Apache, PostgreSQLをソースからインストールしていますがRPMでの構成でもいけると思います。(試していないので保障はできません)

●準備
OSのインストールは省略します。

開発ツール群やその他ライブラリが必要
# yum -y groupinstall "Development Tools"
# yum -y install openssl-devel readline-devel zlib-devel

※RPMでhttpd・postgresqlをインストールした方は、以下も必要かと・・・
# yum -y install httpd-devel postgresql-devel

●Rubyのインストール
# cd /usr/local/src/
# wget ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p299.tar.gz
# tar xzvf ruby-1.8.7-p299.tar.gz
# cd ruby-1.8.7-p299
# ./configure --prefix=/usr/local
# make
# make install
# ruby -v
1.8.7

●RubyGemsのインストール
# cd ../
# pwd
/usr/local/src
# wget http://rubyforge.org/frs/download.php/55066/rubygems-1.3.1.tgz
# tar xzvf rubygems-1.3.1.tgz
# cd rubygems-1.3.1
# ruby setup.rb
# gem -v
1.3.1

※以下db:migrateの時にわかるのですがRubyGems1.3.2以上が必要です。
私は、gem update --systemで最新版にしてしまいました。
# gem update --system
# gem -v
1.3.7

●Railsのインストール
# gem install rails -v=2.3.5
# gem install rake -v=0.8.3
# export PATH=$PATH:/usr/local/pgsql/bin/ ← PostgreSQL
# gem install postgres-pr
# gem install pg -- --with-pgsql-dir=/usr/local/pgsql

●Redmine
# mkdir /home/redmine
# cd /home/redmine
# svn checkout http://redmine.rubyforge.org/svn/trunk/ ./
# cp ./config/database.yml.example ./config/database.yml
# vi ./config/database.yml
事前に空データベースと運用ユーザを作成しておく(こちらを参照ください)

production:
 adapter: postgresql
 database: redmine
 host: localhost
 username: redmine
 password: "redmine"
 encoding: utf8
 schema_search_path: public

セッションストアの作成
# rake generate_session_store
※/home/redmine/config/initializers/session_store.rbが作成されます

# rake db:migrate RAILS_ENV=production
(in /home/redmine)
** Invoke db:migrate (first_time)

** Invoke environment (first_time)
** Execute environment
** Execute db:migrate
== Setup: migrating ==========================================================
-- create_table("attachments", {:force=>true})
-> 0.0519s
-- create_table("auth_sources", {:force=>true})
-> 0.0609s
-- create_table("custom_fields", {:force=>true})
-> 0.0806s
-- create_table("custom_fields_projects", {:force=>true, :id=>false})
-> 0.0020s
・
・
・

デフォルトデータ
# rake redmine:load_default_data RAILS_ENV="production"
Select language: bg, ca, cs, da, de, en, es, fi, fr, he, hu, it, ja, ko, lt, nl, no, pl, pt, pt-br, ro, ru, sk, sr, sv, th, tr, uk, vn, zh, zh-tw [en] ja ← 入力

●Passenger(mod_rails)のインストール
# gem install passenger
# export APXS2=/usr/local/apache/bin/apxs
# export PATH=/usr/local/apache/bin:$PATH
# passenger-install-apache2-module

ビルドに成功すると、Passengerを組み込むためのhttpd.confの設定が表示されるのでコピーしておく。
LoadModule passenger_module /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.15/ext/apache2/mod_passenger.so
PassengerRoot /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.15
PassengerRuby /usr/local/bin/ruby

次にvirtualhostの設定のサンプルが表示されるのでコピーしておく。

<VirtualHost *:80>
 ServerName www.yourhost.com
 DocumentRoot /somewhere/public
 <Directory "/home/somewhere/pubic">
  AllowOverride all
  Options -MultiViews
 </Directory>


</VirtualHost>


●Apacheの変更
# vi /usr/local/apache/conf/httpd.conf

末尾にでも追記する
LoadModule passenger_module /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.15/ext/apache2/mod_passenger.so
PassengerRoot /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.15
PassengerRuby /usr/local/bin/ruby

バーチャルホスト
# vi /usr/local/apache/conf/extra/httpd-vhosts.conf


<VirtualHost *:80>
 ServerName redmine.example.com
 DocumentRoot /home/redmine/public
 <Directory "/home/redmine/public">
  AllowOverride All
  Options -MultiViews
  Order allow,deny
  Allow from all
 </Directory>
</VirtualHost>


Apache運用ユーザがredmineディレクトリの読み書きができるようにパーミッションを設定する。
# cd /home/redmine
# mkdir tmp public/plugin_assets
mkdir: cannot create directory `tmp': File exists ← 既に存在している(無視)
mkdir: cannot create directory `public/plugin_assets': File exists ← 既に存在している(無視)
# chown -R daemon:daemon files log tmp public/plugin_assets config/environment.rb
# chmod -R 755 files log tmp public/plugin_assets
 
Apacheの再起動
# vi /usr/local/apache/bin/apachectl restart
 

http://redmine.example.comにアクセスしてみましょう。
初回はadmin/adminです。
 
参考サイト(本家)
 

2010年7月2日金曜日

BitNami::Redmine 0.9.5対応版

WindowsPCに簡単構築できるオールインワンタイプのRedmine、BitNami::RedmineがRedmine0.9.5に対応しています。
 
構築済VMware Virtual MachinesのUbuntuが10.04 版になっています。
 
構成
- Redmine 0.9.5
- Apache 2.2.14
- ImageMagick 6.5.8
- MySQL 5.1.30
- Subversion 1.6.6
- Ruby 1.8.7-p249
- Rails 2.3.5
- RubyGems 1.3.6

============= CHANGELOG =============
Version: 0.9.5-0 2010-06-30

* Update Remdine to 0.9.5

BITNAMIへはこちらからどうぞ。
  

2010年5月17日月曜日

BitNami::Redmine 0.9.4対応版

WindowsPCに簡単構築できるオールインワンタイプのRedmine、BitNami::RedmineがRedmine0.9.4に対応しています。
 
構成
- Redmine 0.9.4
- Apache 2.2.14
- ImageMagick 6.5.8
- MySQL 5.1.30
- Subversion 1.6.6
- Ruby 1.8.7-p249
- Rails 2.3.5
- RubyGems 1.3.6

============= CHANGELOG =============
Version: 0.9.4-0 2010-05-07
* Update Remdine to 0.9.4
 
* Replaced Ruby and gems with their mingw32 version in Windows.
* Fixed openssl binary (Windows)
* Removed some unnecessary files to reduce stack size
* Updated Ruby to 1.8.7-p249 (Linux, Windows)
* Downgraded Ruby to 1.8.7-p174 to avoid SEGFAULT errors (OS X)
* Updated Apache to 2.2.14
* Updated Git to 1.7.0.5 (Unix)
* Updated Git to 1.7.0.2 (Windows)
 
* Added gem mini_magick 1.2.5
* Updated gem passenger to 2.2.11
* Updated gem god to 0.9.0
* Updated gem thinking-sphinx to 1.3.16
* Updated gem memcache-client to 1.8.2
* Updated gem capistrano to 2.5.18
* Updated gem RedCloth to 4.2.3
* Updated gem bluecloth to 2.0.7
* Updated gem net-sftp to 2.0.4
* Updated gem net-ssh to 2.0.21
* Updated gem highline to 1.5.2
* Updated gem rubyforge to 2.0.4
* Updated gem json to 1.2.4
* Updated gem json_pure to 1.2.4
* Updated gem webrat to 0.7.0
* Updated gem nokogiri to 1.4.1
* Updated gem cucumber to 0.6.4
* Updated gem echoe to 4.3
* Updated gem rspec to 1.3.0
* Updated gem rspec-rails to 1.3.0
* Updated gem after_commit to 1.0.6
* Updated gem delayed_job to 2.0.3
* Updated gem thin to 1.2.7
* Updated gem riddle to 1.0.10

BITNAMIへはこちらからどうぞ。



 

2010年3月17日水曜日

BitNami::Redmine 0.9.3対応版

WindowsPCに簡単構築できるオールインワンタイプのRedmine、BitNami::RedmineがRedmine0.9.3に対応しています。
 
構築済VMware Virtual MachinesにUbuntu 9.10 版が追加された模様です。個人的にはCentOSにして欲しい・・・
 
構成
- Redmine 0.9.3
- Apache 2.2.14
- ImageMagick 6.5.8
- MySQL 5.1.30
- Subversion 1.6.6
- Ruby 1.8.7-2010.01
- Rails 2.3.5
- RubyGems 1.3.5

============= CHANGELOG =============
Version 0.9.3-0 1268222819
* Update Apache to 2.2.14
* Update Redmine to 0.9.3

BITNAMIへはこちらからどうぞ。
 

2010年2月8日月曜日

BitNami::Redmine 0.9.1対応版

WindowsPCに簡単構築できるオールインワンタイプのRedmine、BitNami::RedmineがRedmine0.9.1に対応しています。ですが、本家では0.9.2がリリースされたのですぐ対応するか?
※2010/02/12 0.9.2に対応されました。

構成
- Redmine 0.9.1
- Apache 2.2.13
- ImageMagick 6.5.8
- MySQL 5.1.30
- Subversion 1.6.6
- Ruby 1.8.7-2009.10
- Rails 2.3.5
- RubyGems 1.3.5

============= CHANGELOG =============
Version: 0.9.1-0 2010-02-02
* Updated Redmine to 0.9.1
* Fixed irb issue on OS X
* Fixed ImageMagick coders issue

BITNAMIへはこちらからどうぞ。
  

2009年12月7日月曜日

BitNami::Redmine 0.8.7対応版

WindowsやMac等に簡単構築できるオールインワンタイプのRedmine

BitNami::RedmineがRedmine0.8.7に対応したようですね。

BITNAMIへはこちらからどうぞ。

2009年11月24日火曜日

Redmine アップデート(0.8.6→0.8.7)

CentOS5.4 + PostgreSQL 8.2.5の環境でアップデート
※MySQL環境でも同じ手順でOKです

まずはインストール先へ移動
# cd /home/redmine

レポジトリからチェックアウト
# svn update
U test/unit/helpers/application_helper_test.rb
U test/functional/timelog_controller_test.rb
U test/integration/admin_test.rb
U test/integration/account_test.rb
U app/controllers/timelog_controller.rb
U app/controllers/application.rb
U app/controllers/account_controller.rb
U app/views/wiki/export_multiple.rhtml
U app/views/wiki/export.rhtml
U config/initializers
U config/environments/test.rb
U config/environments/test_sqlite3.rb
U config/environments/test_pgsql.rb
U doc/INSTALL
U doc/CHANGELOG
U lib/redmine/version.rb
A lib/tasks/initializers.rake
U lib/redcloth3.rb
U public/themes/alternate/stylesheets/application.css
Updated to revision 3085.

マイグレーション
# rake db:migrate RAILS_ENV="production"
(in /home/redmine)
rake aborted!
Missing session secret. Please run 'rake config/initializers/session_store.rb' to generate one

(See full trace by running task with --trace)

あれ?失敗した模様・・・なにやらsession_store.rbを実行?
先にこれを実行するんですね。
# rake config/initializers/session_store.rb
(in /home/redmine)

再度マイグレーション
# rake db:migrate RAILS_ENV="production"
(in /home/redmine)

今度は大丈夫みたい

情報が以下のように変わりました。
Redmine 0.8.7.stable.3085 (PostgreSQL)
 

2009年11月13日金曜日

BitNami::Redmine 0.8.6対応版

WindowsPCに簡単構築できるオールインワンタイプのRedmine
BitNami::RedmineがRedmine0.8.6に対応したようですね。

Windows版はもちろんのことLinuxやMac用のインストーラもありますが、VMWare等で使用するVMDK形式の仮想マシンまで用意されておりOSはOpenSUSE 11.1で構成されているようです。

BITNAMIへはこちらからどうぞ。
 

2009年11月10日火曜日

Redmine アップデート(0.8.3→0.8.6)

Redmine 0.8.6がリリースされてました。
当環境ではSubversionリポジトリからのチェックアウトしているので、Subversionリポジトリから更新します。(CentOSに構築した手順はこちらです)

まずredmineのソースが配置されているディレクトリに移動します。(当環境では/home/redmine)
#cd /home/redmine/

svnコマンドで更新ファイルを取得
# svn update
U test/unit/helpers/application_helper_test.rb
U test/unit/mail_handler_test.rb
U test/unit/query_test.rb
U test/functional/issues_controller_test.rb
U test/functional/news_controller_test.rb
U test/functional/account_controller_test.rb
U test/functional/projects_controller_test.rb
A test/fixtures/mail_handler/ticket_with_spaces_between_attribute_and_separator.eml
U test/fixtures/journals.yml
U test/fixtures/users.yml
U test/fixtures/attachments.yml
U app/helpers/application_helper.rb
U app/models/mail_handler.rb
U app/models/query.rb
U app/models/changeset.rb
G app/controllers/issues_controller.rb
U app/controllers/timelog_controller.rb
U app/controllers/messages_controller.rb
U app/controllers/news_controller.rb
U app/controllers/account_controller.rb
U app/controllers/wiki_controller.rb
U app/views/journals/_notes_form.rhtml
U app/views/users/_memberships.rhtml
U app/views/versions/show.rhtml

データベースのマイグレーション(テーブル作成)
# rake db:migrate RAILS_ENV="production"
(in /home/redmine)

キャッシュのクリア
# rake tmp:cache:clear
(in /home/redmine)

セッションのクリア
# rake tmp:sessions:clear
(in /home/redmine)

Apacheを再起動

Redmineにログインして「管理」>「情報」を開きます。
Redmine 0.8.6.stable.3023 (MySQL)となりました。
※DBにPostgreSQLが使用されているときはRedmine 0.8.6.stable.3023 (PostgreSQL)となる。
 

2009年9月30日水曜日

BitNami::Redmine 0.8.5対応版

以前プロジェクト管理で紹介したWindowsPCにも構築できるオールインワンタイプのBitNami::RedmineがRedmine0.8.5に対応したようですね。

こちらからどうぞ。
 

2009年5月26日火曜日

BitNami::Redmine 0.8.4対応版

プロジェクト管理のRedmineが0.8.4にアップされていますが
BitnamiでもRedmine 0.8.4対応版がリリースされさらにMySQlも5.1系に変わりました。
パッケージ構成は以下の通り。

- Redmine 0.8.4
- Apache 2.2.11
- ImageMagick 6.4.7
- MySQL 5.1.30
- Subversion 1.4.6
- Ruby 1.8.6
- Rails 2.1.1
- RubyGems 1.2.0

ダウンロードはこちらからどうぞ。
もしかしたら、旧バージョンのまま上書きインストールはできない??
0.8.3版が稼働中のマシンにインストールしようとすると「インストール先が空でない」と怒られてしまいました。
 
アップグレードできた方がいらっしゃったらお知せください・・・
ちなみに私は初回インストール時Cドライブ直下にRedmineというディレクトリを作成して
そこにインストールしました。
 

2009年5月18日月曜日

プロジェクト管理 オールインワンタイプ

自社ではプロジェクト管理にTrac(Trac Lightning)を利用しています。
Freeでここまでのものが提供されるなんて大変嬉しいことです。

※Trac Lightning
 Windows上にApacheやsubversionなど必要なソフトを一括インストールしてくれる優れもの!
 
非常に便利なTracですが、やや不便に感じてしまうことがあります。(Tracに文句を言うつもりはないが・・・)
●インターフェースがプロジェクト単位で別となる
 開発者が複数のプロジェクトに参加している場合、開発者はそれぞれのプロジェクトにログインして
 状況を確認しなければならず、「あれ!○○プロジェクトのこの部分はいつまでだっけ?」など
 開発者が(自分の)全体を把握しずらい。管理者としても同様なことが言える。

●ワークフローやや非力
 ワークフローをカスタマイズできて便利ではあるが、
 要件定義書・仕様書・開発・テスト・リリース後のバグ報告など様々な業務がありそれぞれ
 ワークフローが事実上異なる。
 ワークフローを色々定義することができず、運用でカバーしなければならない。
 
そんなこんなで何かいいものはないかと、探してみると「Redmine」というものが・・・
上記1、2の問題をクリアしていて、尚且つTrac同様プロジェクト管理に必要なものが一通り用意されている。
 
Trac同様にWebベースで運用できるがRuby on Railsで動作する。(Tracはpython)
データベースもMySQLやPostgreSQLなど色々と選択できる。
Windows版もあり誰でも簡単にできそうです。ただし、事前にRuby on Railsを構築しておく必要がありますが・・・

私はCentOSにソースからApache,Ruby,Rubygems等をインストールしてRuby on Railsを構築しDBにMySQLを使用しました。構築手順はこちら。
 
しかし、Trac Lightningのように必要なソフトすべてがパッケージ化され簡単に構築できるのもがありました。
それは「BitNami」というところから公開されていて、様々なオープンソースソフトをインストーラー形式にまとめ、パッケージ化されていてます。
しかもWindows以外にもLinux,Mac,Solaris版も提供されておりかなり親切です。
さっそくWindowsServer2003にRedmineをインストールしてみたいと思います。
(Windowsは2000,2003,XP,Vistaにインストールできるようです)
ただし、条件としてメモリは512MB以上でHDに400MB以上の空スペースが必要です。
※既に80ポートを使用したアプリケーションが稼動している場合は別のポートを指定するよう促されます。
 
1.パッケージのダウンロード
 http://bitnami.org/にアクセスしてDownloads>Redmineと進みWindows版を指定します。


2.インストール
 exeを実行してインストールを開始します。

 
インストール先は必要に応じて変えてください。
※64BitOSはデフォルトでC:\Program Files (x86)\BitNami Redmine Stackですが
この場所ではうまく動作しませんでした。

 
Redmineでの管理者ユーザを作成します。
※パスワードは6文字以上が必要でLoginとPasswordが同じだと怒られます。

 
デフォルト言語を日本語に設定しメール機能を使う場合はSMTPサーバをyesにします。

 
SMTP情報を設定します。

 
インストールの準備ができました。

 
インストールが完了するとようこそ画面が表示されますので
「Access BitNami Redmine Stack」をクリックしてみましょう。

 

 
CentOSにApache,Ruby,Rubygems等をコツコツインストールして半日かけて構築したのに、たった数分で完了してしまった。あっけない・・・
Trac Lightning同様にクイックインストール・ワンクリックインストール(実際はワンクリックではないが・・・)と言えるすばらしいパッケージですね。
しかも、サービスにも登録され自動起動となるためインストール完了と同時にRedmineが使えます。
 
インストールされたものは
- Redmine 0.8.3
- Apache 2.2.11
- ImageMagick 6.4.0-2-Q8
- MySQL 5.0.51b
- Subversion 1.4.6
- Ruby 1.8.6
- Rails 2.1.1
- RubyGems 1.2.0
 
これですぐに使えるようになりましたが、運用前にちょっと環境を整えましょう。(RedMine.JPおすすめ設定より)
 
●Redmineヘルプの日本語化
Install Directory Path/apps/redmine/lib/redmine/info.rb
(C:\Program Files\BitNami Redmine Stack\apps\redmine\lib\redmine\info.rb)

# def help_url; に続くURLをhttp://redmine.jp/guide/に変更する。
module Redmine
 module Info
  class << self
   def app_name; 'Redmine' end
   def url; 'http://www.redmine.org/' end
   #def help_url; 'http://www.redmine.org/guide' end ← コメント化または消去
   def help_url; 'http://redmine.jp/guide/' end ← 追記
   def versioned_name; "#{app_name} #{Redmine::VERSION}" end
  end
 end
end
 
●Wikiヘルプの日本語化(RedMine.JPおすすめ設定より)
Redmine.JPからファイルをダウンロードする。
http://redmine.jp/files/wiki_syntax_ja/wiki_syntax_ja.tar.gz
解凍したファイルを以下のhelpディレクトリに上書きコピーする。
Install Directory Path/apps/redmine/public/help/
(C:\Program Files\BitNami Redmine Stack\apps\redmine\public\help\)
 
●Web設定
管理者でログインします。

・画面右上部のMy account
 
  Languageを「Japanese(日本語)」に変更する。
  タイムゾーンを「(GMT+09:00)Tokyo」に変更する。
  ※保存ボタンを忘れずに押して更新してください。
 
・左上部の管理>設定

 全般タブ
  既定の言語:Japanese(日本語)
  ホスト名:ホスト名(送信されるメール中のURLで使用される)

 プロジェクトタブ
  プロジェクト識別子を連番で生成する:チェックON(お好みに応じて)

 メール通知タブ
  送信元メールアドレス:Redmineからメールを送信する際のFromアドレス

 レポジトリタブ
  レポジトリのエンコーディング:utf-8,shift_jis,euc-jp
  ※リポジトリブラウザでutf-8以外で記述されたソースコードを正しく表示する。
 
●PDF日本語文字化け対策
インストールディレクトリ\apps\redmine\lang\ja.ymlを編集します。
ただし、このファイルはUTF-8で書かれていますのでメモ帳では編集しないこと!
秀丸等のエディタを使用します。
 
54行目にgeneral_pdf_encoding: UTF-8という項目がありますので
UTF-8 → SJISを書き変えます。
書き換え後はApacheの再起動をします。
 

Redmine CentOSにインストール

2010/07/20 CentOS5.5+PostgreSQL8.4.3+Redmine1.0RCをアップしました。

Redmine+MySQLをCentOS上に構築したいと思います。
SCMは、Subversion以外にDarcs、Mercurial、Cvs、Bazaar、Gitに対応していますので
お好みのものを使うとよいでしょう。
 
インストール方法はRedmine.JPで公開されている情報を参考にしました。こちら

●MySQL(面倒なのでyumを使いRPM版を入れちゃいます)
インストールはroot権限で行います。

# yum install mysql mysql-server mysql-devel
# cp -p /usr/share/doc/mysql-server-4.1.22/my-medium.cnf /etc/my.cnf
# /etc/rc.d/init.d/mysqld start
# chkconfig mysqld on #自動起動ON

MySQLの初期設定とユーザの追加(ここではユーザにredmimeそして権限をフルにしちゃいます)
# mysql -u root
$ mysql> SET PASSWORD FOR root@localhost=PASSWORD('new_password');
$ mysql> DELETE FROM user WHERE password='';
$ mysql> GRANT ALL ON *.* TO redmine@"localhost"IDENTIFIED BY "redmineuser_password";
$ mysql> exit

Redmine用データベースの作成(unicodeにする)
# mysql -u redmine -p
$ mysql> CREATE DATABASE redmine DEFAULT CHARACTER SET utf8;
$ mysql> exit

●ruby on Railsの構築
インストールするRedmineは0.8.xなのでRubyは1.8.6 or 1.8.7 Railsは2.1.2となります。
# cd /usr/local/src/
# wget ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p160.tar.gz
# tar xzvf ruby-1.8.7-p160.tar.gz
# cd ruby-1.8.7-p160
# ./configure --prefix=/usr/local
# make
# make install
# ruby -v
ruby 1.8.7 (2009-04-08 patchlevel 160) [i686-linux]

# wget http://rubyforge.org/frs/download.php/45905/rubygems-1.3.1.tgz
# tar xzvf rubygems-1.3.1.tgz
# cd rubygems-1.3.1
# ruby setup.rb
# gem -v
1.3.1

# gem update --system (rubygemsが最新版に更新される。1.3.3になった)
# gem install rails --include-dependencies
# gem install rails -v 2.1.2
# rails -v
Rails 2.1.2

現在はこの方がいいかもしれません。
# gem install rake
# gem install rails -v=2.1.2 --include-dependencies
# gem update --system (必要に応じて)

●Redmineのインストール
運用ユーザ?の作成
# useradd redmine
# passwd redmine
# cd /usr/local/src/
# wget http://rubyforge.org/frs/download.php/54503/redmine-0.8.3.tar.gz

# tar xzvf redmine-0.8.3.tar.gz
# cp -rp redmine-0.8.3/* /home/redmine/
# chown redmine.redmine /home/redmine/*
※のちのちのアップグレードを考えておくと、ソースからインストールするより
 リポジトリからチェックアウトする方法がベスト!。
 # cd /home/redmine
 安定版:svn checkout http://redmine.rubyforge.org/svn/branches/0.8-stable ./
 開発版:svn checkout http://redmine.rubyforge.org/svn/trunk/ ./
 注意!Redmineのバージョンによってrubyやrailsのバージョンに制限があります。

# cd /home/redmine/
# cp -p ./config/database.yml.example ./config/database.yml
# vi ./config/database.yml

production:
 adapter: mysql
 database: redmine
 host: localhost
 username: redmine
 password: ユーザパスワード
 encoding: utf8
 socket: /var/lib/mysql/mysql.sock  #追記します(RPM版の場合だけ?)

V0.8.7以降の場合に実行する
# rake config/initializers/session_store.rb

データベース上にテーブルを作成
# rake db:migrate RAILS_ENV="production"

デフォルトのデータをデータベースに設定
# rake redmine:load_default_data RAILS_ENV="production"
Select language: bg, ca, cs, da, de, en, es, fi, fr, he, hu, it, ja, ko, lt, nl, no, pl, pt, pt-br, ro, ru, sk, sr, sv, th, tr, uk, vn, zh, zh-tw [en] で止まりますのでjaと入力します。

ディレクトリの追加
# pwd
/home/redmine
# mkdir tmp public/plugin_assets
# mkdir: cannot create directory `tmp': File exists
# mkdir: cannot create directory `public/plugin_assets': File exists
既に存在するようですね。無視して次へ行きましょう。

# chown -R redmine:redmine files log tmp public/plugin_assets
# chmod -R 777 files log tmp public/plugin_assets

PDFおよびCSV文字化け対策
# vi ./lang/ja.yml (UNICODEで書かれています)54行目付近
※0.9より./config/locales/になり、すでにCP932になっています。
general_pdf_encoding: UTF-8
general_csv_encoding: UTF-8
   ↓
general_pdf_encoding: SJIS CP932 ※Redmine.JPではCP932と紹介していたので同様に変更
general_csv_encoding: SJIS CP932
に変更する。(ただし完全に文字化けは防げない)

付属Webサーバで起動してみる
# cd /home/redmine/
# script/server -e production
=> Booting WEBrick...
=> Rails 2.1.2 application started on http://0.0.0.0:3000
=> Ctrl-C to shutdown server; call with --help for options

ポート3000番で起動されているので、http://hostname:3000/ でアクセスできます。
デフォルトユーザでadminがいますのでユーザ、パスワードにadminを入力してログインします。
以上で完了ですが、常にポート3000番で運用はどうかと・・・この際Apacheと連携させましょう。
 
● Apacheとの連携# gem install passenger

※Apacheをソースからインストールした場合は、apxs2、path環境変数を設定する必要があります。
インストール先pathはご自分の環境に合わせてください。
# export APXS2=/usr/local/apache/bin/apxs
# export PATH=/usr/local/apache/bin:$PATH
 
# passenger-install-apache2-module
依存関係で警告が出た場合はそれぞれを解消してください。

手順1~3が表示されますのでEnterで進みます。

ビルドに成功するとPassengerを組み込むためのhttpd.confの設定が表示されるので内容をコピーしておきます。
Please edit your Apache configuration file, and add these lines:

--ここから
LoadModule passenger_module /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.2/ext/apache2/mod_passenger.so
PassengerRoot /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.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!

控えたらEnterで続行すると次のメッセージが表示され完了します。

Suppose you have a Ruby on Rails application in /somewhere. Add a virtual host
to your Apache configuration file, and set its DocumentRoot to
/somewhere/public, like this:

---ここから
<Virtualhost *:80>
ServerName www.yourhost.com
DocumenetRoot /somewhere/public # <-- be sure to point to 'public'!
</Virtualhost>
---ここまで控えておく(控えるほどではないが、要はDocumentRootにポイントあり)
     以下省略

httpd.confに先ほど控えた内容を追記する。
# vi /usr/local/apache/conf/httpd.conf
※RPMでインストールされている方は/etc/httpd/conf/httpd.conf

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

VirtualHostの内容は環境に合わせた内容にします。
 ただしDocumentRootはredmineのpublicというディレクトリに指定します。

<Virtualhost *:80>

ServerName RedmineHostName #名前がなければlocalhostやIPアドレスでも可
DocumentRoot /home/redmine/public  
  AllowOverride AuthConfig All
  Order allow,deny
  Allow from all
 

</Virtualhost>

Apacheユーザが書き込めるように権限を設定する。  (ユーザはhttpd.confにて要確認)
# cd /home/redmine
# chown -R apache:apache files log tmp config/environment.rb public/plugin_assets
※environment.rb にも権限を割り当てないとなぜか起動できない・・・まっいいか。
 
これでApache経由でアクセスすることができます。
Apacheを再起動してhttp://RedmineHostName/にアクセスしてみましょう。
 
●Redmine.JPおすすめ「インストール後の設定」
Redmineヘルプの日本語化
# vi /home/redmine/lib/redmine/info.rb
def help_url; 'http://www.redmine.org/guide' end
   ↓
def help_url; 'http://redmine.jp/guide/' end
に変更する。

Wikiヘルプの日本語化
# cd /home/redmine
# wget http://redmine.jp/files/wiki_syntax_ja/wiki_syntax_ja.tar.gz
# tar zxvf wiki_syntax_ja.tar.gz
wiki_syntax.html
wiki_syntax_detailed.html
# cp wiki_syntax.html wiki_syntax_detailed.html public/help/
上書きする。
 
●メール設定(使わなければ不要)
# cp ./config/email.yml.example ./config/email.yml
# vi ./config/email.yml

production:
 delivery_method: :smtp
 smtp_settings:
  address: smtp.example.net ← SMTPサーバを指定(127.0.0.1など)
  port: 25 ← ポートを指定
  domain: example.net ← ドメインを指定
  authentication: :login ← SMTP認証(不要なら:loginを消去)
  user_name: redmine@example.net ← SMTP認証(不要ならredmine@example.netを消去)
  password: redmine ← SMTP認証(不要ならredmineを消去)

Apacheを再起動して設定を反映させます。

●Web初期設定
初期管理者admin/adminでログオンして画面右上部のMy accountを選択選択する。
・Languageを「Japanese(日本語)」に変更する。
・タイムゾーンを「(GMT+09:00)Tokyo」に変更する。
・名前、苗字を決める。
 
左上部の管理>設定を選択する。
・全般タブ
 既定の言語:Japanese(日本語)
 ホスト名:ホスト名(例 redmine.example.comなど環境に合わせて)
 ユーザ名の表示書式:苗字 名前の並びを任意で設定

・メール通知タブ(使わなければ不要)
 送信元アドレス(redmineが送信するアドレス)
 その他必要な部分を変更します。※メールフッタ最後のhttp://~は変えた方がいいです。

・リポジトリタブ(使わなければ不要)
 リポジトリブラウザでutf-8以外(shift_jis, euc-jpなど)で記述されたソースコードを表示する。
 「管理」→「設定」→「リポジトリ」を開き、「リポジトリのエンコーディング」を次のように設定する。
 日本語文字コードの自動判別が行われるようになり、文字化けが解消するそうです。
 「utf-8,shift_jis,euc-jp」
 
※保存ボタンを忘れずに押してください。
 
以上で初期設定は完了です。
 
※googleのbloggerでは、すべて半角で書き込んだ<virtualhost>は表示されない?
 仕方ないので<>は全角で表記させていただきました。
 

Google検索