Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Removed translated content for 'zh'
Sv translation
languageen


Info

This guide describes how to install BellaDati WAR on Tomcat. BellaDati supports Tomcat 8.5.x and Tomcat 9.0.x versions. We recommend to use Tomcat 9.0.


Tip

Tip for Windows users:
We recommend using the 32-bit/64-bit Windows Service Installer, which allows you to run BellaDati as a Windows service.


Warning
The BellaDati WAR file is the BellaDati application packaged in a WAR archive. It must be deployed into an existing application server and needs to be connected to a data warehouse running on an existing database server.

Before You Begin

Please read the following important notes before you begin installing BellaDati on Tomcat:

  • Make sure you have the right version of Java. See Installing Java for more details.
  • Deploying multiple BellaDati WAR application in a single Tomcat container is not supported. We do not test this configuration and updating any of the applications (even for point releases) is likely to break it.
  • We recommend not deploying any other applications in the same Tomcat container that runs BellaDati, especially if these other applications have large memory requirements or require additional libraries in Tomcat's lib sub-directory. Multiple applications in a container can impact stability as a crash in one application could make the entire container inaccessible. Additionally, in order to update or reconfigure any of the applications, you'll need to restart the whole container.

1. Setup data warehouse

Please follow the instructions on the Setting up the PostgreSQL Database page.

2. Download and extract BellaDati WAR Archive

Download the BellaDati WAR distribution as a ZIP archive from the BellaDati download page and extract its content using a tool such as 7-Zip for Windows or Linux's GNU tar tools. Only one of the files in the ZIP archive is used for this setup - belladati.war.

(warning)  Avoid using Windows' built-in file extraction tool! This tool silently fails to extract files with long names. Other users have also reported problems with WinRAR.

(warning)  Avoid using Solaris' default tar utility! Please use GNU tar on this operating system to extract BellaDati, as GNU tar handles long file names better.

3. Configure BellaDati WAR

Since version 2.7.14 there is no special configuration change needed, however, there are several advanced settings (e.g. enforcing the SSL), which are configurable in application.properties only.

Info

Configuration settings are explained in detail in the BellaDati WAR Configuration Overview.

4. Configure Tomcat

4.1 Configure Tomcat Context

A BellaDati context needs to be set up in Tomcat. To do this:

  1. Create the directory structure conf/Catalina/localhost/ within your Tomcat installation directory if it doesn't already exist.
  2. Create the belladati.xml file and copy it to conf/Catalina/localhost subdirectory of your Tomcat installation directory (created in the previous step).

    Code Block
    <Context docBase="path/to/belladati.war" debug="0" useHttpOnly="true">
      <Parameter name="tapestry.context-path" value="/belladati" override="false"/>
    </Context>
    


  3. Update the docBase attribute in the first line to match your system configuration.

If you are installing in Windows, make sure that the paths you specify for the location of the WAR file and database are full paths with drive letters (e.g. C:\path\to\belladati.war).

  1. Add following Java System Properties to JAVA_OPTS existing parameters. If added, these parameters will overwrite default application.properties within belladati.war
  2. Java System Properties to add to JAVA_OPTS are:

    Property with valueNote
    -Djdbc.password=passwordpassword to belladati_db in Postgres.For production use your own values.
    -Djdbc.username=belladati_dbuserusername to belladati_db in Postgres.For production use your own values.
    -Djdbc.url=jdbc:postgresql://localhost:5432/belladati_dbYou need use your own values for production.


4.2 Set JAVA Environment

Tip

If you have installed the Tomcat Windows Service, you can skip this step.

4.2.1 For Linux/Solaris

Before you start Tomcat, make sure you have configured the JAVA_HOME variable, which points to the installed Java SDK. You can do it in this way:

Code Block
$ export JAVA_HOME=/path/to/jdk

Make sure this variable is automatically set after system starts (append it to the .profile).

You can also specify it in the file $TOMCAT_HOME/bin/setenv.sh file (or create this file if it does not exist):

Code Block
JAVA_HOME="/path/to/jdk"
4.2.2 For Windows

Windows users can specify the environment parameters in the Environment Variables window.

4.3 Set Tomcat Home Directory Permissions

By default BellaDati is creating several directories within the Tomcat home folder. To allow this, Tomcat needs to run as a user with read and write access to this directory.

4.4 Configure Memory Settings in Tomcat

Tomcat memory settings need to be modified to avoid the following issue:

  • BellaDati requires more memory than what Tomcat provides by default. This may lead to OutOfMemory errors when running BellaDati if these memory settings are not increased.

To prevent this issue, follow the instructions below.

Note

Please note that the value 2048MB for -Xmx (maximum memory pool) is recommended for evaluation purposes only. Please refer to the Recommended JVM Options article to find suggested settings for production deployments.

For Linux/Solaris

Edit $TOMCAT_HOME/bin/setenv.sh file (or create this file if it does not exist) and add the following:

Code Block
export CATALINA_OPTS="$CATALINA_OPTS -Dmail.mime.decodeparameters=true -Dfile.encoding=UTF-8 -XX:+UseG1GC -Xms1024m -Xmx2048m"

Alternatively, you can edit the $TOMCAT_HOME/conf/tomcatX.conf or /etc/default/tomcatX.conf file:

Code Block
JAVA_OPTS="-Dmail.mime.decodeparameters=true -Dfile.encoding=UTF-8 -XX:+UseG1GC -Xms1024m -Xmx2048m"
For Windows
Warning

If you are running 32 bit JVM on Windows, you can use max 1344MB (-Xmx1344)

If Tomcat is not installed as a service:

  • Edit $TOMCAT_HOME/bin/setenv.bat file (or create this file if it does not exist) and add the following:

    Code Block
    set CATALINA_OPTS=%CATALINA_OPTS% -Dmail.mime.decodeparameters=true -Dfile.encoding=UTF-8 -XX:+UseG1GC -Xms1024m -Xmx2048m
    


If Tomcat is installed and running as a service:

  1. Right-click Tomcat's system tray icon and select Configure from the resulting popup menu, which opens the Apache Tomcat Properties dialog box.
  2. In this dialog box, click on the Java tab and specify the following values (depending on available system memory):

    Field

    Value

    Java Options (append to the existing value)


    Code Block
    -Dfile.encoding=UTF-8
    -Dmail.mime.decodeparameters=true
    -XX:+UseG1GC
    


    Initial memory pool

    256 MB

    Maximum memory pool

    2048 MB


For other environments and more information on memory settings, see the System Requirements.

4.5 Modify Tomcat's server.xml

In order for BellaDati to correctly display internationalized characters in user and group names, you need to modify the $TOMCAT_HOME/conf/server.xml file in your Tomcat installation directory by specifying the URIEncoding="UTF-8" property within the connector definition for your HTTP protocol.

The connector definition is specified by the following element in your server.xml file:

Code Block
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443"/>

You should modify this element by specifying the URIEncoding="UTF-8" attribute:

Code Block
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" URIEncoding="UTF-8"/>


Info

Please Note:

  • Since this property must be specified at the connector level for your application server, this setting will affect all other web applications deployed to the same application server installation running BellaDati. While this setting should not adversely effect these other web applications, you should be aware of this point.
  • BellaDati will run fine without this property set. However, you will run into issues if a user or group is created which contains international characters. Hence, it is recommended that you set this property.

4.6 Modify Tomcat's context.xml

In order for Tomcat to be able to cache web resources of BellaDati a default value for the cache size must be modified. Modify the $TOMCAT_HOME/conf/context.xml file in your Tomcat installation directory by adding following line:

Code Block
<Resources cacheMaxSize="51200" />

4.7 Set PID file for Tomcat

To be able to use Tomcat's bin/shutdown.sh or bin/shutdown.bat file to properly shutdown the Tomcat, a path to a file which will contain PID of started Tomcat needs to be set in CATALINA_PID environment variable.

For Linux/Solaris

Edit $TOMCAT_HOME/bin/setenv.sh file (or create this file if it does not exist) and add the following:

Code Block
export CATALINA_PID=<absolute-path-to-pid-file>
For Windows

Edit $TOMCAT_HOME/bin/setenv.bat file (or create this file if it does not exist) and add the following:

Code Block
set CATALINA_PID=<absolute-path-to-pid-file>

4.8 Configure location for logs

The default location for logs generated by BellaDati (see Configure logging for more details) is relative to the exploded belladati.war which is not suitable for long term storage. 

To change the logs directory, add a new JVM option -Dlogs.location=<location>, where <location> is the desired absolute path to the parent directory in which logs will be stored, to your Tomcat (see section 4.4 for more details on how to do it).

5. Start or Restart Tomcat

BellaDati is now ready to run in Tomcat.

Run as Service

Start the Tomcat service used for Belladati. Restart it if it's already running.

Run Manually

If Tomcat is not running as a service, start (or restart) the Tomcat server with Tomcat's bin/startup.sh or bin/startup.bat scripts.

Shutdown Manually

If Tomcat is not running as a service, you can stop the Tomcat server with Tomcat's bin/shutdown.sh or bin/shutdown.bat scripts if you set a CATALINA_PID environment variable with the path to a file containing PID of the running Tomcat.

6. Run the Setup Wizard

Point your browser to http://localhost:8080/belladati. This starts the Setup Wizard, which will take you through BellaDati's setup procedure.

Sv translation
languageja
Info

このガイドでは、Tomcat上でBellaDati WARをインストールする方法について説明します。 BellaDatiは、Tomcat 7.0.6およびそれ以降をサポートしている。Tomcat 9.0を使用することをお勧めします。

Tip

Windowsユーザーのためのヒント:
WindowsサービスとしてBellaDatiを実行できる32-bit/64-bit Windows Service Installer使用することをお勧めします。

Warning

BellaDati WARファイルは、WARアーカイブにパッケージしたBellaDatiアプリケーションです。これは、既存のアプリケーションサーバーにデプロイし、既存のデータベースサーバー上で実行されているデータウェアハウスに接続する必要があります。

始める前に

Tomcat上BellaDatiのインストールを開始する前に、次の重要な注意事項をお読みください

  • 正しいJavaバージョンがあることを確認してください。詳細については、Installing Javaに参考してください。
  • 単一Tomcatアプリケーションサーバーで展開する複数のBellaDati WARアプリケーションのがサポートされていません。我々この設定は確認されず、これを壊す可能性があるアプリケーションを更新しません
  • BellaDatiを実行する同じTomcatコンテナに他のアプリケーションを配備しないことをお勧めします。特に、他のアプリケーションは大きなメモリが要求するまたはTomcatのlibサブディレクトリに追加のライブラリが要求する場合。コンテナ内に複数のアプリケーションが安定性に1つのアプリケーションのクラッシュなど影響を与える可能性があり、コンテナ全体をアクセス不能にする可能性があります。 さらに、アプリケーションを更新または再構成するには、コンテナ全体を再起動する必要があります

 

1. データウェアハウス設定

PostgreSQLデータベースの設定ページの指示に従ってください。

2. WARダウンロードしてBellaDati WARアーカイブ抽出

BellaDatiダウンロードページからZIPアーカイブとしてBellaDati WARディストリビューションをダウンロードして、Windows7-ZipまたはLinux のGNU tarなどツールを使用してその内容を解凍します。ZIPアーカイブ内の一つファイルしかbelladati.warにこのセットアップが使用されません。

(warning)  Windowsの組み込みのファイル解凍ツールを使用しないでください!このツールは長い名前のファイルを解凍することができません。他のユーザーもWinRARの問題を報告しています。

(warning)  Solarisのデフォルトtarユーティリティを使用しないでください! GNU tarは長いファイル名をより良いを扱えように、BellaDatiを解凍するために、このオペレーティングシステム上でのGNUtarを使用してください。

3. BellaDati WAR設定

2.7.14バージョンから特別な構成に変更がないですがapplication.propertiesで設定されているいくつかの拡張設定が(例えば、SSLを強制する)あります。

Info

構成設定はBellaDati WAR構成の概要で詳しく説明されます。

4. Tomcat構成

4.1 Tomcatの設定コンテキスト

BellaDatiコンテキストは、Tomcatでセットアップする必要があります。以下となります。

  1. 存在しない場合、Tomcatインストールディレクトリ内にconf/Catalina/localhost/ ディレクトリ構造を作成します。
  2. belladati.xmlファイルを作成し、Tomcatのインストールディレクトリ内にconf/Catalina/localhost にコピーする。(前のステップで作成した)

    Code Block
    <Context path="/belladati" docBase="path/to/belladati.war" debug="0" useHttpOnly="true">
    
    <Resource name="jdbc/belladati_db" auth="Container" type="javax.sql.DataSource"
              driverClassName="org.postgresql.Driver"
              url="jdbc:postgresql://db_host:5432/belladati_db"
              username="belladati_dbuser" password="password"
              maxActive="100" maxIdle="10" maxWait="-1" accessToUnderlyingConnectionAllowed="true" validationInterval="240000"/>
    
    </Context>
    
  3. お使いのシステム構成に合わせるように5と6行でURLユーザー名パスワードなど最初の行でdocBaseの属性を更新します。

ここではサンプルファイルです。

Windowsでインストールする場合は、WARファイルとデータベースの場所に指定するパスがドライブ文字がある完全パスであることを確認してください(例えば C:\path\to\belladati.war)。

4.2 JAVA環境の設定

Tip

Windows Tomcatサービスをインストールしている場合は、この手順を省略できます。

4.2.1 Linux/Solaris用

Tomcatを開始する前に、あなたがインストールしたJava SDKを指すJAVA_HOME変数を設定していることを確認してください。以下の通りに進みます。

Code Block
$ export JAVA_HOME=/path/to/jdk

この変数は自動的にシステムが起動(.profileに追加)後に設定されていることを確認してください。

$TOMCAT_HOME/bin/setenv.sh ファイルで指定できます(または存在しない場合にこのファイルを作成する)。

Code Block
JAVA_HOME="/path/to/jdk"
4.2.2 Windows用

Windowsユーザーは環境変数ウィンドウに環境パラメータを指定できます。

4.3 Tomcat のホームディレクトリのアクセス権を設定する

デフォルトでは、BellaDatiはTomcatホームフォルダ内に複数のディレクトリを作成しています。 これに従って、このディレクトリへの読み書きアクセス権を持つユーザとしてTomcatを実行する必要があります。

4.4 Tomcatでメモリ設定を構成

Tomcatメモリ設定は、以下の問題を回避するように修正される必要があります。

この問題を回避するには、以下の手順に従ってください。

 

Note

-Xmx2048 MB値(最大メモリプール)は評価目的のみのために推奨されますのでご注意ください。本番デプロイするための推奨設定を見つけるために推奨JVMオプション記事を参照してください

Linux/Solaris用

$TOMCAT_HOME/bin/setenv.shファイルを編集し、以下を追加します。(存在しない場合は、このファイルを作成する) 

Code Block
export CATALINA_OPTS="$CATALINA_OPTS -Dmail.mime.decodeparameters=true -Dfile.encoding=UTF-8 -Xms1024m -Xmx2048m -XX:MaxPermSize=512m"

また、$TOMCAT_HOME/conf/tomcatX.confまたは/etc/default/tomcatX.confファイルを編集できます 

Code Block
JAVA_OPTS="-Dmail.mime.decodeparameters=true -Dfile.encoding=UTF-8 -Xms1024m -Xmx2048m -XX:MaxPermSize=512m"
Windows用
Warning

Windows上でJVM 32 bitを実行している場合は、最大1344MB(-Xmx1344)を使用できます。

Tomcatはサービスとしてインストールされていない場合:

  • $TOMCAT_HOME/bin/setenv.batファイルを編集して以下のを追加します。

    Code Block
    set CATALINA_OPTS=%CATALINA_OPTS% -Dmail.mime.decodeparameters=true -Dfile.encoding=UTF-8 -Xms1024m -Xmx2048m -XX:MaxPermSize=512m\
    

Tomcatがサービスとしてインストールされている場合:

  1. Tomcatのシステムトレイアイコンを右クリックして、「Apache Tomcatのプロパティ」ダイアログボックスを開いているポップアップメニューから「設定」を選択します。
  2. このダイアログボックスで、Javaタブをクリックし以下の値を指定します。(利用可能なシステムメモリに依存)

    フィールド

    Javaオプション(既存値に付ける)

    Code Block
    -XX:MaxPermSize=512m
    -Dfile.encoding=UTF-8
    -Dmail.mime.decodeparameters=true
    

    初期メモリプール

    256 MB

    最大メモリプール

    2048 MB

他の環境とメモリの設定の詳細については、システム要求を参照してください。

4.5 Tomcatserver.xml修正

BellaDatiが国際化された文字をユーザー名とグループ名に正しく表示するために、コネクター定義の範囲内でURIEncoding = "UTF-8"プロパティを指定することで、HTTPプロトコルにTomcatインストールディレクトリの$ TOMCAT_HOME/ conf / server.xmlファイルを変更する必要があります。

コネクター定義は、server.xmlファイルに次の要素で指定されます。

Code Block
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443"/>

URIEncoding = "UTF-8"属性を指定することで、この要素を変更する必要があります。

Code Block
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" URIEncoding="UTF-8"/>
Info

注意: 

  • ·         このプロパティがアプリケーション・サーバー用のコネクタ・ラベルで指定されたまでにこの設定は同じアプリケーション・サーバーのインストールの実行中のBellaDatiにデプロイされたすべての他のWebアプリケーションに影響を与えます。この設定は他のWebアプリケーションに悪影響を及ぼす点に注意する必要があります。 
  • BellaDatiは、このプロパティを設定せずに正常に動作します。作成されたユーザーまたはグループが国際的な文字が含まれたら問題に実行されます。したがって、このプロパティを設定することをお勧めします。

5. Tomcat開始または再起動

 

BellaDatiTomcatで実行できました。 

 

サービスとして実行 

 

Belladatiに使用するTomcatサービスを開始します。すでに実行している場合にそれを再起動します。 

 

手動で実行 

Tomcatがサービスとして実行されていない場合は、Tomcatbin/startup.sh or bin/startup.batのスクリプトでTomcatサーバーを起動します(または再起動する)。

6. ウィザードセットアップを実行

お使いのブラウザでhttp://localhost:8080/belladatiに移します。これはBellaDati設定手順を介して行くことができるセットアップウィザードを起動します。

-Xmx2048 MB値(最大メモリプール)は評価目的のみのために推奨されますのでご注意ください。本番デプロイするための推奨設定を見つけるために推奨JVMオプションの記事を参照してください 

BellaDatiTomcatのデフォルトで提供するものより多くのメモリを必要になります。これらのメモリの設定が増加されていない場合BellaDatiを実行しているときに、これがOutOfMemoryをエラーになる場合があります。