- Learning PostgreSQL 10(Second Edition)
- Salahaldin Juba Andrey Volkov
- 108字
- 2021-07-02 22:42:09
Installing PostgreSQL using Advanced Package Tool
Advanced Package Tool (APT) is used to handle the installation and removal of software on Debian and Debian-based distributions such as Ubuntu operating system.
As has been stated earlier, recent PostgreSQL binaries might not yet be integrated with the official Debian and Ubuntu repositories. To setup PostgreSQL apt repository on Debian or Ubuntu one can execute the following:
$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
After adding a new apt repository, it is good to upgrade your system as follows:
$sudo apt-get upgrade