Configure PostgreSQL database on Solaris 10
Occassionally you may need to setup database remotely on non-Windows O.S., then the following steps could be of great reference for your SCADA application.
- Open a terminal (right click on desktop, select Hosts and click Terminal Console)
- Create postgres user in
/export/home/postgres
- Create
/export/home/postgres/data
folder and user postgres as its owner - Initialize database cluster and run postmaster (database services)
- Configure database for remote connection from where IGX is hosted, e.g.
192.168.221.10
. - Open
/export/home/postgres/data/pg_hba.conf
file & under'#IPv4 local connections:'
line, add: - Open
/export/home/postgres/data/postgresql.conf file
& modify line - Configure user account dbadmin & password dbadmin
- Create
/etc/init.d/postgresql
file - Then open
/etc/init.d/postgresql
and insert a command line to run postmaster - Create the postgresql symbolic link onto
/etc/rc3.d
asS99postgresql
to launch postmaster(PostgreSQL server) during server startup automatically: - Stop postmaster and reboot unit.
# groupadd postgres
# useradd -c 'PostgreSQL user' -d /export/home/postgres -g postgres -m -s /bin/bash postgres
# mkdir /export/home/postgres/data
# chown postgres /export/home/postgres/data
# su - postgres
$ initdb -D /export/home/postgres/data
$ postmaster -D /export/home/postgres/data >/export/home/postgres/data/logfile 2>& 1&
host all all 192.168.221.10/32 trust
#listen_addresses = 'localhost' to listen_addresses = '*'
$ createuser -P
Username: dbadmin
Password: dbadmin
$ exit
# touch /etc/init.d/postgresql
su - postgres -c "/usr/bin/pg_ctl start -l logfile -D /export/home/postgres/data"
# ln -s /etc/init.d/postgresql /etc/rc3.d/S99postgresql
# su - postgres
$ /usr/bin/pg_ctl stop -D /export/home/postgres/data -m smart
$ exit
# init 6
This guide is shared by our project engineer Zainal who has the avatar as shown. Yes, you can tell that he’s a Japanese cartoon lover & cheerful too. Feel free to contact him via our support channel if you have any issue using this guide for your SCADA configuration.