How to install Postgres on Arch/Manjaro

2019-05-11

Alan Vardy
 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
Like what you see?

Related Posts