AIPOビルド環境構築(CentOS6)

Windosw8.1でのAIPOビルド環境構築と、開発用Gitリポジトリ作成はすでに完了しているので、後はテスト用にCentOS6でのAIPOビルド環境を構築するのが本日のお題です。

環境構築については新設なページスタートガイド前提事項 – ドキュメント|無料グループウェア「アイポ」に従う。

とりあえずインストールするサーバーは

[root@VM01 etc]# cat redhat-release
CentOS release 6.5 (Final)

となっている。

JDKインストール

Java Archive Downloads – Java SE 6からJava SE Development Kit (JDK) をダウンロードしてインストールする。

01
ダウンロード後、/usr/loca/srcに配置後、下記を実行

[root@VM01 src]# cd /usr/local/src/
[root@VM01 src]# chmod +x jdk-6u45-linux-x64-rpm.bin 
[root@VM01 src]# ./jdk-6u45-linux-x64-rpm.bin 
Unpacking...
Checksumming...
Extracting...
UnZipSFX 5.50 of 17 February 2002, by Info-ZIP (Zip-Bugs@lists.wku.edu).
  inflating: jdk-6u45-linux-amd64.rpm  
  inflating: sun-javadb-common-10.6.2-1.1.i386.rpm  
  inflating: sun-javadb-core-10.6.2-1.1.i386.rpm  
  inflating: sun-javadb-client-10.6.2-1.1.i386.rpm  
  inflating: sun-javadb-demo-10.6.2-1.1.i386.rpm  
  inflating: sun-javadb-docs-10.6.2-1.1.i386.rpm  
  inflating: sun-javadb-javadoc-10.6.2-1.1.i386.rpm  
準備中...                ########################################### [100%]
   1:jdk                    ########################################### [100%]
Unpacking JAR files...
        rt.jar...
        jsse.jar...
        charsets.jar...
        tools.jar...
        localedata.jar...
        plugin.jar...
        javaws.jar...
        deploy.jar...
Installing JavaDB
準備中...                ########################################### [100%]
   1:sun-javadb-common      ########################################### [ 17%]
   2:sun-javadb-core        ########################################### [ 33%]
   3:sun-javadb-client      ########################################### [ 50%]
   4:sun-javadb-demo        ########################################### [ 67%]
   5:sun-javadb-docs        ########################################### [ 83%]
   6:sun-javadb-javadoc     ########################################### [100%]

Done.
[root@VM01 src]#

環境変数をセットする

お決まりの環境変数のセット。

[root@centos ~]# vi /etc/profile ← 環境変数設定ファイルを編集
以下を最終行へ追加
export JAVA_HOME=/usr/java/default
export PATH=$PATH:$JAVA_HOME/bin
export CLASSPATH=.:$JAVA_HOME/jre/lib:$JAVA_HOME/lib:$JAVA_HOME/lib/tools.jar

[root@centos ~]# source /etc/profile ← 環境変数設定を反映

バージョンを確認

[root@VM01 ~]# java -version
java version "1.6.0_45"
Java(TM) SE Runtime Environment (build 1.6.0_45-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode)

Mavenインストール

Mavenをインストール。apache本家のページに行くと”Apache Maven 3.2.2″が最新版になっているので、指定されている2.2.xをgoogleで探す。
apache-maven-2.2.1-bin.tar.bz2からダウンロード
解凍

[root@VM01 temp]# mv apache-maven-2.2.1-bin.tar.bz2 /usr/local/
[root@VM01 temp]# cd /usr/local/
[root@VM01 local]# tar jvxf apache-maven-2.2.1-bin.tar.bz2 
apache-maven-2.2.1/boot/classworlds-1.1.jar
apache-maven-2.2.1/LICENSE.txt
apache-maven-2.2.1/NOTICE.txt
apache-maven-2.2.1/README.txt
apache-maven-2.2.1/bin/m2.conf
apache-maven-2.2.1/bin/mvn.bat
apache-maven-2.2.1/bin/mvnDebug.bat
apache-maven-2.2.1/bin/mvn
apache-maven-2.2.1/bin/mvnDebug
apache-maven-2.2.1/conf/
apache-maven-2.2.1/conf/settings.xml
apache-maven-2.2.1/lib/maven-2.2.1-uber.jar
[root@VM01 local]# ls
apache-maven-2.2.1              bin  games    lib    libexec  share
apache-maven-2.2.1-bin.tar.bz2  etc  include  lib64  sbin     src
[root@VM01 local]#

環境変数の設定

[root@VM01 apache-maven-2.2.1]# vi /etc/profile

export MAVEN_HOME=/usr/local/apache-maven-2.2.1
export PATH=$PATH:$MAVEN_HOME/bin
を追加。

[root@VM01 apache-maven-2.2.1]# source /etc/profile ← 環境変数設定を反映

バージョンを確認

[root@VM01 apache-maven-2.2.1]# mvn --version
Apache Maven 2.2.1 (r801777; 2009-08-07 04:16:01+0900)
Java version: 1.6.0_45
Java home: /usr/java/jdk1.6.0_45/jre
Default locale: ja_JP, platform encoding: UTF-8
OS name: "linux" version: "2.6.32-431.20.5.el6.x86_64" arch: "amd64" Family: "unix"
[root@VM01 apache-maven-2.2.1]#

PostgreSQLインストール

ページの指定は、Ver8.4。
yumで調べてみる

[root@VM01 ~]# yum info postgresql
Loaded plugins: fastestmirror, refresh-packagekit
Loading mirror speeds from cached hostfile
 * base: www.ftp.ne.jp
 * extras: www.ftp.ne.jp
 * updates: www.ftp.ne.jp
Available Packages
Name        : postgresql
Arch        : i686
Version     : 8.4.20
Release     : 1.el6_5
Size        : 2.6 M
Repo        : updates
Summary     : PostgreSQL client programs
URL         : http://www.postgresql.org/
License     : PostgreSQL
Description : PostgreSQL is an advanced Object-Relational database management system
            : (DBMS) that supports almost all SQL constructs (including
            : transactions, subselects and user-defined types and functions). The
            : postgresql package includes the client programs and libraries that
            : you'll need to access a PostgreSQL DBMS server.  These PostgreSQL
            : client programs are programs that directly manipulate the internal
            : structure of PostgreSQL databases on a PostgreSQL server. These client
            : programs can be located on the same machine with the PostgreSQL
            : server, or may be on a remote machine which accesses a PostgreSQL
            : server over a network connection. This package contains the docs
            : in HTML for the whole package, as well as command-line utilities for
            : managing PostgreSQL databases on a PostgreSQL server.
            : 
            : If you want to manipulate a PostgreSQL database on a local or remote PostgreSQL
            : server, you need this package. You also need to install this package
            : if you're installing the postgresql-server package.

Name        : postgresql
Arch        : x86_64
Version     : 8.4.20
Release     : 1.el6_5
Size        : 2.6 M
Repo        : updates
Summary     : PostgreSQL client programs
URL         : http://www.postgresql.org/
License     : PostgreSQL
Description : PostgreSQL is an advanced Object-Relational database management system
            : (DBMS) that supports almost all SQL constructs (including
            : transactions, subselects and user-defined types and functions). The
            : postgresql package includes the client programs and libraries that
            : you'll need to access a PostgreSQL DBMS server.  These PostgreSQL
            : client programs are programs that directly manipulate the internal
            : structure of PostgreSQL databases on a PostgreSQL server. These client
            : programs can be located on the same machine with the PostgreSQL
            : server, or may be on a remote machine which accesses a PostgreSQL
            : server over a network connection. This package contains the docs
            : in HTML for the whole package, as well as command-line utilities for
            : managing PostgreSQL databases on a PostgreSQL server.
            : 
            : If you want to manipulate a PostgreSQL database on a local or remote PostgreSQL
            : server, you need this package. You also need to install this package
            : if you're installing the postgresql-server package.

[root@VM01 ~]#

よそさうなので、インストールしてみる。

[root@VM01 ~]# yum install postgresql
Loaded plugins: fastestmirror, refresh-packagekit
Loading mirror speeds from cached hostfile
 * base: www.ftp.ne.jp
 * extras: www.ftp.ne.jp
 * updates: www.ftp.ne.jp
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package postgresql.x86_64 0:8.4.20-1.el6_5 will be installed
--> Processing Dependency: postgresql-libs(x86-64) = 8.4.20-1.el6_5 for package: postgresql-8.4.20-1.el6_5.x86_64
--> Processing Dependency: libpq.so.5()(64bit) for package: postgresql-8.4.20-1.el6_5.x86_64
--> Running transaction check
---> Package postgresql-libs.x86_64 0:8.4.20-1.el6_5 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================================================== Package                        Arch                  Version                        Repository              Size
==================================================================================================================Installing:
 postgresql                     x86_64                8.4.20-1.el6_5                 updates                2.6 M
Installing for dependencies:
 postgresql-libs                x86_64                8.4.20-1.el6_5                 updates                201 k

Transaction Summary
==================================================================================================================Install       2 Package(s)

Total download size: 2.8 M
Installed size: 14 M
Is this ok [y/N]: y
Downloading Packages:
(1/2): postgresql-8.4.20-1.el6_5.x86_64.rpm                                                | 2.6 MB     00:00     (2/2): postgresql-libs-8.4.20-1.el6_5.x86_64.rpm                                           | 201 kB     00:00     ------------------------------------------------------------------------------------------------------------------Total                                                                             8.1 MB/s | 2.8 MB     00:00     Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : postgresql-libs-8.4.20-1.el6_5.x86_64                                                          1/2   Installing : postgresql-8.4.20-1.el6_5.x86_64                                                               2/2   Verifying  : postgresql-libs-8.4.20-1.el6_5.x86_64                                                          1/2   Verifying  : postgresql-8.4.20-1.el6_5.x86_64                                                               2/2 
Installed:
  postgresql.x86_64 0:8.4.20-1.el6_5                                                                              
Dependency Installed:
  postgresql-libs.x86_64 0:8.4.20-1.el6_5                                                                         
Complete!
[root@VM01 ~]#

足りなそうなので、追加

[root@VM01 ~]# yum install postgresql-server postgresql-devel
Loaded plugins: fastestmirror, refresh-packagekit
Loading mirror speeds from cached hostfile
 * base: www.ftp.ne.jp
 * extras: www.ftp.ne.jp
 * updates: www.ftp.ne.jp
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package postgresql-devel.x86_64 0:8.4.20-1.el6_5 will be installed
---> Package postgresql-server.x86_64 0:8.4.20-1.el6_5 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================================================== Package                         Arch                 Version                         Repository             Size
==================================================================================================================Installing:
 postgresql-devel                x86_64               8.4.20-1.el6_5                  updates               815 k
 postgresql-server               x86_64               8.4.20-1.el6_5                  updates               3.4 M

Transaction Summary
==================================================================================================================Install       2 Package(s)

Total download size: 4.2 M
Installed size: 18 M
Is this ok [y/N]: y
Downloading Packages:
(1/2): postgresql-devel-8.4.20-1.el6_5.x86_64.rpm                                          | 815 kB     00:00     (2/2): postgresql-server-8.4.20-1.el6_5.x86_64.rpm                                         | 3.4 MB     00:00     ------------------------------------------------------------------------------------------------------------------Total                                                                             9.0 MB/s | 4.2 MB     00:00     Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : postgresql-devel-8.4.20-1.el6_5.x86_64                                                         1/2   Installing : postgresql-server-8.4.20-1.el6_5.x86_64                                                        2/2   Verifying  : postgresql-server-8.4.20-1.el6_5.x86_64                                                        1/2   Verifying  : postgresql-devel-8.4.20-1.el6_5.x86_64                                                         2/2 
Installed:
  postgresql-devel.x86_64 0:8.4.20-1.el6_5                postgresql-server.x86_64 0:8.4.20-1.el6_5               
Complete!
[root@VM01 ~]#

初期設定

エンコードもUTF8に指定する。

[root@VM01 pgsql]# service postgresql initdb --encoding=UTF8 --no-locale
データベースを初期化中:                                    [  OK  ]

起動

[root@VM01 ~]# service postgresql start
postgresql サービスを開始中:                               [  OK  ]

自動起動設定

[root@VM01 ~]# chkconfig postgresql on
[root@VM01 ~]# chkconfig --list | grep postgresql
postgresql      0:off   1:off   2:on    3:on    4:on    5:on    6:off

パスワード設定

[root@VM01 ~]# su - postgres
-bash-4.1$ psql
psql (8.4.20)
"help" でヘルプを表示します.

postgres=# alter user postgres with encrypted password 'aipo';
ALTER ROLE
postgres=# \q
-bash-4.1$ exit
logout

/var/lib/pgsql/data/pg_hba.confに下記行を追記※IPアドレスは環境に合わせること

[root@VM01 ~]# vi /var/lib/pgsql/data/pg_hba.conf 
 ・
(中略)
 ・
# TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD

# "local" is for Unix domain socket connections only
local   all         all                               trust
# IPv4 local connections:
host    all         all         127.0.0.1/32          trust
# IPv6 local connections:
host    all         all         ::1/128               trust
# add by kitada
host    all         all         192.168.1.0/24        trust

/var/lib/pgsql/data/postgresql.confの59行目を編集

[root@VM01 ~]# vi /var/lib/pgsql/data/postgresql.conf 
・
(中略)
・
#------------------------------------------------------------------------------
# CONNECTIONS AND AUTHENTICATION
#------------------------------------------------------------------------------

# - Connection Settings -

listen_addresses = '*'          # what IP address(es) to listen on;    <== 変更
                                        # comma-separated list of addresses;
                                        # defaults to 'localhost', '*' = all
                                        # (change requires restart)
port = 5432                            # (change requires restart)
max_connections = 100                   # (change requires restart)
# Note:  Increasing max_connections costs ~400 bytes of shared memory per
# connection slot, plus lock space (see max_locks_per_transaction).
#superuser_reserved_connections = 3     # (change requires restart)
#unix_socket_directory = ''             # (change requires restart)
#unix_socket_group = ''                 # (change requires restart)
#unix_socket_permissions = 0777         # begin with 0 to use octal notation
                                        # (change requires restart)
#bonjour_name = ''                      # defaults to the computer name
                                        # (change requires restart)

PostgreSQL再起動

[root@VM01 ~]# service postgresql restart
postgresql サービスを停止中:                               [  OK  ]
postgresql サービスを開始中:                               [  OK  ]

接続確認 ※postgresqlの動作サーバーのIPが192.168.11.6の場合の例

[root@VM01 ~]# su - postgres
-bash-4.1$ psql -h 192.168.11.6 -U postgres
ユーザ postgres のパスワード: 
psql (8.4.20)
"help" でヘルプを表示します.

postgres-# \q
-bash-4.1$ exit
logout
[root@VM01 ~]#

phpPgAdminをインストール

EPELリポジトリを有効化して、CentOSの標準リポジトリで提供されないパッケージをyumでインストールできるようにする。
・標準リポジトリの優先度を上げて、EPELリポジトリにパッケージを上書きされないようにする

[root@VM01 pgsql]# yum install yum-plugin-priorities
Loaded plugins: fastestmirror, refresh-packagekit
Loading mirror speeds from cached hostfile
 * base: www.ftp.ne.jp
 * extras: www.ftp.ne.jp
 * updates: www.ftp.ne.jp
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package yum-plugin-priorities.noarch 0:1.1.30-17.el6_5 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================================================ Package                            Arch                Version                      Repository            Size
================================================================================================================Installing:
 yum-plugin-priorities              noarch              1.1.30-17.el6_5              updates               23 k

Transaction Summary
================================================================================================================Install       1 Package(s)

Total download size: 23 k
Installed size: 28 k
Is this ok [y/N]: y
Downloading Packages:
yum-plugin-priorities-1.1.30-17.el6_5.noarch.rpm                                         |  23 kB     00:00     Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : yum-plugin-priorities-1.1.30-17.el6_5.noarch                                                 1/1   Verifying  : yum-plugin-priorities-1.1.30-17.el6_5.noarch                                                 1/1 
Installed:
  yum-plugin-priorities.noarch 0:1.1.30-17.el6_5                                                                
Complete!
[root@VM01 pgsql]# vi /etc/yum.repos.d/CentOS-Base.repo
[base]
priority=1 //追加
[updates]
priority=1 //追加
[extras]
priority=1 //追加

EPELを追加。

[root@VM01 ~]# rpm -ivh http://ftp.riken.jp/Linux/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm
http://ftp.riken.jp/Linux/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm を取得中
警告: /var/tmp/rpm-tmp.3lxMDw: ヘッダ V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
準備中...                ########################################### [100%]
   1:epel-release           ########################################### [100%]
[root@VM01 ~]#

EPELが有効になったか確認

[root@VM01 ~]# yum repolist
Loaded plugins: fastestmirror, priorities, refresh-packagekit
Loading mirror speeds from cached hostfile
epel/metalink                                                                            | 5.9 kB     00:00      * base: www.ftp.ne.jp
 * epel: ftp.tsukuba.wide.ad.jp
 * extras: www.ftp.ne.jp
 * updates: www.ftp.ne.jp
base                                                                                     | 3.7 kB     00:00     epel                                                                                     | 4.4 kB     00:00     epel/primary_db                                                                          | 6.3 MB     00:00     extras                                                                                   | 3.4 kB     00:00     updates                                                                                  | 3.4 kB     00:00     85 packages excluded due to repository priority protections
repo id                         repo name                                                              status
base                            CentOS-6 - Base                                                            6,367epel                            Extra Packages for Enterprise Linux 6 - x86_64                         10,966+85extras                          CentOS-6 - Extras                                                             14updates                         CentOS-6 - Updates                                                         1,242repolist: 18,589

あらためてphpPgAminインストール

[root@VM01 ~]# yum install phpPgAdmin php-pgsql
Loaded plugins: fastestmirror, priorities, refresh-packagekit
Loading mirror speeds from cached hostfile
 * base: www.ftp.ne.jp
 * epel: ftp.tsukuba.wide.ad.jp
 * extras: www.ftp.ne.jp
 * updates: www.ftp.ne.jp
85 packages excluded due to repository priority protections
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php-pgsql.x86_64 0:5.3.3-27.el6_5 will be installed
--> Processing Dependency: php-common(x86-64) = 5.3.3-27.el6_5 for package: php-pgsql-5.3.3-27.el6_5.x86_64
--> Processing Dependency: php-pdo(x86-64) for package: php-pgsql-5.3.3-27.el6_5.x86_64
---> Package phpPgAdmin.noarch 0:5.0.4-1.el6 will be installed
--> Processing Dependency: php >= 4.2 for package: phpPgAdmin-5.0.4-1.el6.noarch
--> Processing Dependency: /usr/bin/php for package: phpPgAdmin-5.0.4-1.el6.noarch
--> Running transaction check
---> Package php.x86_64 0:5.3.3-27.el6_5 will be installed
---> Package php-cli.x86_64 0:5.3.3-27.el6_5 will be installed
---> Package php-common.x86_64 0:5.3.3-27.el6_5 will be installed
---> Package php-pdo.x86_64 0:5.3.3-27.el6_5 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================================================ Package                    Arch                   Version                        Repository               Size
================================================================================================================Installing:
 php-pgsql                  x86_64                 5.3.3-27.el6_5                 updates                  70 k
 phpPgAdmin                 noarch                 5.0.4-1.el6                    epel                    909 k
Installing for dependencies:
 php                        x86_64                 5.3.3-27.el6_5                 updates                 1.1 M
 php-cli                    x86_64                 5.3.3-27.el6_5                 updates                 2.2 M
 php-common                 x86_64                 5.3.3-27.el6_5                 updates                 525 k
 php-pdo                    x86_64                 5.3.3-27.el6_5                 updates                  75 k

Transaction Summary
================================================================================================================Install       6 Package(s)

Total download size: 4.8 M
Installed size: 18 M
Is this ok [y/N]: y
Downloading Packages:
(1/6): php-5.3.3-27.el6_5.x86_64.rpm                                                     | 1.1 MB     00:00     (2/6): php-cli-5.3.3-27.el6_5.x86_64.rpm                                                 | 2.2 MB     00:00     (3/6): php-common-5.3.3-27.el6_5.x86_64.rpm                                              | 525 kB     00:00     (4/6): php-pdo-5.3.3-27.el6_5.x86_64.rpm                                                 |  75 kB     00:00     (5/6): php-pgsql-5.3.3-27.el6_5.x86_64.rpm                                               |  70 kB     00:00     (6/6): phpPgAdmin-5.0.4-1.el6.noarch.rpm                                                 | 909 kB     00:00     ----------------------------------------------------------------------------------------------------------------Total                                                                           6.8 MB/s | 4.8 MB     00:00     warning: rpmts_HdrFromFdno: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
Importing GPG key 0x0608B895:
 Userid : EPEL (6) 
 Package: epel-release-6-8.noarch (installed)
 From   : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
Is this ok [y/N]: y
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
  Installing : php-common-5.3.3-27.el6_5.x86_64                                                             1/6   Installing : php-cli-5.3.3-27.el6_5.x86_64                                                                2/6   Installing : php-5.3.3-27.el6_5.x86_64                                                                    3/6   Installing : php-pdo-5.3.3-27.el6_5.x86_64                                                                4/6   Installing : php-pgsql-5.3.3-27.el6_5.x86_64                                                              5/6   Installing : phpPgAdmin-5.0.4-1.el6.noarch                                                                6/6 Non-fatal POSTIN scriptlet failure in rpm package phpPgAdmin-5.0.4-1.el6.noarch
warning: %post(phpPgAdmin-5.0.4-1.el6.noarch) scriptlet failed, exit status 7
  Verifying  : php-pgsql-5.3.3-27.el6_5.x86_64                                                              1/6   Verifying  : php-cli-5.3.3-27.el6_5.x86_64                                                                2/6   Verifying  : php-5.3.3-27.el6_5.x86_64                                                                    3/6   Verifying  : phpPgAdmin-5.0.4-1.el6.noarch                                                                4/6   Verifying  : php-common-5.3.3-27.el6_5.x86_64                                                             5/6   Verifying  : php-pdo-5.3.3-27.el6_5.x86_64                                                                6/6 
Installed:
  php-pgsql.x86_64 0:5.3.3-27.el6_5                       phpPgAdmin.noarch 0:5.0.4-1.el6                      

Dependency Installed:
  php.x86_64 0:5.3.3-27.el6_5         php-cli.x86_64 0:5.3.3-27.el6_5     php-common.x86_64 0:5.3.3-27.el6_5      php-pdo.x86_64 0:5.3.3-27.el6_5    

Complete!
[root@VM01 ~]#

とりあえず許可する。セキュリティ的にはダメダメ

[root@VM01 conf.d]# vi /etc/httpd/conf.d/phpPgAdmin.conf 
#
# This configuration file maps the phpPgAdmin directory into the URL space. 
# By default this application is only accessible from the local host.
#

Alias /phpPgAdmin /usr/share/phpPgAdmin

    Order allow,deny     <== 追加
    Allow from all       <== 追加
#    Order deny,allow    <== コメントアウト
#    Deny from all       <== コメントアウト
#    Allow from 127.0.0.1  <== コメントアウト
#    Allow from ::1        <== コメントアウト
    # Allow from .example.com

ブラウザからアクセスしてみる。「http://(サーバーIP)/phpPgAdmin」
02

Tomcatインストール

インストール先は「C:\home\aipo\apache-tomcat-6.0.37」となっているようだが無視して、普通にyumでインストールしてしまおう。(きっと後で帳尻合わせが必要なると思うが・・・)

[root@VM01 home]# yum install tomcat6 tomcat6-webapps tomcat6-admin-webapps
Loaded plugins: fastestmirror, priorities, refresh-packagekit
Loading mirror speeds from cached hostfile
 * base: www.ftp.ne.jp
 * epel: ftp.kddilabs.jp
 * extras: www.ftp.ne.jp
 * updates: www.ftp.ne.jp
85 packages excluded due to repository priority protections
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package tomcat6.noarch 0:6.0.24-72.el6_5 will be installed
base/filelists_db                                                                        | 5.9 MB     00:00     epel/filelists_db                                                                        | 8.9 MB     00:00     extras/filelists_db                                                                      |  11 kB     00:00     updates/filelists_db                                                                     | 2.7 MB     00:00     --> Processing Dependency: tomcat6-lib = 6.0.24-72.el6_5 for package: tomcat6-6.0.24-72.el6_5.noarch
--> Processing Dependency: mx4j for package: tomcat6-6.0.24-72.el6_5.noarch
--> Processing Dependency: log4j for package: tomcat6-6.0.24-72.el6_5.noarch
--> Processing Dependency: log4j for package: tomcat6-6.0.24-72.el6_5.noarch
--> Processing Dependency: jpackage-utils for package: tomcat6-6.0.24-72.el6_5.noarch
--> Processing Dependency: jpackage-utils for package: tomcat6-6.0.24-72.el6_5.noarch
--> Processing Dependency: java for package: tomcat6-6.0.24-72.el6_5.noarch
--> Processing Dependency: jakarta-commons-pool for package: tomcat6-6.0.24-72.el6_5.noarch
--> Processing Dependency: jakarta-commons-logging for package: tomcat6-6.0.24-72.el6_5.noarch
--> Processing Dependency: jakarta-commons-dbcp for package: tomcat6-6.0.24-72.el6_5.noarch
--> Processing Dependency: jakarta-commons-daemon for package: tomcat6-6.0.24-72.el6_5.noarch
--> Processing Dependency: jakarta-commons-collections for package: tomcat6-6.0.24-72.el6_5.noarch
--> Processing Dependency: /lib/lsb/init-functions for package: tomcat6-6.0.24-72.el6_5.noarch
--> Processing Dependency: /lib/lsb/init-functions for package: tomcat6-6.0.24-72.el6_5.noarch
---> Package tomcat6-admin-webapps.noarch 0:6.0.24-72.el6_5 will be installed
---> Package tomcat6-webapps.noarch 0:6.0.24-72.el6_5 will be installed
--> Processing Dependency: jakarta-taglibs-standard >= 1.1 for package: tomcat6-webapps-6.0.24-72.el6_5.noarch
--> Running transaction check
---> Package jakarta-commons-collections.noarch 0:3.2.1-3.4.el6 will be installed
---> Package jakarta-commons-daemon.x86_64 1:1.0.1-8.9.el6 will be installed
--> Processing Dependency: java-gcj-compat for package: 1:jakarta-commons-daemon-1.0.1-8.9.el6.x86_64
--> Processing Dependency: java-gcj-compat for package: 1:jakarta-commons-daemon-1.0.1-8.9.el6.x86_64
--> Processing Dependency: libgcj_bc.so.1()(64bit) for package: 1:jakarta-commons-daemon-1.0.1-8.9.el6.x86_64
---> Package jakarta-commons-dbcp.noarch 0:1.2.1-13.8.el6 will be installed
---> Package jakarta-commons-logging.noarch 0:1.0.4-10.el6 will be installed
---> Package jakarta-commons-pool.x86_64 0:1.3-12.7.el6 will be installed
---> Package jakarta-taglibs-standard.noarch 0:1.1.1-11.4.el6 will be installed
--> Processing Dependency: xalan-j2 >= 2.6.0 for package: jakarta-taglibs-standard-1.1.1-11.4.el6.noarch
--> Processing Dependency: apache-tomcat-apis for package: jakarta-taglibs-standard-1.1.1-11.4.el6.noarch
---> Package java-1.7.0-openjdk.x86_64 1:1.7.0.65-2.5.1.2.el6_5 will be installed
--> Processing Dependency: xorg-x11-fonts-Type1 for package: 1:java-1.7.0-openjdk-1.7.0.65-2.5.1.2.el6_5.x86_64
--> Processing Dependency: tzdata-java for package: 1:java-1.7.0-openjdk-1.7.0.65-2.5.1.2.el6_5.x86_64
--> Processing Dependency: libgif.so.4()(64bit) for package: 1:java-1.7.0-openjdk-1.7.0.65-2.5.1.2.el6_5.x86_64
---> Package jpackage-utils.noarch 0:1.7.5-3.12.el6 will be installed
---> Package log4j.x86_64 0:1.2.14-6.4.el6 will be installed
---> Package mx4j.noarch 1:3.0.1-9.13.el6 will be installed
--> Processing Dependency: javamail >= 1.2-5jpp for package: 1:mx4j-3.0.1-9.13.el6.noarch
--> Processing Dependency: bcel >= 5.0 for package: 1:mx4j-3.0.1-9.13.el6.noarch
--> Processing Dependency: axis >= 1.1 for package: 1:mx4j-3.0.1-9.13.el6.noarch
--> Processing Dependency: xml-commons-resolver for package: 1:mx4j-3.0.1-9.13.el6.noarch
--> Processing Dependency: xml-commons for package: 1:mx4j-3.0.1-9.13.el6.noarch
--> Processing Dependency: jaf for package: 1:mx4j-3.0.1-9.13.el6.noarch
---> Package redhat-lsb-core.x86_64 0:4.0-7.el6.centos will be installed
--> Processing Dependency: perl-Test-Simple for package: redhat-lsb-core-4.0-7.el6.centos.x86_64
--> Processing Dependency: perl-Test-Harness for package: redhat-lsb-core-4.0-7.el6.centos.x86_64
--> Processing Dependency: perl-ExtUtils-MakeMaker for package: redhat-lsb-core-4.0-7.el6.centos.x86_64
--> Processing Dependency: perl-CGI for package: redhat-lsb-core-4.0-7.el6.centos.x86_64
--> Processing Dependency: /usr/bin/time for package: redhat-lsb-core-4.0-7.el6.centos.x86_64
--> Processing Dependency: /usr/bin/pax for package: redhat-lsb-core-4.0-7.el6.centos.x86_64
--> Processing Dependency: /usr/bin/patch for package: redhat-lsb-core-4.0-7.el6.centos.x86_64
--> Processing Dependency: /usr/bin/msgfmt for package: redhat-lsb-core-4.0-7.el6.centos.x86_64
--> Processing Dependency: /usr/bin/man for package: redhat-lsb-core-4.0-7.el6.centos.x86_64
--> Processing Dependency: /usr/bin/bc for package: redhat-lsb-core-4.0-7.el6.centos.x86_64
--> Processing Dependency: /usr/bin/batch for package: redhat-lsb-core-4.0-7.el6.centos.x86_64
--> Processing Dependency: /usr/bin/at for package: redhat-lsb-core-4.0-7.el6.centos.x86_64
--> Processing Dependency: /bin/mailx for package: redhat-lsb-core-4.0-7.el6.centos.x86_64
--> Processing Dependency: /bin/gettext for package: redhat-lsb-core-4.0-7.el6.centos.x86_64
--> Processing Dependency: /bin/ed for package: redhat-lsb-core-4.0-7.el6.centos.x86_64
---> Package tomcat6-lib.noarch 0:6.0.24-72.el6_5 will be installed
--> Processing Dependency: tomcat6-servlet-2.5-api = 6.0.24-72.el6_5 for package: tomcat6-lib-6.0.24-72.el6_5.noarch
--> Processing Dependency: tomcat6-jsp-2.1-api = 6.0.24-72.el6_5 for package: tomcat6-lib-6.0.24-72.el6_5.noarch--> Processing Dependency: tomcat6-el-2.1-api = 6.0.24-72.el6_5 for package: tomcat6-lib-6.0.24-72.el6_5.noarch
--> Processing Dependency: ecj for package: tomcat6-lib-6.0.24-72.el6_5.noarch
--> Running transaction check
---> Package apache-tomcat-apis.noarch 0:0.1-1.el6 will be installed
---> Package at.x86_64 0:3.1.10-43.el6_2.1 will be installed
---> Package axis.noarch 0:1.2.1-7.3.el6_3 will be installed
--> Processing Dependency: wsdl4j for package: axis-1.2.1-7.3.el6_3.noarch
--> Processing Dependency: jakarta-commons-httpclient for package: axis-1.2.1-7.3.el6_3.noarch
--> Processing Dependency: jakarta-commons-discovery for package: axis-1.2.1-7.3.el6_3.noarch
---> Package bc.x86_64 0:1.06.95-1.el6 will be installed
---> Package bcel.x86_64 0:5.2-7.2.el6 will be installed
--> Processing Dependency: regexp for package: bcel-5.2-7.2.el6.x86_64
---> Package classpathx-jaf.x86_64 0:1.0-15.4.el6 will be installed
---> Package classpathx-mail.noarch 0:1.1.1-9.4.el6 will be installed
---> Package ecj.x86_64 1:3.4.2-6.el6 will be installed
---> Package ed.x86_64 0:1.1-3.3.el6 will be installed
---> Package gettext.x86_64 0:0.17-16.el6 will be installed
--> Processing Dependency: libgomp.so.1(GOMP_1.0)(64bit) for package: gettext-0.17-16.el6.x86_64
--> Processing Dependency: cvs for package: gettext-0.17-16.el6.x86_64
--> Processing Dependency: libgomp.so.1()(64bit) for package: gettext-0.17-16.el6.x86_64
---> Package giflib.x86_64 0:4.1.6-3.1.el6 will be installed
---> Package java-1.5.0-gcj.x86_64 0:1.5.0.0-29.1.el6 will be installed
--> Processing Dependency: sinjdoc for package: java-1.5.0-gcj-1.5.0.0-29.1.el6.x86_64
---> Package libgcj.x86_64 0:4.4.7-4.el6 will be installed
--> Processing Dependency: zip >= 2.1 for package: libgcj-4.4.7-4.el6.x86_64
---> Package mailx.x86_64 0:12.4-7.el6 will be installed
---> Package man.x86_64 0:1.6f-32.el6 will be installed
--> Processing Dependency: lzma for package: man-1.6f-32.el6.x86_64
---> Package patch.x86_64 0:2.6-6.el6 will be installed
---> Package pax.x86_64 0:3.4-10.1.el6 will be installed
---> Package perl-CGI.x86_64 0:3.51-136.el6 will be installed
---> Package perl-ExtUtils-MakeMaker.x86_64 0:6.55-136.el6 will be installed
--> Processing Dependency: perl-devel for package: perl-ExtUtils-MakeMaker-6.55-136.el6.x86_64
---> Package perl-Test-Harness.x86_64 0:3.17-136.el6 will be installed
---> Package perl-Test-Simple.x86_64 0:0.92-136.el6 will be installed
---> Package time.x86_64 0:1.7-37.1.el6 will be installed
---> Package tomcat6-el-2.1-api.noarch 0:6.0.24-72.el6_5 will be installed
---> Package tomcat6-jsp-2.1-api.noarch 0:6.0.24-72.el6_5 will be installed
---> Package tomcat6-servlet-2.5-api.noarch 0:6.0.24-72.el6_5 will be installed
---> Package tzdata-java.noarch 0:2014e-1.el6 will be installed
---> Package xalan-j2.noarch 0:2.7.0-9.9.el6_5 will be installed
---> Package xml-commons-apis.x86_64 0:1.3.04-3.6.el6 will be installed
---> Package xml-commons-resolver.x86_64 0:1.1-4.18.el6 will be installed
---> Package xorg-x11-fonts-Type1.noarch 0:7.2-9.1.el6 will be installed
--> Processing Dependency: ttmkfdir for package: xorg-x11-fonts-Type1-7.2-9.1.el6.noarch
--> Processing Dependency: ttmkfdir for package: xorg-x11-fonts-Type1-7.2-9.1.el6.noarch
--> Running transaction check
---> Package cvs.x86_64 0:1.11.23-16.el6 will be installed
---> Package jakarta-commons-discovery.noarch 1:0.4-5.4.el6 will be installed
---> Package jakarta-commons-httpclient.x86_64 1:3.1-0.7.el6_3 will be installed
---> Package libgomp.x86_64 0:4.4.7-4.el6 will be installed
---> Package perl-devel.x86_64 4:5.10.1-136.el6 will be installed
--> Processing Dependency: perl(ExtUtils::ParseXS) for package: 4:perl-devel-5.10.1-136.el6.x86_64
--> Processing Dependency: glibc-devel for package: 4:perl-devel-5.10.1-136.el6.x86_64
--> Processing Dependency: gdbm-devel for package: 4:perl-devel-5.10.1-136.el6.x86_64
--> Processing Dependency: db4-devel for package: 4:perl-devel-5.10.1-136.el6.x86_64
---> Package regexp.x86_64 0:1.5-4.4.el6 will be installed
---> Package sinjdoc.x86_64 0:0.5-9.1.el6 will be installed
--> Processing Dependency: java_cup >= 0.10 for package: sinjdoc-0.5-9.1.el6.x86_64
---> Package ttmkfdir.x86_64 0:3.0.9-32.1.el6 will be installed
---> Package wsdl4j.noarch 0:1.5.2-7.8.el6 will be installed
---> Package xz-lzma-compat.x86_64 0:4.999.9-0.3.beta.20091007git.el6 will be installed
--> Processing Dependency: xz = 4.999.9-0.3.beta.20091007git.el6 for package: xz-lzma-compat-4.999.9-0.3.beta.20091007git.el6.x86_64
---> Package zip.x86_64 0:3.0-1.el6 will be installed
--> Running transaction check
---> Package db4-devel.x86_64 0:4.7.25-18.el6_4 will be installed
--> Processing Dependency: db4-cxx = 4.7.25-18.el6_4 for package: db4-devel-4.7.25-18.el6_4.x86_64
--> Processing Dependency: libdb_cxx-4.7.so()(64bit) for package: db4-devel-4.7.25-18.el6_4.x86_64
---> Package gdbm-devel.x86_64 0:1.8.0-36.el6 will be installed
---> Package glibc-devel.x86_64 0:2.12-1.132.el6_5.2 will be installed
--> Processing Dependency: glibc-headers = 2.12-1.132.el6_5.2 for package: glibc-devel-2.12-1.132.el6_5.2.x86_64--> Processing Dependency: glibc-headers for package: glibc-devel-2.12-1.132.el6_5.2.x86_64
---> Package java_cup.x86_64 1:0.10k-5.el6 will be installed
---> Package perl-ExtUtils-ParseXS.x86_64 1:2.2003.0-136.el6 will be installed
---> Package xz.x86_64 0:4.999.9-0.3.beta.20091007git.el6 will be installed
--> Running transaction check
---> Package db4-cxx.x86_64 0:4.7.25-18.el6_4 will be installed
---> Package glibc-headers.x86_64 0:2.12-1.132.el6_5.2 will be installed
--> Processing Dependency: kernel-headers >= 2.2.1 for package: glibc-headers-2.12-1.132.el6_5.2.x86_64
--> Processing Dependency: kernel-headers for package: glibc-headers-2.12-1.132.el6_5.2.x86_64
--> Running transaction check
---> Package kernel-headers.x86_64 0:2.6.32-431.23.3.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================================================ Package                            Arch          Version                                  Repository      Size
================================================================================================================Installing:
 tomcat6                            noarch        6.0.24-72.el6_5                          updates         91 k
 tomcat6-admin-webapps              noarch        6.0.24-72.el6_5                          updates         39 k
 tomcat6-webapps                    noarch        6.0.24-72.el6_5                          updates        612 k
Installing for dependencies:
 apache-tomcat-apis                 noarch        0.1-1.el6                                base           164 k
 at                                 x86_64        3.1.10-43.el6_2.1                        base            60 k
 axis                               noarch        1.2.1-7.3.el6_3                          base           1.5 M
 bc                                 x86_64        1.06.95-1.el6                            base           110 k
 bcel                               x86_64        5.2-7.2.el6                              base           1.4 M
 classpathx-jaf                     x86_64        1.0-15.4.el6                             base           100 k
 classpathx-mail                    noarch        1.1.1-9.4.el6                            base           479 k
 cvs                                x86_64        1.11.23-16.el6                           base           712 k
 db4-cxx                            x86_64        4.7.25-18.el6_4                          base           588 k
 db4-devel                          x86_64        4.7.25-18.el6_4                          base           6.6 M
 ecj                                x86_64        1:3.4.2-6.el6                            base           2.8 M
 ed                                 x86_64        1.1-3.3.el6                              base            72 k
 gdbm-devel                         x86_64        1.8.0-36.el6                             base            25 k
 gettext                            x86_64        0.17-16.el6                              base           1.8 M
 giflib                             x86_64        4.1.6-3.1.el6                            base            37 k
 glibc-devel                        x86_64        2.12-1.132.el6_5.2                       updates        978 k
 glibc-headers                      x86_64        2.12-1.132.el6_5.2                       updates        608 k
 jakarta-commons-collections        noarch        3.2.1-3.4.el6                            base           523 k
 jakarta-commons-daemon             x86_64        1:1.0.1-8.9.el6                          base            45 k
 jakarta-commons-dbcp               noarch        1.2.1-13.8.el6                           base           116 k
 jakarta-commons-discovery          noarch        1:0.4-5.4.el6                            base            73 k
 jakarta-commons-httpclient         x86_64        1:3.1-0.7.el6_3                          base           587 k
 jakarta-commons-logging            noarch        1.0.4-10.el6                             base            52 k
 jakarta-commons-pool               x86_64        1.3-12.7.el6                             base           122 k
 jakarta-taglibs-standard           noarch        1.1.1-11.4.el6                           base           384 k
 java-1.5.0-gcj                     x86_64        1.5.0.0-29.1.el6                         base           139 k
 java-1.7.0-openjdk                 x86_64        1:1.7.0.65-2.5.1.2.el6_5                 updates         26 M
 java_cup                           x86_64        1:0.10k-5.el6                            base           197 k
 jpackage-utils                     noarch        1.7.5-3.12.el6                           base            59 k
 kernel-headers                     x86_64        2.6.32-431.23.3.el6                      updates        2.9 M
 libgcj                             x86_64        4.4.7-4.el6                              base            19 M
 libgomp                            x86_64        4.4.7-4.el6                              base           118 k
 log4j                              x86_64        1.2.14-6.4.el6                           base           679 k
 mailx                              x86_64        12.4-7.el6                               base           235 k
 man                                x86_64        1.6f-32.el6                              base           263 k
 mx4j                               noarch        1:3.0.1-9.13.el6                         base           1.1 M
 patch                              x86_64        2.6-6.el6                                base            90 k
 pax                                x86_64        3.4-10.1.el6                             base            69 k
 perl-CGI                           x86_64        3.51-136.el6                             base           209 k
 perl-ExtUtils-MakeMaker            x86_64        6.55-136.el6                             base           293 k
 perl-ExtUtils-ParseXS              x86_64        1:2.2003.0-136.el6                       base            45 k
 perl-Test-Harness                  x86_64        3.17-136.el6                             base           231 k
 perl-Test-Simple                   x86_64        0.92-136.el6                             base           112 k
 perl-devel                         x86_64        4:5.10.1-136.el6                         base           423 k
 redhat-lsb-core                    x86_64        4.0-7.el6.centos                         base            25 k
 regexp                             x86_64        1.5-4.4.el6                              base           105 k
 sinjdoc                            x86_64        0.5-9.1.el6                              base           705 k
 time                               x86_64        1.7-37.1.el6                             base            26 k
 tomcat6-el-2.1-api                 noarch        6.0.24-72.el6_5                          updates         46 k
 tomcat6-jsp-2.1-api                noarch        6.0.24-72.el6_5                          updates         83 k
 tomcat6-lib                        noarch        6.0.24-72.el6_5                          updates        2.9 M
 tomcat6-servlet-2.5-api            noarch        6.0.24-72.el6_5                          updates         97 k
 ttmkfdir                           x86_64        3.0.9-32.1.el6                           base            43 k
 tzdata-java                        noarch        2014e-1.el6                              updates        148 k
 wsdl4j                             noarch        1.5.2-7.8.el6                            base           157 k
 xalan-j2                           noarch        2.7.0-9.9.el6_5                          updates        1.8 M
 xml-commons-apis                   x86_64        1.3.04-3.6.el6                           base           439 k
 xml-commons-resolver               x86_64        1.1-4.18.el6                             base           145 k
 xorg-x11-fonts-Type1               noarch        7.2-9.1.el6                              base           520 k
 xz                                 x86_64        4.999.9-0.3.beta.20091007git.el6         base           137 k
 xz-lzma-compat                     x86_64        4.999.9-0.3.beta.20091007git.el6         base            16 k
 zip                                x86_64        3.0-1.el6                                base           260 k

Transaction Summary
================================================================================================================Install      65 Package(s)

Total download size: 79 M
Installed size: 244 M
Is this ok [y/N]: 

(長いので中略)

  Verifying  : sinjdoc-0.5-9.1.el6.x86_64                                                                 64/65   Verifying  : tzdata-java-2014e-1.el6.noarch                                                             65/65 
Installed:
  tomcat6.noarch 0:6.0.24-72.el6_5                    tomcat6-admin-webapps.noarch 0:6.0.24-72.el6_5           
  tomcat6-webapps.noarch 0:6.0.24-72.el6_5           

Dependency Installed:
  apache-tomcat-apis.noarch 0:0.1-1.el6                     at.x86_64 0:3.1.10-43.el6_2.1                      
  axis.noarch 0:1.2.1-7.3.el6_3                             bc.x86_64 0:1.06.95-1.el6                          
  bcel.x86_64 0:5.2-7.2.el6                                 classpathx-jaf.x86_64 0:1.0-15.4.el6               
  classpathx-mail.noarch 0:1.1.1-9.4.el6                    cvs.x86_64 0:1.11.23-16.el6                        
  db4-cxx.x86_64 0:4.7.25-18.el6_4                          db4-devel.x86_64 0:4.7.25-18.el6_4                 
  ecj.x86_64 1:3.4.2-6.el6                                  ed.x86_64 0:1.1-3.3.el6                            
  gdbm-devel.x86_64 0:1.8.0-36.el6                          gettext.x86_64 0:0.17-16.el6                       
  giflib.x86_64 0:4.1.6-3.1.el6                             glibc-devel.x86_64 0:2.12-1.132.el6_5.2            
  glibc-headers.x86_64 0:2.12-1.132.el6_5.2                 jakarta-commons-collections.noarch 0:3.2.1-3.4.el6 
  jakarta-commons-daemon.x86_64 1:1.0.1-8.9.el6             jakarta-commons-dbcp.noarch 0:1.2.1-13.8.el6       
  jakarta-commons-discovery.noarch 1:0.4-5.4.el6            jakarta-commons-httpclient.x86_64 1:3.1-0.7.el6_3  
  jakarta-commons-logging.noarch 0:1.0.4-10.el6             jakarta-commons-pool.x86_64 0:1.3-12.7.el6         
  jakarta-taglibs-standard.noarch 0:1.1.1-11.4.el6          java-1.5.0-gcj.x86_64 0:1.5.0.0-29.1.el6           
  java-1.7.0-openjdk.x86_64 1:1.7.0.65-2.5.1.2.el6_5        java_cup.x86_64 1:0.10k-5.el6                      
  jpackage-utils.noarch 0:1.7.5-3.12.el6                    kernel-headers.x86_64 0:2.6.32-431.23.3.el6        
  libgcj.x86_64 0:4.4.7-4.el6                               libgomp.x86_64 0:4.4.7-4.el6                       
  log4j.x86_64 0:1.2.14-6.4.el6                             mailx.x86_64 0:12.4-7.el6                          
  man.x86_64 0:1.6f-32.el6                                  mx4j.noarch 1:3.0.1-9.13.el6                       
  patch.x86_64 0:2.6-6.el6                                  pax.x86_64 0:3.4-10.1.el6                          
  perl-CGI.x86_64 0:3.51-136.el6                            perl-ExtUtils-MakeMaker.x86_64 0:6.55-136.el6      
  perl-ExtUtils-ParseXS.x86_64 1:2.2003.0-136.el6           perl-Test-Harness.x86_64 0:3.17-136.el6            
  perl-Test-Simple.x86_64 0:0.92-136.el6                    perl-devel.x86_64 4:5.10.1-136.el6                 
  redhat-lsb-core.x86_64 0:4.0-7.el6.centos                 regexp.x86_64 0:1.5-4.4.el6                        
  sinjdoc.x86_64 0:0.5-9.1.el6                              time.x86_64 0:1.7-37.1.el6                         
  tomcat6-el-2.1-api.noarch 0:6.0.24-72.el6_5               tomcat6-jsp-2.1-api.noarch 0:6.0.24-72.el6_5       
  tomcat6-lib.noarch 0:6.0.24-72.el6_5                      tomcat6-servlet-2.5-api.noarch 0:6.0.24-72.el6_5   
  ttmkfdir.x86_64 0:3.0.9-32.1.el6                          tzdata-java.noarch 0:2014e-1.el6                   
  wsdl4j.noarch 0:1.5.2-7.8.el6                             xalan-j2.noarch 0:2.7.0-9.9.el6_5                  
  xml-commons-apis.x86_64 0:1.3.04-3.6.el6                  xml-commons-resolver.x86_64 0:1.1-4.18.el6         
  xorg-x11-fonts-Type1.noarch 0:7.2-9.1.el6                 xz.x86_64 0:4.999.9-0.3.beta.20091007git.el6       
  xz-lzma-compat.x86_64 0:4.999.9-0.3.beta.20091007git.el6  zip.x86_64 0:3.0-1.el6                             

Complete!
[root@VM01 home]#

インストールできたみたい。

Tocat6起動

[root@VM01 home]# service tomcat6 start
Starting tomcat6:                                          [  OK  ]

Tomcatの動作確認

ブラウザで「http://xxx.xxx.xxx.xxx:8080」にアクセスしてみる。
03

Tomcat起動設定

[root@VM01 home]# chkconfig --list | grep tomcat
tomcat6         0:off   1:off   2:off   3:off   4:off   5:off   6:off
[root@VM01 home]# chkconfig tomcat6 on
[root@VM01 home]# chkconfig --list | grep tomcat
tomcat6         0:off   1:off   2:on    3:on    4:on    5:on    6:off

JDBCドライバの設置

これもyumで入れてしまおう。

[root@VM01 home]# yum search jdbc
Loaded plugins: fastestmirror, priorities, refresh-packagekit
Loading mirror speeds from cached hostfile
 * base: www.ftp.ne.jp
 * epel: ftp.kddilabs.jp
 * extras: www.ftp.ne.jp
 * updates: www.ftp.ne.jp
85 packages excluded due to repository priority protections
============================================== N/S Matched: jdbc ===============================================mysql-connector-java.noarch : Official JDBC driver for MySQL
postgis-jdbc.x86_64 : The JDBC driver for PostGIS
postgresql-jdbc.noarch : JDBC driver for PostgreSQL
hsqldb.noarch : Hsqldb Database Engine
javasqlite.x86_64 : SQLite Java Wrapper/JDBC Driver

  Name and summary matches only, use "search all" for everything.
[root@VM01 home]#

見つけたので、インストール

[root@VM01 home]# yum install postgresql-jdbc
Loaded plugins: fastestmirror, priorities, refresh-packagekit
Loading mirror speeds from cached hostfile
 * base: www.ftp.ne.jp
 * epel: ftp.kddilabs.jp
 * extras: www.ftp.ne.jp
 * updates: www.ftp.ne.jp
85 packages excluded due to repository priority protections
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package postgresql-jdbc.noarch 0:8.4.701-8.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================================================ Package                        Arch                  Version                         Repository           Size
================================================================================================================Installing:
 postgresql-jdbc                noarch                8.4.701-8.el6                   base                402 k

Transaction Summary
================================================================================================================Install       1 Package(s)

Total download size: 402 k
Installed size: 504 k
Is this ok [y/N]: y
Downloading Packages:
postgresql-jdbc-8.4.701-8.el6.noarch.rpm                                                 | 402 kB     00:00     Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : postgresql-jdbc-8.4.701-8.el6.noarch                                                         1/1   Verifying  : postgresql-jdbc-8.4.701-8.el6.noarch                                                         1/1 
Installed:
  postgresql-jdbc.noarch 0:8.4.701-8.el6                                                                        
Complete!
[root@VM01 home]#

GITをインストール

Eclipseは利用する予定がないが、Gitは必要なのでインストール。

[root@VM01 ~]# yum install git
Loaded plugins: fastestmirror, priorities, refresh-packagekit
Loading mirror speeds from cached hostfile
 * base: www.ftp.ne.jp
 * epel: ftp.kddilabs.jp
 * extras: www.ftp.ne.jp
 * updates: www.ftp.ne.jp
85 packages excluded due to repository priority protections
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package git.x86_64 0:1.7.1-3.el6_4.1 will be installed
--> Processing Dependency: perl-Git = 1.7.1-3.el6_4.1 for package: git-1.7.1-3.el6_4.1.x86_64
--> Processing Dependency: rsync for package: git-1.7.1-3.el6_4.1.x86_64
--> Processing Dependency: perl(Git) for package: git-1.7.1-3.el6_4.1.x86_64
--> Processing Dependency: perl(Error) for package: git-1.7.1-3.el6_4.1.x86_64
--> Running transaction check
---> Package perl-Error.noarch 1:0.17015-4.el6 will be installed
---> Package perl-Git.noarch 0:1.7.1-3.el6_4.1 will be installed
---> Package rsync.x86_64 0:3.0.6-9.el6_4.1 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================================================ Package                    Arch                   Version                           Repository            Size
================================================================================================================Installing:
 git                        x86_64                 1.7.1-3.el6_4.1                   base                 4.6 M
Installing for dependencies:
 perl-Error                 noarch                 1:0.17015-4.el6                   base                  29 k
 perl-Git                   noarch                 1.7.1-3.el6_4.1                   base                  28 k
 rsync                      x86_64                 3.0.6-9.el6_4.1                   base                 334 k

Transaction Summary
================================================================================================================Install       4 Package(s)

Total download size: 5.0 M
Installed size: 15 M
Is this ok [y/N]: y
Downloading Packages:
(1/4): git-1.7.1-3.el6_4.1.x86_64.rpm                                                    | 4.6 MB     00:00     (2/4): perl-Error-0.17015-4.el6.noarch.rpm                                               |  29 kB     00:00     (3/4): perl-Git-1.7.1-3.el6_4.1.noarch.rpm                                               |  28 kB     00:00     (4/4): rsync-3.0.6-9.el6_4.1.x86_64.rpm                                                  | 334 kB     00:00     ----------------------------------------------------------------------------------------------------------------Total                                                                           8.9 MB/s | 5.0 MB     00:00     Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : 1:perl-Error-0.17015-4.el6.noarch                                                            1/4   Installing : rsync-3.0.6-9.el6_4.1.x86_64                                                                 2/4   Installing : perl-Git-1.7.1-3.el6_4.1.noarch                                                              3/4   Installing : git-1.7.1-3.el6_4.1.x86_64                                                                   4/4   Verifying  : rsync-3.0.6-9.el6_4.1.x86_64                                                                 1/4   Verifying  : git-1.7.1-3.el6_4.1.x86_64                                                                   2/4   Verifying  : perl-Git-1.7.1-3.el6_4.1.noarch                                                              3/4   Verifying  : 1:perl-Error-0.17015-4.el6.noarch                                                            4/4 
Installed:
  git.x86_64 0:1.7.1-3.el6_4.1                                                                                  
Dependency Installed:
  perl-Error.noarch 1:0.17015-4.el6     perl-Git.noarch 0:1.7.1-3.el6_4.1     rsync.x86_64 0:3.0.6-9.el6_4.1    
Complete!
[root@VM01 ~]#

確認してみる。

[root@VM01 ~]# git
usage: git [--version] [--exec-path[=GIT_EXEC_PATH]] [--html-path]
           [-p|--paginate|--no-pager] [--no-replace-objects]
           [--bare] [--git-dir=GIT_DIR] [--work-tree=GIT_WORK_TREE]
           [--help] COMMAND [ARGS]

The most commonly used git commands are:
   add        Add file contents to the index
   bisect     Find by binary search the change that introduced a bug
   branch     List, create, or delete branches
   checkout   Checkout a branch or paths to the working tree
   clone      Clone a repository into a new directory
   commit     Record changes to the repository
   diff       Show changes between commits, commit and working tree, etc
   fetch      Download objects and refs from another repository
   grep       Print lines matching a pattern
   init       Create an empty git repository or reinitialize an existing one
   log        Show commit logs
   merge      Join two or more development histories together
   mv         Move or rename a file, a directory, or a symlink
   pull       Fetch from and merge with another repository or a local branch
   push       Update remote refs along with associated objects
   rebase     Forward-port local commits to the updated upstream head
   reset      Reset current HEAD to the specified state
   rm         Remove files from the working tree and from the index
   show       Show various types of objects
   status     Show the working tree status
   tag        Create, list, delete or verify a tag object signed with GPG

See 'git help COMMAND' for more information on a specific command.
[root@VM01 ~]#

Cayenneインストール

これもyumと行きたいところだったが、残念ながら見つからなかったので、「All Apache Cayenne releases」よりAipoで利用する 2.0.4をダウンロードする。

[root@VM01 src]# wget http://archive.apache.org/dist/cayenne/cayenne-2.0.4.tar.gz
--2014-08-05 00:18:17--  http://archive.apache.org/dist/cayenne/cayenne-2.0.4.tar.gz
archive.apache.org をDNSに問いあわせています... 140.211.11.131, 192.87.106.229, 2001:610:1:80bc:192:87:106:229
archive.apache.org|140.211.11.131|:80 に接続しています... 接続しました。
HTTP による接続要求を送信しました、応答を待っています... 200 OK
長さ: 11793046 (11M) [application/x-gzip]
`cayenne-2.0.4.tar.gz' に保存中

100%[======================================================================>] 11,793,046  1.86M/s 時間 7.5s    

2014-08-05 00:18:25 (1.50 MB/s) - `cayenne-2.0.4.tar.gz' へ保存完了 [11793046/11793046]

[root@VM01 src]# tar xvzf cayenne-2.0.4.tar.gz <== とりあえず解凍
[root@VM01 src]# mv cayenne-2.0.4 /usr/local/ <== 移動

環境変数を設定しておく。

[root@VM01 src]# vi /etc/profile

export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE HISTCONTROL
export JAVA_HOME=/usr/java/default
export PATH=$PATH:$JAVA_HOME/bin
export CLASSPATH=.:$JAVA_HOME/jre/lib:$JAVA_HOME/lib:$JAVA_HOME/lib/tools.jar
export MAVEN_HOME=/usr/local/apache-maven-2.2.1
export PATH=$PATH:$MAVEN_HOME/bin
export CAYENNE_HOME=/usr/local/cayenne-2.0.4  <== 追加
export PATH=$PATH:$CAYENNE_HOME/bin  <== 追加

プロジェクトの作成

Gitリポジトリからソースを取得する。

GitLabにアカウントを追加

まず、「aipodev」というLinuxアカウントを新規に作成した。

そして、GitLabとJenkins連携で行ったのと同じように、GitLabにアクセスする為にaipodevユーザー用の鍵をパスフレーズ無しで生成する。

[root@VM01 ~]# adduser aipodev
[root@VM01 ~]# su - aipodev
[aipodev@VM01 ~]$ ssh-keygen -t rsa -C aipodev@ramuda.co.jp
Generating public/private rsa key pair.
Enter file in which to save the key (/home/aipodev/.ssh/id_rsa): 
Created directory '/home/aipodev/.ssh'.
Enter passphrase (empty for no passphrase): (空)
Enter same passphrase again: (空)
Your identification has been saved in /home/aipodev/.ssh/id_rsa.
Your public key has been saved in /home/aipodev/.ssh/id_rsa.pub.
The key fingerprint is:
bf:78:57:1f:a5:d7:04:8a:b6:7d:c8:18:cd:c9:7e:0f aipodev@ramuda.co.jp
The key's randomart image is:
+--[ RSA 2048]----+
|                 |
|              .  |
|           = o . |
|          + *   o|
|        S. B . oo|
|         .o = E.o|
|          .  + =.|
|         ....   o|
|        ....     |
+-----------------+
[aipodev@VM01 ~]$ ll .ssh/
合計 8
-rw-------. 1 aipodev aipodev 1675  8月  5 01:01 2014 id_rsa
-rw-r--r--. 1 aipodev aipodev  402  8月  5 01:01 2014 id_rsa.pub
[aipodev@VM01 ~]$

後で公開鍵を登録する必要があるので、catしてコピーしておく

[aipodev@VM01 ~]$ cat .ssh/id_rsa.pub 
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAokbuD0ZUnlN+W21l9lYzmzjwazR6dApHNRUhCW2qqIB4rHFZqNdvf+O/EfaRpiW311O7cOuekxeuclNvrR/woTO46csuhHfH8Eo1SioU0syV3iWh+mvga7l8wBuD0t1WZ4x48qxdVo231FLi7UxDLKpE776TaR+TqlnnyPxOafBht8BzMk8yi7HrP2bKEcjahkE7El7AlBcBNLSHMBK9Loifuq6mNF9FWJ0VRkDxfn9XuvKAs/HPqoyuXJTjWqQEeLiGvv4HMF9FjMCqfQn6RTtCswvf++RIkcNfFgVPnLs4R5cphufsryVsqHEH9w0qoGwhobPhbQOVXa4Luh56+Q== aipodev@ramuda.co.jp
[aipodev@VM01 ~]$

aipodev用のssh設定

aipodevユーザーがGitLabへSSHする際の設定を記述する。

[aipodev@VM01 ~]$ cat .ssh/config
Host (GitLab Server)
User git
Hostname (Gitlab Server)
IdentityFile /home/aipodev/.ssh/id_rsa
[aipodev@VM01 ~]$ chmod 600 .ssh/config <== これをやらないと"Bad owner or permissions on /home/aipodev/.ssh/config"で怒られる

known_hostsは作成しなくてもよいと思います。

aipodev用のgitの設定

gitにアクセスする為の設定を行う。

[aipodev@VM01 ~]$ git config --global user.email "aipodev@ramuda.co.jp"
[aipodev@VM01 ~]$ git config --global user.name "aipodev"

GitLabにaipodevアカウントを作成する

aipodevアカウントでGitLabにSSHアクセスできるようにする為、GitLabにaipodevアカウントを用意する。新規アカウント作成は、GitLabにAdmin(管理者)でログイン後、NewUserをクリックで行う。
04
作成完了したら、右のeditをクリック
05
この後、aipodevアカウントでログインし直すので、パスワードを設定
06
一度GitLabをログアウトして、aipodevユーザーでログインし直す。そしてコピーしておいた公開鍵を登録する。
07

プロジェクトメンバーに追加

Aipoカスタマイズ用のプロジェクトのメンバーにaipodevを追加する。
08

リポジトリをClone

GitLabからクローンします

[aipodev@VM01 ~]$ git clone ssh://git@xxx.xxx.xx.xx:xxxx/kitada/aipo.git
Initialized empty Git repository in /home/aipodev/aipo/.git/
The authenticity of host '[xxx.xxx.xxx.xxx]:xxx ([192.168.???.???]:????)' can't be established.
RSA key fingerprint is 80:42:6b:23:4c:20:6d:33:af:09:7e:69:c2:54:3d:0c.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '[xxx.xxx.xxx.xxx]:xxx,[192.168.???.???]:???' (RSA) to the list of known hosts.
remote: Counting objects: 7314, done.
remote: Compressing objects: 100% (3892/3892), done.
remote: Total 7314 (delta 2752), reused 7302 (delta 2748)
Receiving objects: 100% (7314/7314), 8.93 MiB | 11.11 MiB/s, done.
Resolving deltas: 100% (2752/2752), done.
[aipodev@VM01 ~]$

よし、できた。
ちょっと確認してみる。

[aipodev@VM01 ~]$ ls
aipo
[aipodev@VM01 ~]$ cd aipo/
[aipodev@VM01 aipo]$ ls
README.md  findbugs-exclude.xml   header.txt  lib  pom.xml   sql
core       header-definition.xml  jetspeed    oms  portlets  war
[aipodev@VM01 aipo]$ git status
# On branch master
nothing to commit (working directory clean)
[aipodev@VM01 aipo]$ git log
commit fc4aa260d1db40310d567422cb6dec8a5618944c
Author: Osamu Kitada 
Date:   Fri Aug 1 01:18:01 2014 +0900

    Base Version
    GitHub本家の2014/7/30のリビジョン
[aipodev@VM01 aipo]$

アプリケーションのビルド

データベースの作成

phpPgAdminにアクセスして、「データベースを作成する」をクリックする。
09
それぞれ下記のように入力して作成する。
11
ちなみにCollationとCtypeは社内で実際に稼働中(CentOS6.3)のサーバーにログインして下記のように調べた。
(aipo_postgresは各自のインストール時の設定ユーザー、パスワードは/usr/local/aipo/bin/install.logの最後に記述してある。)

[root@IPD-0185 bin]# ./psql -d org001 -U aipo_postgres
Password for user aipo_postgres: 
psql (8.4.7)
Type "help" for help.

org001=# \l
                                     List of databases
   Name    |     Owner     | Encoding | Collation | Ctype |        Access privileges        
-----------+---------------+----------+-----------+-------+---------------------------------
 org001    | aipo_postgres | UTF8     | C         | C     | 
 postgres  | aipo_postgres | UTF8     | C         | C     | 
 template0 | aipo_postgres | UTF8     | C         | C     | =c/aipo_postgres
                                                          : aipo_postgres=CTc/aipo_postgres
 template1 | aipo_postgres | UTF8     | C         | C     | =c/aipo_postgres
                                                          : aipo_postgres=CTc/aipo_postgres
(4 rows)

org001=#

データベースできた
12
リポジトリにコミット済みのaipo\sql\postgres\org001.sqlをphpPgAdminで実行して、テーブル作成を行う。
org001をクリック
13
「SQL」をクリック
14
「参照」をクリック
15
既にwindowsビルド環境を用意してあるので、c:\home\aipo\GitLab\aipo\sql\postgresに所望のSQLがある。
org001.sqlを選択して、[開く]をクリック
16
実行する
17
エラーが気になるが、テーブルは作成されたみたい。
18
19

データベースの設定確認

aipo\oms\src\main\webapp\WEB-INF\datasource\dbcp-org001.properties
を修正する必要があるが、修正版はすでにGitLabのdevelopブランチにセットアップ済みなので、clone済みのリポジトリで下記を実施する。

[aipodev@VM01 aipo]$ git checkout develop
Branch develop set up to track remote branch develop from origin.
Switched to a new branch 'develop'
[aipodev@VM01 aipo]$

ファイルを調べてみる

[aipodev@VM01 datasource]$ pwd
/home/aipodev/aipo/oms/src/main/webapp/WEB-INF/datasource
[aipodev@VM01 datasource]$ cat dbcp-org001.properties 
#
# Aipo is a groupware program developed by Aimluck,Inc.
# Copyright (C) 2004-2011 Aimluck,Inc.
# http://www.aipo.com
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program.  If not, see .
#

cayenne.dbcp.driverClassName=org.postgresql.Driver
cayenne.dbcp.url=jdbc:postgresql://localhost:5432/org001
cayenne.dbcp.username=postgres
cayenne.dbcp.password=aipo
cayenne.dbcp.maxActive=20
cayenne.dbcp.minIdle=0
cayenne.dbcp.maxIdle=0
cayenne.dbcp.maxWait=10000
[aipodev@VM01 datasource]$

オッケーです。

AIPOビルド

[aipodev@VM01 aipo]$ cd /home/aipodev/aipo/
[aipodev@VM01 aipo]$ mvn install

残念ながら、やはり失敗です。とほほほ
20
なにやり’-e’スイッチで実行すれば糸口が見つかりそうなので、指示どおりに
「mvn -e insall」で再ビルド
21
あれれビルドに成功してしまった。
・・・・怪しい・・・・
まぁいっか。
ダメだったらどうせ起動できないか、どこかでハマるだけだ。
(どうせいつものことだし!)
Go ahead

m(_ _)m 中途半端ですんません。

AIPO起動

warファイルを下記にコピーする

[root@VM01 ~]# cp /home/aipodev/aipo/war/target/aipo.war /var/lib/tomcat6/webapps/

PostgresとTomcat6が稼働中なのを確認後、ブラウザから「http://localhost:8080/aipo/portal」にアクセスしてみる。
aipobuild01
駄目でした。こんな時はログをみる。

[root@VM01 ]# cat /var/log/tomcat6/aipo.log

2014-08-11 14:58:06,168  (http-8080-1) [JetspeedLogger.java:157]- [org001] Failed to retrieve user 'anon'
org.apache.cayenne.CayenneRuntimeException: [v.2.0.4 October 12 2007] Error detecting database type
	at org.apache.cayenne.dba.AutoAdapter.loadAdapter(AutoAdapter.java:164)
	at org.apache.cayenne.dba.AutoAdapter.getAdapter(AutoAdapter.java:136)
	at org.apache.cayenne.dba.AutoAdapter.getExtendedTypes(AutoAdapter.java:261)
	at org.apache.cayenne.access.DataNode.performQueries(DataNode.java:246)
	at org.apache.cayenne.access.DataDomainQueryAction.runQuery(DataDomainQueryAction.java:301)
	at org.apache.cayenne.access.DataDomainQueryAction.access$000(DataDomainQueryAction.java:60)
	at org.apache.cayenne.access.DataDomainQueryAction$1.transform(DataDomainQueryAction.java:273)
	at org.apache.cayenne.access.DataDomain.runInTransaction(DataDomain.java:836)
	at org.apache.cayenne.access.DataDomainQueryAction.runQueryInTransaction(DataDomainQueryAction.java:270)
	at org.apache.cayenne.access.DataDomainQueryAction.execute(DataDomainQueryAction.java:110)
	at org.apache.cayenne.access.DataDomain.onQuery(DataDomain.java:746)
	at org.apache.cayenne.util.ObjectContextQueryAction.runQuery(ObjectContextQueryAction.java:217)
	at org.apache.cayenne.access.DataContextQueryAction.execute(DataContextQueryAction.java:54)
	at org.apache.cayenne.access.DataContext.onQuery(DataContext.java:1395)
	at org.apache.cayenne.access.DataContext.performQuery(DataContext.java:1384)
	at com.aimluck.eip.orm.query.SelectQuery.fetchList(SelectQuery.java:91)
	at com.aimluck.eip.orm.query.AbstractQuery.fetchSingle(AbstractQuery.java:57)
	at com.aimluck.eip.util.ALEipUtils.getTurbineUser(ALEipUtils.java:763)
	at com.aimluck.eip.services.security.ALUserManagement.getUser(ALUserManagement.java:181)
	at org.apache.jetspeed.services.JetspeedUserManagement.getUser(JetspeedUserManagement.java:50)
	at com.aimluck.eip.services.security.ALEipAuthentication.getAnonymousUser(ALEipAuthentication.java:224)
	at org.apache.jetspeed.services.JetspeedAuthentication.getAnonymousUser(JetspeedAuthentication.java:69)
	at org.apache.jetspeed.services.JetspeedSecurity.getAnonymousUser(JetspeedSecurity.java:139)
	at org.apache.jetspeed.modules.actions.TemplateSessionValidator.doPerform(TemplateSessionValidator.java:59)
	at org.apache.jetspeed.modules.actions.JetspeedSessionValidator.doPerform(JetspeedSessionValidator.java:74)
	at com.aimluck.eip.modules.actions.ALSessionValidator.doPerform(ALSessionValidator.java:95)
	at org.apache.turbine.modules.Action.perform(Action.java:87)
	at org.apache.turbine.modules.ActionLoader.exec(ActionLoader.java:122)
	at org.apache.turbine.Turbine.doGet(Turbine.java:521)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at com.aimluck.eip.filter.ALBaseFilter.doFilter(ALBaseFilter.java:90)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at com.aimluck.eip.filter.ALMigrateFilter.doFilter(ALMigrateFilter.java:70)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
	at java.lang.Thread.run(Thread.java:662)
Caused by: org.postgresql.util.PSQLException: FATAL: ���������"postgres"���Ident���������������������������
	at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:291)
	at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:108)
	at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66)
	at org.postgresql.jdbc2.AbstractJdbc2Connection.(AbstractJdbc2Connection.java:125)
	at org.postgresql.jdbc3.AbstractJdbc3Connection.(AbstractJdbc3Connection.java:30)
	at org.postgresql.jdbc3.Jdbc3Connection.(Jdbc3Connection.java:24)
	at org.postgresql.Driver.makeConnection(Driver.java:393)
	at org.postgresql.Driver.connect(Driver.java:267)
	at java.sql.DriverManager.getConnection(DriverManager.java:582)
	at java.sql.DriverManager.getConnection(DriverManager.java:185)
	at org.apache.commons.dbcp.DriverManagerConnectionFactory.createConnection(DriverManagerConnectionFactory.java:75)
	at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582)
	at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:840)
	at org.apache.commons.dbcp.ThreadPoolingDataSource.getConnection(ThreadPoolingDataSource.java:112)
	at org.apache.cayenne.dba.AutoAdapter.loadAdapter(AutoAdapter.java:152)
	... 48 more
2014-08-11 14:58:06,170  (http-8080-1) [JetspeedLogger.java:157]- [org001] Failed to get anonymous user: 
org.apache.cayenne.CayenneRuntimeException: [v.2.0.4 October 12 2007] Error detecting database type
	at org.apache.cayenne.dba.AutoAdapter.loadAdapter(AutoAdapter.java:164)
	at org.apache.cayenne.dba.AutoAdapter.getAdapter(AutoAdapter.java:136)
	at org.apache.cayenne.dba.AutoAdapter.getExtendedTypes(AutoAdapter.java:261)
	at org.apache.cayenne.access.DataNode.performQueries(DataNode.java:246)
	at org.apache.cayenne.access.DataDomainQueryAction.runQuery(DataDomainQueryAction.java:301)
	at org.apache.cayenne.access.DataDomainQueryAction.access$000(DataDomainQueryAction.java:60)
	at org.apache.cayenne.access.DataDomainQueryAction$1.transform(DataDomainQueryAction.java:273)
	at org.apache.cayenne.access.DataDomain.runInTransaction(DataDomain.java:836)
	at org.apache.cayenne.access.DataDomainQueryAction.runQueryInTransaction(DataDomainQueryAction.java:270)
	at org.apache.cayenne.access.DataDomainQueryAction.execute(DataDomainQueryAction.java:110)
	at org.apache.cayenne.access.DataDomain.onQuery(DataDomain.java:746)
	at org.apache.cayenne.util.ObjectContextQueryAction.runQuery(ObjectContextQueryAction.java:217)
	at org.apache.cayenne.access.DataContextQueryAction.execute(DataContextQueryAction.java:54)
	at org.apache.cayenne.access.DataContext.onQuery(DataContext.java:1395)
	at org.apache.cayenne.access.DataContext.performQuery(DataContext.java:1384)
	at com.aimluck.eip.orm.query.SelectQuery.fetchList(SelectQuery.java:91)
	at com.aimluck.eip.orm.query.AbstractQuery.fetchSingle(AbstractQuery.java:57)
	at com.aimluck.eip.util.ALEipUtils.getTurbineUser(ALEipUtils.java:763)
	at com.aimluck.eip.services.security.ALUserManagement.getUser(ALUserManagement.java:181)
	at org.apache.jetspeed.services.JetspeedUserManagement.getUser(JetspeedUserManagement.java:50)
	at com.aimluck.eip.services.security.ALEipAuthentication.getAnonymousUser(ALEipAuthentication.java:224)
	at org.apache.jetspeed.services.JetspeedAuthentication.getAnonymousUser(JetspeedAuthentication.java:69)
	at org.apache.jetspeed.services.JetspeedSecurity.getAnonymousUser(JetspeedSecurity.java:139)
	at org.apache.jetspeed.modules.actions.TemplateSessionValidator.doPerform(TemplateSessionValidator.java:59)
	at org.apache.jetspeed.modules.actions.JetspeedSessionValidator.doPerform(JetspeedSessionValidator.java:74)
	at com.aimluck.eip.modules.actions.ALSessionValidator.doPerform(ALSessionValidator.java:95)
	at org.apache.turbine.modules.Action.perform(Action.java:87)
	at org.apache.turbine.modules.ActionLoader.exec(ActionLoader.java:122)
	at org.apache.turbine.Turbine.doGet(Turbine.java:521)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at com.aimluck.eip.filter.ALBaseFilter.doFilter(ALBaseFilter.java:90)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
rethrown as 
org.apache.jetspeed.services.security.UserException: Failed to retrieve user 'anon': [v.2.0.4 October 12 2007] Error detecting database type
	at com.aimluck.eip.services.security.ALUserManagement.getUser(ALUserManagement.java:194)
	at org.apache.jetspeed.services.JetspeedUserManagement.getUser(JetspeedUserManagement.java:50)
	at com.aimluck.eip.services.security.ALEipAuthentication.getAnonymousUser(ALEipAuthentication.java:224)
	at org.apache.jetspeed.services.JetspeedAuthentication.getAnonymousUser(JetspeedAuthentication.java:69)
	at org.apache.jetspeed.services.JetspeedSecurity.getAnonymousUser(JetspeedSecurity.java:139)
	at org.apache.jetspeed.modules.actions.TemplateSessionValidator.doPerform(TemplateSessionValidator.java:59)
	at org.apache.jetspeed.modules.actions.JetspeedSessionValidator.doPerform(JetspeedSessionValidator.java:74)
	at com.aimluck.eip.modules.actions.ALSessionValidator.doPerform(ALSessionValidator.java:95)
	at org.apache.turbine.modules.Action.perform(Action.java:87)
	at org.apache.turbine.modules.ActionLoader.exec(ActionLoader.java:122)
	at org.apache.turbine.Turbine.doGet(Turbine.java:521)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at com.aimluck.eip.filter.ALBaseFilter.doFilter(ALBaseFilter.java:90)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at com.aimluck.eip.filter.ALMigrateFilter.doFilter(ALMigrateFilter.java:70)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
	at java.lang.Thread.run(Thread.java:662)

長くてよくわからんが、Caused by: org.postgresql.util.PSQLException: FATAL: ���������”postgres”���Ident�������
とかなってるんで、PostgreSQLの接続でコケてるんではないだろうか?

JDBCをしらべる

Tomcat6とJDBCドライバの連携を調べてみる。

[root@VM01 ~]# rpm -lq postgresql-jdbc
/etc/maven/fragments/postgresql-jdbc
/usr/share/doc/postgresql-jdbc-8.4.701
/usr/share/doc/postgresql-jdbc-8.4.701/LICENSE
/usr/share/doc/postgresql-jdbc-8.4.701/README
/usr/share/doc/postgresql-jdbc-8.4.701/pgjdbc.xml
/usr/share/java/postgresql-jdbc-8.4.701.jar
/usr/share/java/postgresql-jdbc.jar
/usr/share/java/postgresql-jdbc2.jar
/usr/share/java/postgresql-jdbc2ee.jar
/usr/share/java/postgresql-jdbc3.jar
/usr/share/maven2/poms/JPP-postgresql-jdbc.pom
[root@VM01 ~]#

/usr/share/java以下にインストールされたようだが、Tomcat6はどうなっているんでしょう

[root@VM01 ~]# ls /usr/share/tomcat6/lib/
annotations-api-6.0.24.jar  catalina.jar             jasper.jar                 tomcat-i18n-fr.jar
annotations-api.jar         commons-collections.jar  log4j.jar                  tomcat-i18n-ja-6.0.24.jar
catalina-6.0.24.jar         commons-dbcp.jar         mx4j-jmx.jar               tomcat-i18n-ja.jar
catalina-ant-6.0.24.jar     commons-pool.jar         mx4j-remote.jar            tomcat-juli.jar
catalina-ant.jar            extras                   tomcat-coyote-6.0.24.jar   tomcat6-el-2.1-api-6.0.24.jar
catalina-ha-6.0.24.jar      jasper-6.0.24.jar        tomcat-coyote.jar          tomcat6-jsp-2.1-api-6.0.24.jar
catalina-ha.jar             jasper-el-6.0.24.jar     tomcat-i18n-es-6.0.24.jar  tomcat6-servlet-2.5-api-6.0.24.jar
catalina-tribes-6.0.24.jar  jasper-el.jar            tomcat-i18n-es.jar
catalina-tribes.jar         jasper-jdt.jar           tomcat-i18n-fr-6.0.24.jar
[root@VM01 ~]# ls /usr/share/tomcat6/lib/ | grep postgres
[root@VM01 ~]# [root@VM01 ~]# cd /usr/share/tomcat6/lib
[root@VM01 lib]# ln -s /usr/share/java/postgresql-jdbc-8.4.701.jar ./postgresql-jdbc-8.4.701.jar
[root@VM01 lib]# ll | grep jdbc
lrwxrwxrwx. 1 root root      43  8月 11 16:37 2014 postgresql-jdbc-8.4.701.jar -> /usr/share/java/postgresql-jdbc-8.4.701.jar
[root@VM01 lib]#

jdbc関連のjarが存在していないので、シンボリックリンクをはる。

[root@VM01 ~]# cd /usr/share/tomcat6/lib
[root@VM01 lib]# ln -s /usr/share/java/postgresql-jdbc-8.4.701.jar ./postgresql-jdbc-8.4.701.jar
[root@VM01 lib]# ll | grep jdbc
lrwxrwxrwx. 1 root root      43  8月 11 16:37 2014 postgresql-jdbc-8.4.701.jar -> /usr/share/java/postgresql-jdbc-8.4.701.jar
[root@VM01 lib]#

Tomcat6を再起動

[root@VM01 ~]# service tomcat6 restart
Stopping tomcat6:                                          [  OK  ]
Starting tomcat6:                                          [  OK  ]

ブラウザでアクセスするも、やっぱりだめ。
再びログをチェックする。

Caused by: org.postgresql.util.PSQLException: ERROR: リレーション"jetspeed_user_profile"は存在しません
  Position: 13

jetspeed_user_profileが無いっておこられているようだ。やっぱり。。。。DB作成でうまくできていないようなので、やり直しします。

org001を一旦削除

[root@VM01 ~]# su - postgres
-bash-4.1$ dropdb org001

org001を作成する

-bash-4.1$ createdb -E UTF-8 org001 -U postgres

SQLを実行する。

[root@VM01 ~]# psql -U postgres -d org001 -f /home/aipodev/aipo/sql/postgres/org001.sql 
psql:/home/aipodev/aipo/sql/postgres/org001.sql:30: NOTICE:  CREATE TABLE / PRIMARY KEYはテーブル"aipo_license"に暗黙的なインデックス"aipo_license_pkey"を作成します
CREATE TABLE
psql:/home/aipodev/aipo/sql/postgres/org001.sql:43: NOTICE:  CREATE TABLE / PRIMARY KEYはテーブル"turbine_permission"に暗黙的なインデックス"turbine_permission_pkey"を作成します
psql:/home/aipodev/aipo/sql/postgres/org001.sql:43: NOTICE:  CREATE TABLE / UNIQUEはテーブル"turbine_permission"に暗黙的なインデックス"turbine_permission_permission_name_key"を作成します
CREATE TABLE

  (中略)

INSERT 0 1
INSERT 0 1
INSERT 0 1
INSERT 0 1
 setval 
--------
     12
(1 行)

[root@VM01 ~]#

コマンドラインでやったら、エラーにならなかった。
よし、もう一度。

PostgreSQLとTomcat6を再起動する。

[root@VM01 ~]# service postgresql restart
postgresql サービスを停止中:                               [  OK  ]
postgresql サービスを開始中:                               [  OK  ]
[root@VM01 ~]# service tomcat6 restart
Stopping tomcat6:                                          [  OK  ]
Starting tomcat6:                                          [  OK  ]

ブラウザでアクセスしてみる。
aipobuild02
オッケー

One thought on “AIPOビルド環境構築(CentOS6)

コメントを残す

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です

*

次のHTML タグと属性が使えます: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>