postgres install linux code example

Example 1: ubuntu install postgresql 12

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

Example 2: install postgresql ubuntu

sudo apt install postgresql postgresql-contrib

Example 3: how to install postgres in ubuntu

root@pooja-virtual-machine:~# apt-get install postgresql-11

Tags:

Sql Example