Confluence 5.6 のサポートは終了しています。
ドキュメントの最新バージョンを確認してください。
このページは、Confluence を設定して Oracle データベースを利用する方法を解説します。セットアップ手順には、Oracle サーバーと Confluence サイトの設定が含まれます。
始める前に、以下の内容を確認します:
If you do not already have an operational Oracle database server, download the installation package from the Oracle download page and follow the instructions in the Oracle documentation.
次に、以下の手順に従い、Confluence を Oracle サーバーのスキーマに展開します。
Note: Your database should be configured to use the same character encoding as Confluence. The recommended encoding is AL32UTF8 (the Oracle equivalent of Unicode UTF-8). See Configuring Database Character Encoding.
このステップでは、Oracle で Confluence ユーザーを作成し、ユーザーがコネクションをセットアップしたり、自身のスキーマにオブジェクトを作成したり、スキーマを設定したりできるように、適切な役割を与えます。
ユーザーを作成し、権限を割り当てる方法:
Access the command line interface to Oracle via the 'sqlplus' command.
sqlplus user/password <as sysdba|as sysoper>
You must add the 'as sysdba' or 'as sysoper' option if you are logging in with the user 'sys'. This determines which sys role you are using.
Once logged in, you can type arbitrary SQL commands.
Create a Confluence user (<user>) in Oracle, and grant the appropriate roles only to the user:
connect role is required to set up a connection.resource role is required to allow the user to create objects in its own schema. Create table, sequence and trigger are required to configure the schema.
create user <user> identified by <password> default tablespace <tablespace_name> quota unlimited on <tablespace_name>; grant connect to <user>; grant resource to <user>; grant create table to <user>; grant create sequence to <user>; grant create trigger to <user>;
メモ:
Do not grant the user the select any table permission. That permission can cause problems with other schemas. See the bug report CONF-3613.
When you create a user, specify the tablespace for the table objects as shown above.
Add a local all_objects view to the user's schema, to prevent a conflict that can occur when a table exists in another schema with the same name as one of the Confluence tables. This is a workaround for the bug CONF-3613:
create view <user>.all_objects as
select *
from sys.all_objects
where owner = upper('<user>');
まだ行っていないのであれば、Confluence をインストールしましょう。Confluence インストールガイドを参照して下さい。お使いのブラウザで Confluence セットアップウィザードを開く前に、インストレーション後すぐに中断して次のステップに従います。
既に Confluence セットアップウィザードの途中まで進んだ場合、データベースセットアップのステップで止めて、以下のステップに従います。後で、同じ所から再びセットアップウィザードを再開できます。
Oracle 用の JDBC Thin ドライバーは、3種類のスタイルの URL を使用します。
新しいスタイル:
jdbc:oracle:thin:@//[HOST][:PORT]/SERVICE
古いスタイル
jdbc:oracle:thin:@[HOST][:PORT]:SID
「tnsnames」スタイル
jdbc:oracle:thin:@(DESCRIPTION=
(SDU=32768)
(enable=broken)
(LOAD_BALANCE=yes)
(FAILOVER=yes)
(ADDRESS=
(PROTOCOL=TCP)
(HOST=dbserver1.example.com)
(PORT=1525))
(ADDRESS=
(PROTOCOL=TCP)
(HOST=dbserver2.example.com)
(PORT=1525))
(CONNECT_DATA=
(SERVICE_NAME=CONFDB)))
メモ:
tnsnames style is required for connecting to an Oracle RAC cluster. For easy reading, we have split the example above over multiple lines, but you should compact it into a single line. These values may need more analysis than documented here, so you should seek the assistance of an experienced DBA.ホスト、ポート、サービス名、および/または SID を決定するには、Oracle を実行しているユーザーで以下のコマンドを実行します(デフォルトでは、「oracle」ユーザー)。
lsnrctl status
参考として、サンプル出力を以下に示します。
SNRCTL for Linux: Version 11.2.0.2.0 - Beta on 29-JUN-2012 15:20:59 Copyright (c) 1991, 2010, Oracle. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_XE))) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 11.2.0.2.0 - Beta Start Date 06-JUN-2012 08:36:34 Uptime 23 days 6 hr. 44 min. 25 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Default Service XE Listener Parameter File /u01/app/oracle/product/11.2.0/xe/network/admin/listener.ora Listener Log File /u01/app/oracle/diag/tnslsnr/<HOSTNAME>/listener/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC_FOR_XE))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=<HOSTNAME>)(PORT=1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=<HOSTNAME>)(PORT=8080))(Presentation=HTTP)(Session=RAW)) Services Summary... Service "PLSExtProc" has 1 instance(s). Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service... Service "XE" has 1 instance(s). Instance "XE", status READY, has 1 handler(s) for this service... Service "XEXDB" has 1 instance(s). Instance "XE", status READY, has 1 handler(s) for this service... The command completed successfully
メモ:
PROTOCOL=tcp, without Presentation=HTTP.Services Summary, each service which has an instance with READY status is a connectable service. The name following Service is a service name for connecting to the database name following Instance on the next line.$ORACLE_SID variable when you have sourced the Oracle environment to your shell.For example, assuming that you are running Confluence on the same server as the Oracle database, with the above lsnrctl status output, you would use one of the following URLs:
jdbc:oracle:thin:@//localhost:1521/XE jdbc:oracle:thin:@localhost:1521:XE
この URL は、直接の JDBC 接続や Tomcat データソースで使用したりすることができます。
For further information on Oracle JDBC URLs, see the Oracle JDBC FAQ.
Oracle への接続方法として JDBC 直接接続またはデータソース接続のどちらを使用するかを、利用環境に合わせて決めておいてください。不明であれば、JDBC への直接接続を選択します。
JDBC への直接接続をセットアップするには:
MySQL に対する Oracle の直接接続をセットアップする予定であれば、Oracle JDBC ドライバーをお使いの Confluence インストレーションにコピーする必要があります。
<Confluence installation>/confluence/WEB-INF/lib folder in your new Confluence installation.データソース接続をセットアップするには:
If you plan to set up a datasource connection to Oracle, follow the steps described in Configuring an Oracle Datasource in Apache Tomcat.
Confluence を起動して、お使いのブラウザの Confluence セットアップウィザードに行きます。ステップに従い、新しい設定をセットアップします:
confluenceuser) and password you chose when adding the Confluence database to Oracle.java:comp/env/jdbc/confluence.おめでとうございます!Confluence は、そのデータ保管に Oracle データベースを利用するようになりました。
<CONFLUENCE-INSTALLATION>/logs and <CONFLUENCE-HOME>/logs).