Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Sv translation
languageen



Info

This guide describes how to install BellaDati WAR (up to version 2.10 - which uses Java 11 and Postgres 12, Tomcat 9)

Runtime environment for BellaDati WAR in this guide is made of OS, Data Warehouse, Java Environment, Servlet Container respectively:

All package repositories are set by default after vanilla installation of Ubuntu 20.04. Package repository for Postgresql 10 has to be added to APT Package Manager database




Tip

This guide results in:

  1. Postgresql 10 installed on same host as Tomcat9 or other host

  2. OpenJDK-8-jre installed and used by Tomcat9 servlet container
  3. belladati.war deployed into Tomcat9 servlet container from directory /opt/belladati
  4. Tomcat9 running as linux service of which status can be checked by command systemctl status tomcat9
  5. Tomcat9 process running as tomcat user (no root user)
  6. BellaDati Application as single application deployed into Tomcat 9 available as http://localhost:8080/belladati (or your IP instead of localhost)
  7. Tomcat9 can be turned on and off by systemctl stop/start tomcat9 command
  8. BellaDati logs available at /opt/belladati
  9. BellaDati search engine index stored at /opt/belladati/indexes
  10. BellaDati logs stored  at /opt/belladati/logs
  11. Ubuntu Focal 20.04 LTS with automatic updates turned off to prevent automatic updates of APT packages installed



Before You Begin

You should have ready vanilla installation of Ubuntu Focal 20.04 LTS available on physical HW or some type of container (AWS, Linux container,Docker,VMWare etc.). This guide expects, that any type of firewall is not applied and or communication to installed DWH and Servlet Container is allowed on the OS level. For production make sure that OS environment as well as servlet container is secured using SSL etc. This guide is not focused on security settings.

1. Setup Postgresql 10 data warehouse

Decide if you will install Postgresql on the same host as Tomcat with BellaDati or Postgresql will be running on different host than Tomcat with Belladati

  1. Follow steps at https://www.postgresql.org/download/linux/ubuntu/ to install postgresql-10 package
  2. Please follow the instructions on the Setting up the PostgreSQL Database page.

2. Install OpenJDK-8-jre apt package

  1. Become root user by sudo su if you are not one
  2. Run apt-get update if host differs from host on which you have installed Postgresql
  3. Run apt-get install openjdk-8-jre and confirm installation of all dependant packages
  4. Run apt-cache policy openjdk-8-jre to see exact version of JRE installed

3. Install Tomcat9 apt package

3.1 Installation

  1. Become root user by sudo su if you are not one
  2. Run apt-get install tomcat9 and confirm installation of all dependant packages
  3. Run apt-cache policy tomcat9 to see exact version of tomcat9 installed
  4. Run systemctl status tomcat9 to see if tomcat9 is running or not (it should be turned off)
  5. User tomcat was created and tomcat9 related service configurations were created
  6. tomcat9 service will later run as tomcat user
  7. tomcat9 will search for typical JRE paths as can be read in /etc/default/tomcat9 file or you can set direct path to installed JRE from within this file (not necessary in our case)

3.2 Tomcat JAVA_OPTS configuration

Since Tomcat is installed as apt package on Ubuntu. Configuration for Java System Properties used by Tomcat and therefore by belladati application has to be done as following

  1. As  root run vi /etc/default/tomcat9
  2. Add following Java System Properties to JAVA_OPTS existing parameters. If added, these parameters will overwrite default application.properties within belladati.war
  3. 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_dbFor production you can use your own values.
    -Dbelladati.application.homeDir=/opt/belladatiFor production you can use your own values.
    -Dlucene.indexes=/opt/belladati/indexesBellaDati search engine will store indexes of reports,users etc. in this directory
    -Dlogs.location=/opt/belladati/logsFor production you can use your own values.
    -Dmail.mime.decodeparameters=true
    -Dfile.encoding=UTF-8
    -Djava.io.tmpdir=/tmp


    -XX:+UseG1GCType of garbage collector algorithm.Specify in case Java 8 is used. Java above 8 is using it by default.

    Since Belladati version 2.7.14 there is no special configuration change needed in application.properties file in belladati.war, 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.




3.3 Tomcat service unit configuration

  1. As root create directory mkdir /opt/belladati (belladati.war will be unziped into this directory and used by Tomcat9)
  2. As root create directory mkdir /opt/belladati/indexes (belladati will store search engine results in this directory)
  3. As root create directory mkdir /opt/belladati/logs (belladati login engine will store logs into this directory)
  4. Change ownership of directory by  chown -R tomcat:tomcat /opt/belladati
  5. As root run vi /etc/systemd/system/multi-user.target.wants/tomcat9.service
  6. At the end of #Security section add ReadWritePaths=/opt/belladati/  (now tomcat9 service running as tomcat user can read and write to /opt/belladati and same is allowed for its Context).Let's setup Context in next steps.

3.4 Tomcat Context configuration

Context container in Tomcat processes requests to web applications. Let' setup belladati.war web application as Context for Tomcat. By default Tomcat still keeps the root Context "".Context for belladati web application will be /belladati. Since Tomcat will use autodeploy feature. Therefore Context is named according of file being deployed. In this case belladati.war

  1. Specify from where Tomcat should deploy the belladati.war
  2. $CATALINA_BASE points to configuration of single tomcat instance. As user tomcat (sudo -u tomcat) create new file belladati.xml by vi /conf/Catalina/localhost/belladati.xml   and add Context configuration below into the belladati.xml

    Code Block
    <Context docBase="opt/belladati/belladati.war" debug="0" useHttpOnly="true">
         
    </Context>
    


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.


3.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.

3.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. Download belladati.war

These steps will place belladati.war into /opt/belladati. From that directory Tomcat will deploy belladati.war by using autoDeploy feature into it's directory /var/lib/tomcat9/webapps, where it will create directory named after belladati.war,  belladati

  1. download BellaDati-2_9_22.war.zip (your BellaDati version may differ) from My.BellaDati.com portal into /opt/belladati
  2. run sudo -u tomcat gunzip -S .zip BellaDati-2_9_22.war.zip
  3. run sudo -u tomcat mv BellaDati-2_9_22.war belladati.war

5. Disable automatic updates in Ubuntu Focal 20.04

To prevent Ubuntu to automatically update and upgrade Tomcat,Java,Postgresql packages edit file below as root (if Postgres is installed on different host, apply steps below also on the other host)

/etc/apt/apt.conf.d/20auto-upgrades

and replace existing content with

Code Block
PT::Periodic::Update-Package-Lists "0";
APT::Periodic::Download-Upgradeable-Packages "0";
APT::Periodic::AutocleanInterval "0";
APT::Periodic::Unattended-Upgrade "1";




6. Start and control tomcat service

BellaDati is now ready to run in Tomcat.While Tomcat will run as Ubuntu service under user tomcat.

Use commands below to control the service.Remember, that data warehouse of belladati (Postgresql must be up as well):


  1.  systemctl status tomcat9 to see the status of service
  2.  systemctl start tomcat9 to start the service
  3.  systemctl stop tomcat9 to stop the service

7. Run the Setup Wizard

While tomcat9 service is running and systemctl status tomcat9 is showing that belladati was successfuly deployed you can access BellaDati via webbrowser.

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

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

Linux/Solaris用

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

Sv translation
languageja



JP translate

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でセットアップする必要があります。以下となります。

  • 存在しない場合、Tomcatインストールディレクトリ内にconf/Catalina/localhost/ ディレクトリ構造を作成します。
  • 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>
    
  • お使いのシステム構成に合わせるように5と6行でURLユーザー名パスワードなど最初の行でdocBaseの属性を更新します。
  • このガイドでは、BellaDati WAR(バージョン2.10まで - Java 11とPostgres 12、Tomcat 9を使用)のインストール方法について説明します。

    本ガイドにおけるBellaDati WARの実行環境は、OS、データウェアハウス、Java環境、サーブレットコンテナで構成されています:

    Ubuntu 20.04のバニラインストール後は、すべてのパッケージリポジトリがデフォルトで設定されています。Postgresql 10 のパッケージリポジトリを APT Package Manager データベースに追加する必要があります


    Tip

    このガイドの成果:

    1. Tomcat9と同じホスト、または他のホストにPostgresql10をインストール
    2. OpenJDK-8-jreをインストールし、Tomcat9サーブレットコンテナで使用

    3. Tomcat9 のサーブレットコンテナに /opt/belladati から配備された belladati.war
    4. Tomcat9 は Linux サービスとして動作しており、systemctl status tomcat9 コマンドで状態を確認できます
    5. Tomcat9プロセスはtomcatユーザで実行されています(rootユーザではありません)。
    6. BellaDatiアプリケーションを1つのアプリケーションとしてTomcat 9にデプロイし、http://localhost:8080/belladati (またはlocalhostの代わりにあなたのIP)として利用可能です。
    7. Tomcat9はsystemctl stop/start tomcat9コマンドでON/OFFできます。
    8. BellaDatiのログは/opt/belladatiで見ることができます。
    9. BellaDatiサーチエンジンのインデックスは/opt/belladati/indexesに格納されています。
    10. BellaDatiのログは/opt/belladati/logsに格納されています。
    11. Ubuntu Focal 20.04 LTSで自動更新をオフにし、インストールされたAPTパッケージの自動更新を防止する。



    はじめる前に

    Ubuntu Focal 20.04 LTS を物理的なハードウェアまたはコンテナ(AWS、Linux コンテナ、Docker、VMWare など)にインストールしたバニラが用意されている必要があります。本ガイドでは、OSレベルでファイアウォールが適用されておらず、インストールしたDWHやサーブレットコンテナへの通信が許可されていることを想定しています。本番環境では、OS環境とサーブレットコンテナがSSLなどで保護されていることを確認してください。 このガイドは、セキュリティ設定に焦点を当てたものではありません。

    1. Postgresql 10 データウェアハウスのセットアップ

    BellaDatiでPostgresqlをTomcatと同じホストにインストールするか、BelladatiでPostgresqlをTomcatとは別のホストで動作させるかを決定してください。

    1. https://www.postgresql.org/download/linux/ubuntu/ の手順に従い、postgresql-10 パッケージをインストールします。
    2. PostgreSQLデータベースのセットアップのページに記載されている手順に従ってください。

    2. OpenJDK-8-jreのaptパッケージのインストール

    1. sudo suでrootユーザーになります。
    2. Postgresqlをインストールしたホストと異なる場合は、apt-get updateを実行します。
    3. pt-get install openjdk-8-jre を実行し、すべての依存パッケージのインストールを確認します。
    4. apt-cache policy openjdk-8-jre を実行し、インストールされている JRE の正確なバージョンを確認します。

    3. Tomcat9 aptパッケージのインストール

    3.1 インストール

    1. sudo suでrootユーザーになります。
    2. tomcat9 をインストールし、すべての関連パッケージがインストールされていることを確認します。
    3. apt-cache policy tomcat9 を実行すると、インストールされている tomcat9 の正確なバージョンが表示されます。
    4. systemctl status tomcat9 を実行して、tomcat9 が動作しているかどうかを確認します(オフになっている必要があります)。
    5. ユーザー tomcat が作成され、tomcat9 関連のサービスコンフィギュレーションが作成されました。
    6. tomcat9 サービスは、後に tomcat ユーザとして実行されます。
    7. tomcat9 は /etc/default/tomcat9 ファイルに記述されている典型的な JRE のパスを検索しますが、このファイルからインストールした JRE のパスを直接設定することも可能です(今回の例では必要ありません)。

    3.2 Tomcat JAVA_OPTSの設定

    Ubuntuでは、Tomcatはaptパッケージとしてインストールされるため、Tomcatのシステムプロパティを設定する必要があります。Tomcatが使用するJavaシステムプロパティの設定、およびbelladatiアプリケーションが使用するJavaシステムプロパティの設定は、以下のように行う必要があります。

    1. rootで vi /etc/default/tomcat9 を実行します。
    2. JAVA_OPTSの既存のパラメータに、以下のJavaシステムプロパティを追加します。これらのパラメータを追加すると、belladati.war内のデフォルトのapplication.propertiesが上書きされます。
    3. JAVA_OPTSに追加するJava System Propertiesは以下の通りです:

      プロパティと値備考
      -Djdbc.password=passwordPostgresのbelladati_dbのパスワードです。
      -Djdbc.username=belladati_dbuserユーザ名をPostgresのbelladati_dbに変更します。
      -Djdbc.url=jdbc:postgresql://localhost:5432/belladati_db制作の場合は、独自の値を使用することができます。
      -Dbelladati.application.homeDir=/opt/belladati制作の場合は、独自の値を使用することができます。
      -Dlucene.indexes=/opt/belladati/indexesBellaDatiサーチエンジンは、このディレクトリにレポート、ユーザーなどのインデックスを保存します。
      -Dlogs.location=/opt/belladati/logs制作の場合は、独自の値を使用することができます。
      -Dmail.mime.decodeparameters=true
      -Dfile.encoding=UTF-8
      -Djava.io.tmpdir=/tmp


      -XX:+UseG1GCガベージコレクタアルゴリズムの種類を指定します。8以上のJavaはデフォルトでこれを使用しています。

      Belladati バージョン 2.7.14 以降、belladati.war の application.properties ファイルに特別な設定変更は必要ありませんが、いくつかの高度な設定(例:SSL の適用)は application.properties のみで設定可能です。

      Info

      コンフィギュレーション設定は、BellaDati WARコンフィギュレーション概要で詳しく説明されています。


    3.3 Tomcatサービスユニットの構成

    1. rootでディレクトリを作成 mkdir /opt/belladati (belladati.war はこのディレクトリに解凍され、Tomcat9 で使用されます)
    2. rootでディレクトリを作成 mkdir /opt/belladati/indexes (belladati は検索エンジンの結果をこのディレクトリに格納します)
    3. rootでディレクトリを作成 mkdir /opt/belladati/logs (belladati ログインエンジンはこのディレクトリにログを保存します)
    4. chown -R tomcat:tomcat /opt/belladati でディレクトリの所有権を変更します。
    5. rootで vi /etc/systemd/system/multi-user.target.wants/tomcat9.service を実行します。
    6. Securityセクションの最後にReadWritePaths=/opt/belladati/を追加します(これでtomcat9がtomcatユーザとして動作し、/opt/belladatiへの読み書きが可能になります)。

    3.4 Tomcat Contextの設定

    TomcatのContextコンテナは、Webアプリケーションへのリクエストを処理します。TomcatのContextとして、belladati.war Webアプリケーションを設定します。デフォルトでは、Tomcatはルートコンテキストを保持します。Tomcatはオートデプロイ機能を使用します。 そのため、Contextはデプロイされるファイルに合わせて命名されます。この場合、belladati.warになります。

    1. Tomcatがbelladati.warを配備する場所を指定します。
    2. CATALINA_BASE は、単一の tomcat インスタンスの設定を示します。ユーザ tomcat として (sudo -u tomcat) /conf/Catalina/localhost/belladati.xml を作成し、以下の Context 設定を belladati.xml に追加して下さい。

      Code Block
      <Context docBase="opt/belladati/belladati.war" debug="0" useHttpOnly="true">
           
      </Context>
      


    バージョン2.7.14以降、特別な設定変更は必要ありませんが、いくつかの高度な設定(例:SSLの強制)があり、それらはapplication.propertiesでのみ設定可能です。

    Info

    コンフィギュレーション設定は、BellaDati WARコンフィギュレーション概要で詳しく説明されています。


    3.5 Tomcatのserver.xmlを変更

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

    コネクタの定義は、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アプリケーションに悪影響を及ぼすことはありませんが、この点に注意する必要があります。
    • BellaDatiは、このプロパティを設定しなくても正常に動作します。しかし、国際的な文字を含むユーザーやグループを作成した場合、問題が発生する可能性があります。したがって、このプロパティを設定することをお勧めします。

    3.6 Tomcatのcontext.xmlを変更

    TomcatがBellaDatiのWebリソースをキャッシュできるようにするには、キャッシュサイズのデフォルト値を変更する必要があります。Tomcatのインストールディレクトリにある$TOMCAT_HOME/conf/context.xmlファイルに、以下の行を追加して修正してください。

    Code Block
    <Resources cacheMaxSize="51200" />
    




    4. Belladati.war のダウンロード

    これらの手順により、belladati.war は /opt/belladati に配置されます。Tomcat はこのディレクトリから、autoDeploy 機能を用いて belladati.war を /var/lib/tomcat9/webapps に配備し、そこに belladati.war と同じ名前のディレクトリ belladati.war を作成する事になります。

    1. My.BellaDati.comポータルからBellaDati-2_9_22.war.zip(お使いのBellaDatiのバージョンが異なる場合があります)を/opt/belladatiにダウンロードします。
    2. sudo -u tomcat gunzip -S .zip BellaDati-2_9_22.war.zipを実行します。
    3. sudo -u tomcat mv BellaDati-2_9_22.war belladati.warを実行します。

    5. Ubuntu Focal 20.04で自動アップデートを無効にする

    Ubuntuが自動的にTomcat、Java、Postgresqlのパッケージを更新するのを防ぐために、rootで以下のファイルを編集してください(Postgresを別のホストにインストールしている場合は、以下の手順を別のホストにも適用してください)

    /etc/apt/apt.conf.d/20auto-upgrades

    そして既存のコンテンツを置き換えます。

    Code Block
    PT::Periodic::Update-Package-Lists "0";
    APT::Periodic::Download-Upgradeable-Packages "0";
    APT::Periodic::AutocleanInterval "0";
    APT::Periodic::Unattended-Upgrade "1";
    

    6. tomcatサービスの起動と制御

    TomcatはUbuntuのサービスとして、ユーザーtomcatで動作します。

    サービスを制御するには、以下のコマンドを使用します。Belladatiのデータウェアハウス(Postgresqlも立ち上げておく必要があります)を忘れずに実行してください:


    1.  systemctl status tomcat9 でサービスの状態を確認します。
    2.  systemctl start tomcat9 でサービスを開始します。
    3. systemctl stop tomcat9 でサービスを停止します。

    7. セットアップウィザードの実行

    tomcat9 サービスが動作し、systemctl status tomcat9 に Belladati が正常にデプロイされたことが表示されている間は、Web ブラウザで BellaDati にアクセスすることができます。

    ブラウザを http://localhost:8080/belladati にポイントしてください。セットアップウィザードが起動し、BellaDatiのセットアップ手順が表示されます。

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

    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ユーザーは環境変数ウィンドウに環境パラメータを指定できます。

    Image Removed

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

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

    4.4 Tomcatでメモリ設定を構成

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

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

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

    Note
    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がサービスとしてインストールされている場合:

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

    フィールド

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

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

    初期メモリプール

    256 MB

    最大メモリプール

    2048 MB

    Image Removed

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

    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をエラーになる場合があります。