2014年01月11日

AWS EC2(redhat)へredmineをインストールしました。
その時の設定メモ

環境

環境 version
Redmine 2.4
OS Red Hat Enterprise Linux 6.4
DB MySQL 14.14
webサーバー Apache 2.2.15 + Passenger 4.0.33
Ruby 2.0.0

手順

基本的には以下のサイトの通り。

手順通りにいかなかった箇所

  • コマンドはrootで実行する。

    ec2-userでログインしているので、rootのパスワードが不明。

    パスワードを変更する。

    % sudo passwd
    新しいパスワード入力
    
    %su -
    設定したパスワード入力
    
  • 再起動

    % shutdown -r now
    
  • エラーが発生した箇所

  1. bundle install –without development test

Gemパッケージのインストール
# bundle install --without development test

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

    /usr/local/bin/ruby extconf.rb
checking for Ruby version >= 1.8.5... yes
checking for gcc... yes
checking for Magick-config... no
Can't install RMagick 2.13.2. Can't find Magick-config in /usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
    --with-opt-dir
    --without-opt-dir
    --with-opt-include
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=/usr/local/bin/ruby


Gem files will remain installed in /usr/local/lib/ruby/gems/2.0.0/gems/rmagick-2.13.2 for inspection.
Results logged to /usr/local/lib/ruby/gems/2.0.0/gems/rmagick-2.13.2/ext/RMagick/gem_make.out
An error occurred while installing rmagick (2.13.2), and Bundler
cannot continue.
Make sure that `gem install rmagick -v '2.13.2'` succeeds before
bundling.

Magick-configが見つからないというエラーなので、モジュールを入れて再実行したら通った。

Can't install RMagick 2.13.2. Can't find Magick-config

% yum install ImageMagick-devel

  1. passenger-install-apache2-module

    PassengerのApache用モジュールのインストール
    # passenger-install-apache2-module

* Checking for Curl development headers with SSL support...
      Found: no
      Error: Cannot find the `curl-config` command.
---中略---
Installation instructions for required software

 * To install Curl development headers with SSL support:
    Please install it with yum install curl-devel

    If the aforementioned instructions didn't solve your problem, then please take
    a look at the Users Guide:

インストールの仕方まで示してくれているのでそのままコマンドを実行

% yum install curl-devel

swapを作れと言われたので表示されたコマンドをそのまま実行

% sudo dd if=/dev/zero of=/swap bs=1M count=1024
% sudo mkswap /swap
% sudo swapon /swap

apache再起動時にWARNING

/etc/init.d/httpd configtest

httpd を起動中: WARNING: The 'RailsFrameworkSpawnerIdleTime' option is obsolete. Please use 'PassengerMaxPreloaderIdleTime' instead.

/etc/httpd/conf.d/passenger.conf を以下のように書き換え

RailsFrameworkSpawnerIdleTime 0
↓
PassengerMaxPreloaderIdleTime 0

redmineの初期設定

今日はここまで!!



blog comments powered by Disqus