• Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial News Comments FAQ Related Articles

How to Install PostgreSQL 11 on Ubuntu 19.04

  • 00:.39 wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
  • 00:46 sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" >> /etc/apt/sources.list.d/pgdg.list'
  • 00:58 apt install postgresql postgresql-contrib -y
  • 01:19 su – postgres
  • 01:22 psql
  • 01:50 ss -atulpn | grep postgres
{{postValue.id}}

Installation of PostgreSQL 11 on Ubuntu 19.04

Download Link :

wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -

Installation

Run the following command to import the GPG key for PostgreSQL packages.

root@linuxhelp:~# wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
OK

And then, add the repository to your system.

root@linuxhelp:~# sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" >> /etc/apt/sources.list.d/pgdg.list'

Install PostgreSQL on Ubuntu.

root@linuxhelp:~# apt install postgresql postgresql-contrib -y
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libllvm7 libpq5 postgresql-11 postgresql-client-11 postgresql-client-common postgresql-common sysstat
Suggested packages:
  postgresql-doc postgresql-doc-11 libjson-perl isag
The following NEW packages will be installed:
  libllvm7 libpq5 postgresql postgresql-11 postgresql-client-11 postgresql-client-common postgresql-common
.
.
.
.
.
.
Processing triggers for systemd (240-6ubuntu5) ...
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for libc-bin (2.29-0ubuntu2) ...

After the installation of the postgresql database server, by default, it creates a user postgres and creates an account with role postgres.

root@linuxhelp:~# su – postgres

Connect to PostgreSQL 11 by triggering the following command.

%postgres@linuxhelp:~$ psql%
psql (11.3 (Ubuntu 11.3-0ubuntu0.19.04.1))
Type "help" for help.

postgres=# \conninfo
You are connected to database "postgres" as user "postgres" via socket in "/var/run/postgresql" at port "5432".
postgres=# \q

Once it is done, check the listening port of PostgreSQL by executing the followong command.

postgres@linuxhelp:~$ ss -atulpn | grep postgres
tcp    LISTEN   0        128             127.0.0.1:5432           0.0.0.0:*      users:(("postgres",pid=35697,fd=3)) 

With this, the installation of PostgreSQL 11 on Ubuntu 19.04 comes to end.

Tags:
symonds
Author: 

Comments ( 0 )

No comments available

Add a comment
{{postCtrl.cmtErrMsg}}

Frequently asked questions ( 5 )

Q

What is the use of PostgreSQL?

A

PostgreSQL is a general purpose object-relational database management system. It allows users to add custom functions developed using different programming languages such as C/C++, Java, etc.

Q

What are the main differences between MySQL and PostgreSQL?

A

The governance model is the main difference between MySQL and PostgreSQL. MySQL is controlled by Oracle whereas Postgres is available under an open-source license from the PostgreSQL Global Development Group

Q

What are the features of PostgreSQL?

A

Complex SQL queries
SQL Subselects
Foreign Keys
Trigger views
Transactions
Multiversion currency COntrol
Streaming Replication
Hot Standby

Q

What does streaming replication mean in PostgreSQL?

A

The streaming replication provides the capability to continuously ship and applies the WAL XLOG records to some number of standby servers in order to keep them current in PostgreSQL.

Q

What is WAL XLOG in PostgreSQL?

A

In PostgreSQL, the history data are known as XLOG records or WAL data.

Back To Top!
Rank
User
Points

Top Contributers

userNamenaveelansari
135850

Top Contributers

userNameayanbhatti
92510

Top Contributers

userNamehamzaahmed
32150

Top Contributers

1
userNamelinuxhelp
31040

Top Contributers

userNamemuhammadali
24500
Can you help Isaiah ?
What is the use of SUID & SGID commands

How to set the special permissions to the files and folders using SUID and SGID commands...

Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2025 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.