Setup
Local Setup
brew install postgresqlFollow instructions onscreen(brew services start postgresql & initdb /usr/local/var/postgres )
postgres -V
psql to enter cml
On Server
Create Ubuntu server on whatever Cloud Provider with some hard disk space or something idk
Install postgres
sudo apt update
sudo apt -y install postgresql postgresql-client postgresql-contribSetup user
Default user is postgres, but you need to set the password as it doesn't have one
sudo -u postgres psql postgres
\password postgres
#add password
CREATE EXTENSION adminpack; #enables server instrumentation
\qEdit
pg_hba.conf
sudo nano /etc/postgresql/12/main/pg_hba.confip4.me => Get your ipv4 address
# IPv4 remote connections for the tutorial:
host all all [YOUR_IPV4_ADDRESS]/32 md5Edit
postgresql.confto listen on all IP addresses
sudo nano /etc/postgresql/12/main/postgresql.confFind the line:
#listen_addresses = 'localhost'And turn into:
listen_addresses = '*'Save, exit, and restart in bash
sudo service postgresql restartFor your cloud provider make sure the server can be accessed by all IPs
Last updated