*Aipo(アイポ) [#m7a2750b] RIGHT:更新日&lastmod(); **Aipo5 [#tcc29d09] AipoはTomcat上で動作するjava サーブレットのグループウェアである。データベースはPostgreSQLを使用する。ここで注意が2点 &color(red){・そのままインストールするとポート80を使用するのでApache等Webサーバとバッティングする~ ・PostgreSQLもインストールディレクトリに新しいSQLサーバをインストールするのでPostgreSQLがすでにインストールされているとポートが5432には既存のPostgreSQLAipo用は別途別ポートが指定される~}; 今回はこれら考慮し以下のように設定 -ポート80にアクセスし、ApacheのProxyを利用してApache、Aipoが両方利用できるようにする。 -SSLはPort8443を利用する(Aipoデフォルト) ***インストール [#v498dc03] Aipo5を[[ここ:http://aipostyle.com/]]からDownload $ tar zxvf aipo5020ja_linux.tar.gz $ cd aipo5020ja_linux $ tar zxvf aipo5020.tar.gz $ su # cp -a aipo /usr/local/ # cd /usr/local/aipo/bin &color(red){ここでそのままインストールするとポートが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に変更 Vine4.xでは新しいユーザでloginしてrootにならないとインストール時文字コードの関係でpostgresqlでエラーしてinstallしても動作しなない(原因別途追究の必要あり、今回手ぬき) # /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のユーザ、パスワードもログの最後記述されている ***起動 [#h6f3ce8d] # 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 ***終了 [#mab9b50b] # ./shutdown.sh waiting for postmaster to shut down..... done postmaster stopped Shutdown Aipo. **Apacheと連携 [#a931766d] 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再起動 **SSLの利用 [#e107cc4a] TomcatではSSLは秘密鍵と証明書をpkcs12で1つのファイル(keystore)にする。これを利用する [[自分でCA(認証局)を作成>Linux Memo/SSL証明書#CA]]にあるように証明書作成してから ***keystoreの作成 [#x7187cba] 秘密鍵と証明書をpkcs12で1つのファイル(keystore)にする -newkey.pem:PEM形式の秘密鍵 -newcert.pem:PEM形式の公開鍵 # 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作成時のパスワード) --> <==削除 **その他設定 [#q47d9443] ***Aipoのアンインストール [#j19637e2] -''アイポの停止''~ アイポを削除する前にアイポを必ず停止 # cd /usr/local/aipo/bin # sh shutdown.sh -''アイポのフォルダを削除''~ アイポを展開したフォルダごと削除 # rm -rf /usr/local/aipo -''データベース接続用ユーザーの削除''~ アイポインストール時に自動的に作成~ 「aipo_postgres」というlinuxユーザーを削除 # /usr/sbin/userdel -r aipo_postgres ***Login画面でユーザ名を非表示 [#b9e4e213] /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について [#u4f347eb] PostgreSQLのDBについては今回作成された aipo_postgres0にユーザを変更 # su aipo_postgres ''DBを確認'' $ psql -p 5433 postgres パスワード: <=install時の自動作成されたパスワードを入力 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 行) ''テーブルの確認'' $ psql -p 5433 org001 org001=# \z Access privileges for database "org001" Schema | Name | Type | Access privileges -------+--------------------------------------------------+----------+------------------- public | aipo_license | table | public | aipo_license_license_id_seq | sequence | public | eip_facility_group | table | public | eip_facility_group_id_seq | sequence | public | eip_m_address_group | table | public | eip_m_address_group_group_id_seq | sequence | public | eip_m_addressbook | table | public | eip_m_addressbook_address_id_seq | sequence | public | eip_m_addressbook_company | table | public | eip_m_addressbook_company_company_id_seq | sequence | public | eip_m_company | table | (略) 以下のようなエラーが出たらユーザを一度rootに戻し再度su aipo_postgresを行う ERROR: invalid byte sequence for encoding "UTF8": 0xa5