Redmine構築~その2

前回に引き続き Redmineのインストールを続けます。 前回の記事はこちら(Redmineをイン ストールする。(1/3))

さて続けます。

Rubyのインストール

現時点で最新のRedmine 3.2は、Ruby 2.2の最新版を適用する必要がある様です。
本ページを執筆中のRubyは2.4が提供されていますがオフィシャルサイトからRuby 2.2の最新版をダウンロードします。
Rubyのオフィシャルサイト・ ダウンロードページでRuby 2.2の最新版URLを確認してください。
適当なディレクトリへ移動してから、以下のコマンドを実行するとダウンロードされます。
# curl -O https://cache.ruby-lang.org/pub/ruby/2.2/ruby-2.2.6.tar.gz
ダウンロードしたパッケージを解凍→コンパイルします。
# tar zxvf ruby-2.2.6.tar.gz
# cd ruby-2.2.6
# ./configure --disable-install-doc
# make
# make install
# cd ..
# ruby -v
ruby 2.2.6p396 (2016-11-15 revision 56800) [x86_64-linux]
こんな感じでruby -vでバージョン情報が出ればOK! bundlerのインストール?をするらしいので。。。。
# gem install bundler --no-rdoc --no-ri
Fetching: bundler-1.14.4.gem (100%)
Did you know that maintaining and improving Bundler and RubyGems.org costs more than $25,000 USD every month? Help us keep the gem ecosystem free for everyone by joining the hundreds of companies and individuals who help cover these costs: https://ruby.to/support-bundler
Successfully installed bundler-1.14.4
1 gem installed
こんな感じでインストール

PostgreSQLの設定

オフィシャルサイトでは以下のコマンドを実行する様に記載されています。
# postgresql-setup initdb
私の環境では、postgresql-setupコマンドが存在しませんでしたので、以下のコマンドを実行しました。
# /etc/rc.d/init.d/postgresql initdb
/var/lib/pgsql/data/pg_hba.confファイルを開いて、こんな感じで編集します。(2行追加)
vi /var/lib/pgsql/data/pg_hba.conf

# Put your actual configuration here
# ----------------------------------
#
# If you want to allow non-local connections, you need to add more
# "host" records. In that case you will also need to make PostgreSQL listen
# on a non-local interface via the listen_addresses configuration parameter,
# or via the -i or -h command line switches.
#
host    redmine         redmine         127.0.0.1/32            md5
host    redmine         redmine         ::1/128                 md5
PostgreSQLを起動し、自動機能の設定を行います。
# service postgresql start
# chkconfig postgresql on
移動してredmineユーザがposgreSQLを使用できるようにユーザを新規に作成します。
# cd /var/lib/pgsql/
# sudo -u postgres createuser -P redmine
Enter password for new role:
Enter it again:
Shall the new role be a superuser? (y/n) y
Redmine用データベースの作成
sudo -u postgres createdb -E UTF-8 -l ja_JP.UTF-8 -O redmine -T template0 redmine
これで一通りRedmine本体をインストールするための下準備が完成しました。
 次こそ、Redmine本体のインストール作業に入ります。 ここまでの流れを以下にリンクしておきます。
 Redmineをインストールする(1/3) Redmineをインストールする(2/3)      
第二回目

トップページへ