比較バージョン

キー

  • この行は追加されました。
  • この行は削除されました。
  • 書式設定が変更されました。

...

3. Apache Tomcat 7をインストールする

...

1. インストール

CentOS 7にはTomcatのパッケージが用意されていますので、これをyumにてインストールします。

...

パネル
borderColor#cccccc
bgColor#eeeeee
borderStylesolid
# yum install tomcat

2. 自動起動の設定

以下のコマンドで自動起動設定を有効にします。

パネル
borderColor#cccccc
bgColor#eeeeee
borderStylesolid
# systemctl enable tomcat

補足:
以下のコマンドで自動起動設定を無効にすることができます。
# systemctl disable tomcat

3. profileの追加

/etc/profile.d/java-tomcat.sh という新規ファイルを以下の内容で作成します。

...

追加した環境変数を読み込みます。

パネル

# source /etc/profile

4. Apache の設定

以下のように /etc/httpd/conf/httpd.conf を修正します。

パネル
borderColor#cccccc
bgColor#eeeeee
borderStylesolid
(省略)
ServerName ex-idp-test00test??.gakunin.nii.ac.jp:80 0番を割り振られた場合のホスト名
??は各自割り振られた番番号(0番なら、ex-idp-test00.gakunin.nii.ac.jp 
(省略)

以下のように /etc/httpd/conf.d/ssl.conf を修正します。 

パネル
borderColor#cccccc
bgColor#eeeeee
borderStylesolid
(省略) 
<VirtualHost _default_:443>
(省略)
ServerName ex-idp-test00test??.gakunin.nii.ac.jp:443 0番を割り振られた場合のホスト名
??は各自割り振られた番号
ProxyPass /idp/ ajp://localhost:8009/idp/    ← 設定を追加
(省略)

5. Tomcat の設定

以下の内容で /etc/httpd/conf.d/virtualhost-localhost80.conf を作成します。

...

パネル
borderColor#cccccc
bgColor#eeeeee
borderStylesolid

<Connector port="8009" protocol="AJP/1.3" redirectPort="8443"
           enableLookups="false" tomcatAuthentication="false" address="127.0.0.1" maxPostSize="100000" />

...

6. "tomcat"ユーザで起動

...

 以下のコマンドでその他Tomcat関連の設定ファイルやディレクトリの所有者、パーミッションを設定します。 

...

各ファイル名等の指定は,Version 3.2.1に準拠しています。

1.   インストール

Shibboleth IdPのパッケージは、「/root/PKG」配下にあります。

...

 install.shシェルスクリプトを実行すると、以下のような問い合わせがあります。
手順に従って、進めてください。

ヒント
title実習セミナー

Hostnameは、設定しなくても設定されているはずです。
 各自IdPサーバのホスト名が設定されていることを確認します。
 例)1番を割り振られた場合
   ex-idp-test01.gakunin.nii.ac.jp
Attribute Scopeは、「gakunin.nii.ac.jp」が設定されているので「nii.ac.jp」を入力して設定してください。

Backchannel PKCS12 Password: backpass[Enter] ←任意のパスワード

Re-enter password: backpass[Enter]

 

パネル
borderColor#cccccc
bgColor#eeeeee
borderStylesolid

Source (Distribution) Directory: [/root/PKG/shibboleth-identity-provider-3.1.2]
[Enter] ←入力なし
Installation Directory: [/opt/shibboleth-idp]
[Enter] ←入力なし
Hostname: [ex-idp-test??.gakunin.nii.ac.jp]

[Enter] 入力なし ※表示されたホスト名が違う場合、設定してください。
SAML EntityID: [https://ex-idp-test??.gakunin.nii.ac.jp/idp/shibboleth]
[Enter] ←入力なし
Attribute Scope: [gakunin.nii.ac.jp]
nii.ac.jp [Enter] nii.ac.jpを設定してください。

Backchannel PKCS12 Password: backpass[Enter] ←任意のパスワード

Re-enter password: backpass[Enter]

Cookie Encryption Key Password: cookiepass[Enter] ←任意のパスワード
Re-enter password: cookiepass[Enter]

 (省略)

BUILD SUCCESSFUL
Total time: 2 minutes 9 seconds

...

パネル
borderColor#cccccc
bgColor#eeeeee
borderStylesolid
# chown -R tomcat:tomcat /opt/shibboleth-idp/logs
# chgrp -R tomcat /opt/shibboleth-idp/conf
# chmod -R g+r /opt/shibboleth-idp/conf
# find /opt/shibboleth-idp/conf -type d -exec chmod -R g+s {} \;
# chgrp tomcat /opt/shibboleth-idp/metadata
# chmod g+w /opt/shibboleth-idp/metadata
# chmod +t /opt/shibboleth-idp/metadata

...