Setting up PostgreSQL on Arch Linux
• 1 min read
Install
$ sudo pacman -S postgresql
Setup the data directory
$ sudo -iu postgres
[postgres]$ initdb -D /var/lib/postgres/data
Start postgresql.service
$ systemctl start postgresql.service
$ systemctl enable postgresql.service
Add user
[postgres]$ createuser --interactive
Create db
$ createdb myDatabaseName