AipoはTomcat上で動作するグループウェアである。データベースはPostgreSQLを使用する。ここで注意が2点
&color(red){・そのままインストールするとポート80を使用するのでApache等Webサーバとバッティングする
・PostgreSQLもインストールディレクトリに新しいSQLサーバをインストールするのでPostgreSQLがすでにインストールされているとポートが5432には既存のPostgreSQLAipo用は別途別ポートが指定される~};
今回はこれら考慮し以下のように設定
Aipo5をここからDownload
$ tar zxvf aipo5020ja_linux.tar.gz $ cd aipo5020ja_linux $ su # cp -a aipo /usr/local/ # cd /usr/local/aipo/bin
ここでそのままインストールするとポートが80になるので以下のファイルを変更し、ポート81に指定する。
/usr/local/aipo/bin/utf8/installer.sh
「s_port_num=80」を「s_port_num=81」に変更
# chmod a+x installer.sh
メッセージ等がUTF-8なのでターミナルをutf-8に変更
# /installer.sh install directory is /usr/local/aipo/. utf8 install directory is /usr/local/aipo/. aipo_postgres home directory exists checking bashrc... file exists (略) ALTER ROLE /usr/local/aipo/. waiting for postmaster to shut down.... done postmaster stopped ==Aipo5.0.2.0インストール終了== user:aipo_postgres <=PostgreSQL用ユーザとしてLinuxユーザを設定される pass:e74BQzNYNUjq <=上記のユーザのパスワード directory:/usr/local/aipo/./postgres port:5433 <=PostgreSQLが動作しているときは別のPostgresを立ち上げる Aipo URL: http://10.99.99.185:81/aipo/
インストールログはaipo/bin/install.logに残る postgresqlのユーザ、パスワードもログの最後記述されている
# cd /usr/local/aipo/bin # ./startup.sh postmaster starting found temp directory Starting Aipo Version 5.0.2.0 Aipo URL: http://10.99.99.185:81/aipo/
Webでアクセスして起動を確認する。 設定はすべてWeb上から
管理者Default :admin パスワード :admin
# ./shutdown.sh waiting for postmaster to shut down..... done postmaster stopped Shutdown Aipo.
httpd.confの最後に追加
LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
<Location /aipo/>
ProxyPass ajp://localhost:8009/aipo/
</Location>
Apacheとのコネクタポートは8009がデフォルトそれはaipo/tomcat/conf/server.xml に以下のように書かれている。
<!-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 -->
<Connector port="8009"
enableLookups="false" redirectPort="8443" debug="0"
protocol="AJP/1.3" />
従来のアクセスポート81をコメントアウト
server.xml
<!-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8080 -->
<!-- <==追加
<Connector port="81"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" redirectPort="8443" acceptCount="100"
debug="0" connectionTimeout="20000"
disableUploadTimeout="true" />
--> <==追加
<!-- Note : To disable connection timeouts, set connectionTimeout value
to 0 -->
Aipo,Apache再起動
TomcatではSSLは秘密鍵と証明書をpkcs12で1つのファイル(keystore)にする。これを利用する
自分でCA(認証局)を作成にあるように証明書作成してから
秘密鍵と証明書をpkcs12で1つのファイル(keystore)にする
# openssl pkcs12 -export -inkey newkey.pem -in newcert.pem -out keystore.p12 Enter Export Password: Verifying - Enter Export Password:
aipo/tomcat/conf/server.xmlを変更する
<!-- <==削除
<Connector port="8443"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" disableUploadTimeout="true"
acceptCount="100" debug="0" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS"
keystoreType="PKCS12" <=追加
keystoreFile="/home/okada/mk_ssl_key/keystore.p12" <=追加
keystorePass="*****" /> <=追加(keystore作成時のパスワード)
--> <==削除
# cd /usr/local/aipo/bin # sh shutdown.sh
# rm -rf /usr/local/aipo
# /usr/sbin/userdel -r aipo_postgres
/usr/local/aipo/tomcat/webapps/aipo/WEB-INF/conf/JetspeedJResources.properties
181行目 変更前 action.login.enable.select.userlist=true 変更後 action.login.enable.select.userlist=false
DBについてテーブル等確認したかったが不明
(ユーザ名postgresでパスワードなし)
$ psql -p 5433 postgres -U aipo_postgres0
postgres=# select * from pg_database;
datname | datdba | encoding | datistemplate | datallowconn | datconnlimit | datlastsysoid | datvacuumxid | datfrozenxid | dattablespace | datconfig | datacl
-----------+--------+----------+---------------+--------------+--------------+---------------+--------------+--------------+---------------+-----------+------------------------------------
postgres | 10 | 6 | f | t | -1 | 10792 | 499 | 499 | 1663 | |
org001 | 10 | 6 | f | t | -1 | 10792 | 499 | 499 | 1663 | |
template1 | 10 | 6 | t | t | -1 | 10792 | 499 | 499 | 1663 | | {aipo_postgres0=CT/aipo_postgres0}
template0 | 10 | 6 | t | f | -1 | 10792 | 499 | 499 | 1663 | | {aipo_postgres0=CT/aipo_postgres0}
(4 行)