Ubuntu への PostgreSQL のインストール

このタスクを使用して、Ubuntu システムに PostgreSQL をインストールします。トレーニング・サーバーとスタンドアロン・エッジは PostgreSQL データベースを使用します。

手順

  1. 以下のコマンドを使用して PostgreSQL、PHPPgadmin、および Apache2 をインストールします。
    sudo apt-get -y install postgresql postgresql-contrib phppgadmin
  2. PostgreSQL ユーザーを構成します。
    1. 以下のコマンドを使用して PostgreSQL ユーザーとしてログインします。
      sudo su
      su - postgres
      psql
    2. 以下のコマンドを使用して、ユーザー postgres のパスワードを構成します。
      password postgres
      password
      ¥q
  3. 以下のように nano phppgadmin.conf ファイルを編集して Apache2 を構成します。
    cd /etc/apache2/conf-available/
    nano phppgadmin.conf
    Require local」という行を削除します。以下の行をファイルに追加します。
    Require all granted
  4. 以下のように config.inc.php ファイルを編集して PHPPgadmin を構成します。
    cd /etc/phppgadmin/
    nano config.inc.php
    このファイルで、次の行を見つけます。
    $conf['extra_login_security'] = true
    truefalse に変更します。
  5. 以下のコマンドを使用して PostreSQL および Apache2 を再始動します。
    systemctl restart postgresql
    systemctl restart apache2
  6. 以下の URL にアクセスして、スタンドアロン・エッジのユーザー・インターフェースにアクセスできることを確認します。
    http://standalone_edge_IP/phppgadmin
    ここで、standalone_edge_IP はスタンドアロン・エッジの IP アドレスです。
  7. PostgreSQL にデータベース・スキーマを作成します。
    1. PHPPgadmin の SQL コンソールで以下のコマンドを実行します。
      create database edge with owner postgres encoding='UTF-8' lc_collate='en_US.utf8' lc_ctype='en_US.utf8' template template0;
    2. データベースに以下の表を作成します。
      CREATE TABLE vi_tenant_inspectionresult(id text, info jsonb);
      CREATE TABLE vi_tenant_notification(id text, info jsonb);
      CREATE TABLE vi_tenant_defectsummary(id text, info jsonb);
      CREATE TABLE vi_tenant_uploaddataset(id text, info jsonb);
      CREATE TABLE vi_tenant_syncprocess(id text, info jsonb);
      CREATE TABLE vi_tenant_model(id text, info jsonb);
      CREATE TABLE vi_tenant_datagroup(id text, info jsonb);
      ここで tenant は、Maximo® PQI SaaS Visual Insights のセンターの操作ユーザーのテナントです。テナントの値は、センター・アプリケーションのユーザー・インターフェースでユーザー・プロファイルから取得します。