2.1.1 顧客管理のOracleデータベース
通常のOracleデータベースをメタデータ・ストアとして使用するには、
/u01/app/osa/osa-base/etc
フォルダ内のjetty-osa-datasource.xml
ファイルを編集します。
ノート:
OSAを新しいメタデータ・ストアに対して構成した後で、次のsqlを同じユーザー/スキーマに対して実行します。UPDATE osa_system_property SET value="true" where mkey="osa.oci.instance"
。
次のステップに従って、Oracleデータベースをメタデータ・ストアとして使用します:
- コマンド
sudo systemctl stop osa
を実行してGGSAを停止します。 - 次に示すように、
jetty-osa-datasource.xml
ファイル内のMySQLセクションをコメント化します。<?xml version="1.0"?> <!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd"> <Configure id="Server" class="org.eclipse.jetty.server.Server"> <!-- <New id="osads" class="org.eclipse.jetty.plus.jndi.Resource"> <Arg> <Ref refid="wac"/> </Arg> <Arg>jdbc/OSADataSource</Arg> <Arg> <New class="com.mysql.cj.jdbc.MysqlConnectionPoolDataSource"> <Set name="URL">jdbc:mysql://localhost:3306/OSADB</Set> <Set name="User">osa</Set> <Set name="Password"> <Call class="org.eclipse.jetty.util.security.Password" name="deobfuscate"> <Arg>OBF:{OBFUSCATED_PASSWORD}</Arg> </Call> </Set> <Set name="maxAllowedPacket">209715200</Set> <Set name="allowPublicKeyRetrieval">true</Set> </New> </Arg> </New> --> </Configure>
- コメント化したセクションのすぐ後にOracleデータベース用の次のセクションを追加します。
<New id="osads" class="org.eclipse.jetty.plus.jndi.Resource"> <Arg> <Ref refid="wac"/> </Arg> <Arg>jdbc/OSADataSource</Arg> <Arg> <New class="oracle.jdbc.pool.OracleDataSource"> <Set name="URL">jdbc:oracle:thin:@myhost.example.com:1521:XE</Set> <Set name="User">osa</Set> <Set name="Password"> <Call class="org.eclipse.jetty.util.security.Password" name="deobfuscate"> <Arg>OBF:{OBFUSCATED_PASSWORD}}</Arg> </Call> </Set> <Set name="connectionCachingEnabled">true</Set> <Set name="connectionCacheProperties"> <New class="java.util.Properties"> <Call name="setProperty"><Arg>MinLimit</Arg><Arg>1</Arg></Call> <Call name="setProperty"><Arg>MaxLimit</Arg><Arg>15</Arg></Call> <Call name="setProperty"><Arg>InitialLimit</Arg><Arg>1</Arg></Call> </New> </Set> </New> </Arg> </New>
- OSAスキーマのユーザー名およびプレーン・テキストのパスワードを決定します。たとえば、スキーマ・ユーザー名をosa、パスワードをalphagoとします。
ディレクトリを
/u01/app/osa/lib
に変更し、次のコマンドを実行します:java -cp ./jetty-util-9.4.17.v20190418.jar org.eclipse.jetty.util.security.Password osa <your password>
たとえば、
java -cp ./jetty-util-9.4.17.v20190418.jar org.eclipse.jetty.util.security.Password osa alphago
コンソールに次のような結果が表示されます:
2019-06-18 14:14:45.114:INFO::main: Logging initialized @1168ms to org.eclipse.jetty.util.log.StdErrLogalphago
OBF:obfuscated password
MD5:34d0a556209df571d311b3f41c8200f3
CRYPT:osX/8jafUvLwA
表示される不明瞭化されたパスワード文字列(太字で表示)をクリップボードまたはメモ帳にコピーしてノートにとります。
- ステップ3でコード内に太字で示されたデータベース・ホスト、ポート、SID、osaスキーマ・ユーザー名およびosaスキーマ・パスワードの各フィールドを変更します。
- 次のステップでは、メタデータ・ストアを初期化して、ユーザーosaadminのパスワードを設定します。
ノート:
このステップを実行するには、sysdba権限を含むデータベース管理者資格証明が必要です。- ディレクトリを
/u01/app/osa/osa-base/bin
に変更します ./start-osa.sh dbroot=<db sys user> dbroot_password=<db sys password> osaadmin_password=${OSA_ADMIN_PASSWORD}
を実行します./stop-osa.sh
を実行しますsudo systemctl start osa
を実行して、GGSAをシステム・サービスとして開始します
- ディレクトリを