Skip to content

Posts tagged postgresql

Posts under this tag. Back to all posts when you want the full stream.

@latest_post

Install PostgreSQL in Linux

Installation process

Setting up PostgreSQL in Manjaro Linux is very easy.

Just follow these steps and you'll have a working installation in no time.

Install the postgresql package:

sudo pacman -S postgresql postgresql-libs postgis

Switch to the postgres user account and initialize the database cluster:

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

Options for initdb are as follows:

  • --locale is the one defined in /etc/locale.conf.
  • -E is the default encoding for new databases.
  • -D is the default location for storing the database cluster.

You can have it always running when your machine starts with:

sudo systemctl enable --now postgresql.service

Otherwise, you could start, stop or restart it when needed with:

sudo systemctl start postgresql.service
sudo systemctl stop postgresql.service
sudo systemctl restart postgresql.service

Writing stream

1 older posts tagged postgresql.