December 2017
Intermediate to advanced
316 pages
6h 58m
English
PostgreSQL is an open-source database that can be installed on multiple platforms. On Ubuntu, it can be installed using the following commands:
To add the repo to the package list:
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 -q https://www.postgresql.org/media/keys/ACCC4CF8.asc -O - | sudo apt-key add -
To update the package list:
sudo apt-get update apt-get install postgresql postgresql-contrib
This installs the database on an Ubuntu machine and starts a server on port 5432. Now, in order to enter the database shell, use these commands. PostgreSQL creates a default user called postgres to log in. Take a look at the ...