install postgresql debian 10 code example

Example 1: install postgresql ubuntu

sudo apt install postgresql postgresql-contrib

Example 2: how to install postgresql in manjaro

sudo pacman -S yay
yay -S postgresql pgadmin4

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

sudo systemctl enable --now postgresql
sudo systemctl status postgresql

Example 3: install postgresql 12 on debian 10

sudo apt update
sudo apt -y install postgresql-12 postgresql-client-12

Example 4: debian install postgresql

apt-get install postgresql-12

Example 5: postgres setup Linux Debian

sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get -y install postgresql-12

Tags:

Sql Example