Ubuntu への PostgreSQL のインストール
このタスクを使用して、Ubuntu システムに PostgreSQL をインストールします。トレーニング・サーバーとスタンドアロン・エッジは PostgreSQL データベースを使用します。
手順
-
以下のコマンドを使用して PostgreSQL、PHPPgadmin、および Apache2 をインストールします。
sudo apt-get -y install postgresql postgresql-contrib phppgadmin -
PostgreSQL ユーザーを構成します。
-
以下のコマンドを使用して PostgreSQL ユーザーとしてログインします。
sudo su
su - postgres
psql -
以下のコマンドを使用して、ユーザー postgres のパスワードを構成します。
password postgres
password
¥q
-
以下のコマンドを使用して PostgreSQL ユーザーとしてログインします。
-
以下のように nano phppgadmin.conf ファイルを編集して Apache2 を構成します。
cd /etc/apache2/conf-available/
nano phppgadmin.conf
「Require local」という行を削除します。以下の行をファイルに追加します。
Require all granted -
以下のように config.inc.php ファイルを編集して PHPPgadmin を構成します。
cd /etc/phppgadmin/
nano config.inc.php
このファイルで、次の行を見つけます。$conf['extra_login_security'] = true
true
をfalse
に変更します。 -
以下のコマンドを使用して PostreSQL および Apache2 を再始動します。
systemctl restart postgresql
systemctl restart apache2 -
以下の URL にアクセスして、スタンドアロン・エッジのユーザー・インターフェースにアクセスできることを確認します。
http://standalone_edge_IP/phppgadmin
ここで、standalone_edge_IP はスタンドアロン・エッジの IP アドレスです。 -
PostgreSQL にデータベース・スキーマを作成します。
-
PHPPgadmin の SQL コンソールで以下のコマンドを実行します。
create database edge with owner postgres encoding='UTF-8' lc_collate='en_US.utf8' lc_ctype='en_US.utf8' template template0; -
データベースに以下の表を作成します。
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 のセンターの操作ユーザーのテナントです。テナントの値は、センター・アプリケーションのユーザー・インターフェースでユーザー・プロファイルから取得します。
-
PHPPgadmin の SQL コンソールで以下のコマンドを実行します。