@Fabrizio de Royes Mello, Even upon making changes as per your suggestion, I could see that initdb is failing for the same reason:
*******************************************************************************************************************
/mswitch/pgsql/bin # ./initdb -D ../data/
The files belonging to this database system will be owned by user "root".
This user must also own the server process.
The database cluster will be initialized with locale "C".
The default database encoding has accordingly been set to "SQL_ASCII".
The default text search configuration will be set to "english".
Data page checksums are disabled.
fixing permissions on existing directory ../data ... ok
creating subdirectories ... ok
selecting default max_connections ... 10
selecting default shared_buffers ... 400kB
creating configuration files ... ok
creating template1 database in ../data/base/1 ... "root" execution of the PostgreSQL server is not permitted.
The server must be started under an unprivileged user ID to prevent
possible system security compromise. See the documentation for
more information on how to properly start the server.
child process exited with exit code 1
initdb: removing contents of data directory "../data"
*******************************************************************************************************************
Please let me know if I need to make changes in any other place. Appreciate your help!