Installation Prerequisites
Important: CDWS 6.2.0.10 onwards this section is not applicable
Before
you install IBM®
Connect:Direct® Web Service on
AIX complete the following procedure to initialize and configure PostgreSQL
database.Note: This procedure only applies for IBM
Connect:Direct Web Service
v6.0.0.5 and above users.
-
Invoke the following command to list all PostgreSQL database packages:
yum list postgresql*
-
Invoke the following command to install PostgreSQL v9.2 database.
yum install postgresql-server
- Invoke the following command to initialize and configure a PostgreSQL database.
- The PostgreSQL data directory contains all data files required to configure and initialize the database. Variable PGDATA is used to reference this directory. The default data directory is /var/lib/postgresql/data.
- To initialize the database, create a directory and use
chmod
command to assign all privileges to that directory. To check user and group follow these steps:- Check Postgres user exists using command
if [ `cat /etc/passwd | grep postgres1 | wc -l` -eq 0 ] then echo "Postgres user doesn't exist" else echo "Postgres user exist" fi
- Check postgres group exits using
command:
if [ `cat /etc/group | grep postgres1 | wc -l` -eq 0 ] then echo "Postgres group doesn't exist" else echo "Postgres group exist" fi
- If Group does not exist, create group postgres using
command:
mkgroup postgres
- If postgres user does not exist, create user using
command:
usermod -G postgres postgres
Add a PostgreSQL database user to the PostgreSQL group, with data directory, logged in as a PostgreSQL user.
[root@zrh07xxd var]# mkdir AIXPostgres [root@zrh07xxd var]# chown -R postgres /var/AIXPostgres [root@zrh07xxd var]# chgrp -R postgres /var/AIXPostgres [root@zrh07xxd testpg]# su - postgres Last login: Tue Dec 17 12:59:14 CST 2019 on pts/2
- Check Postgres user exists using command
- Run the following
command:
Invoke thecd /opt/freeware/bin/ export PATH=$PATH:/opt/freeware/bin/
initdb
command from the bin folder and define the directory created in the steps above followed by argument -D. - Use
-W -A
arguments to prompt user for password-based authentication.bash-5.0$ initdb -U postgres -D "/var/AIXPostgres" -W -A md5The files belonging to this database system will be owned by user "postgres". This user must also own the server process. The database cluster will be initialized with locale "en_US". The default database encoding has accordingly been set to "LATIN1". The default text search configuration will be set to "english". Data page checksums are disabled. Enter new superuser password: Enter it again: fixing permissions on existing directory /var/AIXPostgres... ok creating subdirectories ... ok selecting default max_connections ... 100 selecting default shared_buffers ... 128MB selecting default timezone ... CST6CDT selecting dynamic shared memory implementation ... posix creating configuration files ... ok running bootstrap script ... ok performing post-bootstrap initialization ... ok syncing data to disk ... ok Success. You can now start the database server using: pg_ctl -D /var/AIXPostgres start