How to install Postgres on Arch/Manjaro

Created: May 11, 2019 16:01 | Updated: May 11, 2019 16:03
Tags: Linux, Postgres

Install Postgresql with yay.

sudo yay postgresql
sudo yay postgresql-libs

Initialize

sudo su postgres -l # or sudo -u postgres -i
initdb --locale $LANG -E UTF8 -D '/var/lib/postgres/data/'
exit

Start and enable the service

systemctl start postgresql.service
systemctl enable postgresql.service

and then add your username

sudo -u postgres -i
createuser --interactive
YOUR_USER_NAME
y
logout

Written by Alan Vardy. Let me know how I can make this better!