Skip to content

Latest commit

Β 

History

History
72 lines (54 loc) Β· 2.85 KB

File metadata and controls

72 lines (54 loc) Β· 2.85 KB

FormaServe f_Learning Repository

FormaServe Logo

Welcome to our Postgress Cribsheet πŸ‘‹

This is a collection of notes and snippets that I have written to help you get started with PostgreSQL.

Hopefully, they will be of use to you.

Commands

Description Command
YUM Install yum install postgresql12-server postgresql12-contrib
Create Postgres Profile CRTUSRPRF USRPRF(POSTGRES) USRCLS(*SECOFR) TEXT('Profile for POSTGRESQL database') HOMEDIR('/home/postgres')
Create Postgres Home Directory mkdir /home/postgres
Change Postgres Directory Owner mkdir /home/postgres
Change Postgres Directory Owner mkdir /home/postgres
Set Environment Variables export PGDATA=/home/postgres
Ensure Path Set export PATH=$PATH:/QOpenSys/pkgs/bin/
PostgreSQL Init initdb -E UTF-8 -D /home/postgres -W -A scram-sha-256
Start Postgres server pg_ctl -D /home/postgres -l logfile start
End Postgres server pg_ctl -D /home/postgres -l logfile stop
Postgres Port No 5432
Check Server NETSTAT *CNN - Look for port 5432
Check Server Looking for postgres jobs in QUSRWRK subsystem
Submit Start Server to Batch using POSTGRES profile SBMJOB CMD(QSH CMD('/QOpenSys/pkgs/bin/pg_ctl -D /home/postgres -l logfile start')) JOB(STR_POSTGR)
Enter Postgress from BASH psql

πŸ‘¨β€πŸ« Training

We are still providing training in these strange times. Get in contact here. if you have any questions or comments. We will be happy to help you.

✍🏻 Authors

FormaServe Systems Ltd - All work - FormaServe

😊 Contributors

  • Andy Youens - FormaServe
  • Nick Youens - FormaServe

πŸ‘ Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

🚩 Connect with us

β˜•Support

coffee

Β 

Β 

πŸ“ License

License

Open Source on IBM i - Oh Yea!

πŸ‘πŸ‘