JIRA の HSQLDB への接続
These instructions will help you connect JIRA to an HSQL database.
はじめる前に
HSQLDB を本番環境に使わないでください
JIRA ships with a built-in HSQLDB (HyperSQL DataBase) database. While this database is suitable for evaluation purposes, it is susceptible to data loss during system crashes. Hence, for production environments we strongly recommend that you configure JIRA to use an external database. See our list of supported databases on Supported Platforms.
- If you are Migrating JIRA to Another Server, create an export of your data as an XML backup. You will then be able to transfer data from your old database to your new database, as described in Switching databases.
1. HSQLDB ドライバーをアプリケーションサーバーへコピーします (JIRA WAR 限定)
Skip this step if you installed a 'Recommended' distribution of JIRA, which includes the HSQL JDBC driver. The JIRA WAR distribution does not include this driver.
- Download the HSQLDB JDBC driver — hsqldb-1.8.0.5.jar for JIRA 3.7+, or hsqldb-1.7.1-patched.jar for JIRA 3.6.5 and earlier. We strongly recommend upgrading to 3.7 if you wish to use hsqldb, as hsqldb 1.7.x is prone to data corruption.
- Add the HSQLDB JDBC driver jar to the
lib/
directory.
4. HSQL データベースに接続するように JIRA サーバーを設定します
ご使用の HSQL データベースに接続するために JIRA サーバーを設定するには、次の3つの方法があります。
- Using the JIRA setup wizard (not applicable to JIRA WAR) — Use this method, if you have just installed JIRA and are setting it up for the first time. Your settings will be saved to the
dbconfig.xml
file in your JIRA Home Directory. - Using the JIRA configuration tool (not applicable to JIRA WAR) — Use this method, if you have an existing JIRA instance. Your settings will be saved to the
dbconfig.xml
file in your JIRA Home Directory. - Manually — Only use this method if you have a JIRA WAR instance or you have a console-only connection to your JIRA server. You will be required to manually update the
dbconfig.xml
file in your JIRA Home Directory.
各設定手法の手順説明
JIRA セットアップ ウィザード
ブラウザから初めて JIRA にアクセスすると、JIRA setup wizard が表示されます。
- 最初の画面の '言語とデータベースの設定' で、 データベース接続 を JIRA 同梱 データベース に設定します。
- セットアップ ウィザードの次の手順へ進みます。セットアップ ウィザードが自動的に同梱 HSQL データベースを設定してくれます。
JIRA 設定ツール
- 次のように JIRA 設定ツールを実行します。
- Windows: Open a command prompt and run
config.bat
in thebin
sub-directory of the JIRA Installation Directory. - Linux/Unix: Open a console and execute
config.sh
in thebin
sub-directory of the JIRA Installation Directory.This may fail with the error as described in our Unable to Start JIRA applications Config Tool due to No X11 DISPLAY variable was set error KB article. Please refer to it for the workaround.
- Windows: Open a command prompt and run
- データベース タブへ進み、データベースの種類 を HSQL に設定します。
- Test your connection and save. The JIRA configuration tool will configure your bundled HSQL database automatically.
This tool adds the following elements to thedbconfig.xml
, which are normally required when running JIRA with HSQLDB:
<min-evictable-idle-time-millis>4000</min-evictable-idle-time-millis>
<time-between-eviction-runs-millis>5000</time-between-eviction-runs-millis>
- Jira を再起動します。
手動
- Locate the
dbconfig.xml
file at the root of your JIRA Home Directory.- If this file does not exist, create the file, copy and paste the example XML code (shown below) into this file.
- Update the file, as described in the Database connection fields section below. Escape any '
&
' characters by adding 'amp;
' to the end of each one.- Note, the
<database-type/>
element must specify your type of database, e.g.hsql
. If you forget to do this and you start JIRA, your database tables may be created incorrectly. See Incorrect database type specified if this happens to you.
- Note, the
- ファイルを保存し、Jira を再起動します。
データベース接続フィールド
フィールド名 | dbconfig.xml | 説明 |
---|---|---|
ホスト名 | Located in the | (JIRA のデータ保存先である) HSQL データベースの名前。 |
データベース |
| HSQL サーバーがインストールされたマシンの名前または IP アドレス。 |
ユーザ名 | Located in the | The user that JIRA uses to connect to the HSQL server. You should have created this in Step 1 above. |
パスワード | Located in the <password> tag (see bold text in example below):<password> </password> | ユーザーのパスワード — HSQL サーバーの認証に使われます。 |
スキーマ | Located in the <schema-name> tag (see bold text in example below):<schema-name> PUBLIC</schema-name> | HSQL デーベースが使用するスキーマの名前。 |
dbconfig.xml ファイルのサンプル
For more information about the child elements of <jdbc-datasource/>
beginning with pool
in the dbconfig.xml
file above, see Tuning Database Connections.
<?xml version="1.0" encoding="UTF-8"?>
<jira-database-config>
<name>defaultDS</name>
<delegator-name>default</delegator-name>
<database-type>hsql</database-type>
<schema-name>PUBLIC</schema-name>
<jdbc-datasource>
<url>jdbc:hsqldb:C:\Data\JIRA 5.2.7/database/jiradb</url>
<driver-class>org.hsqldb.jdbcDriver</driver-class>
<username>sa</username>
<password></password>
<pool-min-size>20</pool-min-size>
<pool-max-size>20</pool-max-size>
<pool-max-wait>30000</pool-max-wait>
<min-evictable-idle-time-millis>4000</min-evictable-idle-time-millis>
<time-between-eviction-runs-millis>5000</time-between-eviction-runs-millis>
<pool-max-idle>20</pool-max-idle>
<pool-remove-abandoned>true</pool-remove-abandoned>
<pool-remove-abandoned-timeout>300</pool-remove-abandoned-timeout>
</jdbc-datasource>
</jira-database-config>
4. JIRA を起動する
以上で、JIRA を HSQL データベースに 接続する設定ができたはずです。では、起動してみましょう!
- JIRA の『推奨』ディストリビューションを使用している場合は、起動後、エラーがないかどうかログを観察します。
- JIRA WAR ディストリビューションを使用している場合は、アプリケーションサーバーでウェブアプリケーションを再構築・再展開します。
その他の注意事項