Disclaimer

This information HAS errors and is made available WITHOUT ANY WARRANTY OF ANY KIND and without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. It is not permissible to be read by anyone who has ever met a lawyer or attorney. Use is confined to Engineers with more than 370 course hours of engineering.
If you see an error contact:
+1(785) 841 3089
inform@xtronics.com

Postgresql


set main password

Default user is postgres with no password other than being the postgresql user, so we need to set it up:

su - postgres  ; become the postgresql user
createuser -DRS root ; Create a root user and others you might need.
psql template1 ; mess with the template1 database - enter postgresql shell
ALTER USER postgres PASSWORD 'CHANGE'; where CHANGE is your new password
ALTER USER root PASSWORD 'CHANGE'; Change other users
\q ; exit the postgresql shell
exit ; stop being postgresql user

# TYPE  DATABASE USER CIDR-ADDRESS METHOD 
host all postgres 192.168.1.1/24 md5  ; where you list a user name and your LAN address
listen_addresses = '*'  ; listen to all addresses

listen_address won't take network notation instead:

The value takes the form of a comma-separated list of host names and/or numeric IP addresses.

Creating a database

The example here is for postbooks


Top Page wiki Index