Installing PostgreSQL for Ubuntu
Use this task to install PostgreSQL for Ubuntu systems. The training server and stand-alone edge use a PostgreSQL database.
Procedure
-
Install PostgreSQL, PHPPgadmin and Apache2 by using the following command:
sudo apt-get -y install postgresql postgresql-contrib phppgadmin -
Configure the PostgreSQL user.
-
Log in as the PostgreSQL user by using the following commands:
sudo su
su - postgres
psql -
Configure the password for user postgres by using the following
commands:
password postgres
password
\q
-
Log in as the PostgreSQL user by using the following commands:
-
Configure Apache2 by editing the nano phppgadmin.conf file:
cd /etc/apache2/conf-available/
nano phppgadmin.conf
Delete the following line: Require local. Add the following line to the file:
Require all granted -
Configure the PHPPgadmin by editing the config.inc.php
file:
cd /etc/phppgadmin/
nano config.inc.php
Find the following line in the file:$conf['extra_login_security'] = true
Changetrue
tofalse
. -
Restart PostreSQL and Apache2 by using the following commands:
systemctl restart postgresql
systemctl restart apache2 -
Verify that you can access the user interface on the stand-alone edge by accessing the
following URL:
http://standalone_edge_IP/phppgadmin
where standalone_edge_IP is the IP address of the stand-alone edge. -
Create the database schema in PostgreSQL.
-
Run the following command on the SQL console on PHPPgadmin:
create database edge with owner postgres encoding='UTF-8' lc_collate='en_US.utf8' lc_ctype='en_US.utf8' template template0; -
In the database, create the following tables:
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);
where tenant is the tenant for the operation user in the Maximo® PQI On-Premises Visual Insights center. Get the tenant value from the user profile in the user interface for the center application.
-
Run the following command on the SQL console on PHPPgadmin: