CentOs6.8にRedmine3.3.0をインストールした。
手順メモを記載。
※インストール手順は以下参考URLを参照。
Redmine2.3.2をCentOS6.4にインストールする。
Redmine 2.3をCentOS 6.4にインストールする手順
Redmine 3.2をCentOS 7.1にインストールする手順
■ 主要箇所をメモ記載
SELinuxはPermissiveに設定
1 2 3 |
[root@localhost ~]# setenforce 0 [root@localhost ~]# getenforce Permissive |
RedmineをApache実行ユーザー・グループで読み書きできるようにオーナーを変更する。
1 |
[root@localhost ~]# chown -R apache:apache /var/lib/redmine/redmine-3.3.0/public/ |
「httpd.conf」に以下を追加
1 |
[root@localhost ~]# vi /etc/httpd/conf/httpd.conf |
1 2 3 4 5 6 |
# /redmine のサブURLでアクセスできるように設定 Alias /redmine /var/lib/redmine/redmine-3.3.0/public <Directory /var/lib/redmine/redmine-3.3.0/public> order deny,allow Allow from all </Directory> |
redmine.confの作成
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# Passengerの基本設定。 # passenger-install-apache2-module --snippet を実行して表示される設定を使用。 # LoadModule passenger_module /usr/local/lib/ruby/gems/2.3.0/gems/passenger-5.0.29/buildout/apache2/mod_passenger.so <IfModule mod_passenger.c> PassengerRoot /usr/local/lib/ruby/gems/2.3.0/gems/passenger-5.0.29 PassengerDefaultRuby /usr/local/bin/ruby </IfModule> # 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" PassengerMaxPoolSize 20 PassengerMaxInstancesPerApp 4 PassengerPoolIdleTime 3600 PassengerHighPerformance on PassengerStatThrottleRate 10 PassengerSpawnMethod smart RailsAppSpawnerIdleTime 86400 PassengerMaxPreloaderIdleTime 0 # DocumentRootのサブディレクトリで実行する設定 RackBaseURI /redmine |
サーバー再起動してRedmineにアクセスできれば成功★
■ ※「passenger-status」コマンドでエラーが発生する場合※
1 2 3 4 5 6 7 8 9 10 11 12 13 |
[root@localhost ~]# passenger-status ERROR: Phusion Passenger doesn't seem to be running. If you are sure that it is running, then the causes of this problem could be: 1. You customized the instance registry directory using Apache's PassengerInstan ceRegistryDir option, Nginx's passenger_instance_registry_dir option, or Phusion Passenger Standalone's --instance-registry-dir command line argument. If so, pl ease set the environment variable PASSENGER_INSTANCE_REGISTRY_DIR to that direct ory and run passenger-status again. 2. The instance directory has been removed by an operating system background ser vice. Please set a different instance registry directory using Apache's Passenge rInstanceRegistryDir option, Nginx's passenger_instance_registry_dir option, or Phusion Passenger Standalone's --instance-registry-dir command line argument. |
ディレクトリを作成
1 |
[root@localhost ~]# mkdir /var/run/passenger-instreg |
念のため権限を追加
1 |
[root@localhost ~]# chown -R root:root /var/run/passenger-instreg |
「httpd.conf」に以下を追加
1 |
[root@localhost ~]# vi /etc/httpd/conf/httpd.conf |
1 2 3 4 |
# Passengerの設定 PassengerResolveSymlinksInDocumentRoot on # Passengerの設定 以下ディレクトリを作成 PassengerInstanceRegistryDir /var/run/passenger-instreg |
環境変数に追加
1 |
export PASSENGER_INSTANCE_REGISTRY_DIR=/var/run/passenger-instreg |
Apacheの再起動
1 2 3 |
[root@localhost ~]# service httpd restart httpd を停止中: [ OK ] httpd を起動中: [ OK ] |
「passenger-status」コマンドでエラーがでなければOK
1 2 3 4 5 6 7 8 9 10 11 12 |
[root@localhost ~]# passenger-status Version : 5.0.29 Date : 2016-10-03 18:37:19 +0900 Instance: w3aGMouB (Apache/2.2.15 (Unix) Phusion_Passenger/5.0.29) ----------- General information ----------- Max pool size : 20 App groups : 0 Processes : 0 Requests in top-level queue : 0 ----------- Application groups ----------- |
以上です。