How to Install and Use PostgreSQL on Ubuntu 18.04

Ads
 

How to Install and Use PostgreSQL on Ubuntu 18.04

Hi,

I want to install PostgreSQL on Ubuntu 18.04. I have Ubuntu 18.04 desktop installed on my system and need to install it.

What are the process of installing PostgreSQL on Ubuntu 18.04 operating system?

Thanks

View Answers

January 30, 2019 at 3:21 AM

Hi,

You can install Postgresql database on your Ubuntu 18.04 with following commands:

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

After completion of installation run postgresql service with following command:

sudo systemctl restart postgresql

You can check the status of service with following command:

sudo systemctl status postgresql.service

This will give following output:

[email protected]:/home/deepak# sudo systemctl status postgresql.service
  postgresql.service - PostgreSQL RDBMS
   Loaded: loaded (/lib/systemd/system/postgresql.service; enabled; vendor preset: enabled)
   Active: active (exited) since Wed 2019-01-30 14:38:20 IST; 12min ago
 Main PID: 22168 (code=exited, status=0/SUCCESS)
    Tasks: 0 (limit: 2320)
   CGroup: /system.slice/postgresql.service

Jan 30 14:38:20 deepak-VirtualBox systemd[1]: Starting PostgreSQL RDBMS...
Jan 30 14:38:20 deepak-VirtualBox systemd[1]: Started PostgreSQL RDBMS.

Thanks

Ads









Related Tutorials/Questions & Answers:
How to Install and Use PostgreSQL on Ubuntu 18.04
How to Install and Use PostgreSQL on Ubuntu 18.04  Hi, I want to install PostgreSQL on Ubuntu 18.04. I have Ubuntu 18.04 desktop installed on my... on Ubuntu 18.04 operating system? Thanks   Hi, You can install Postgresql
How to Install and Use PostgreSQL on Ubuntu 18.04
How to Install and Use PostgreSQL on Ubuntu 18.04  Hi, I want to install PostgreSQL on Ubuntu 18.04. I have Ubuntu 18.04 desktop installed on my... on Ubuntu 18.04 operating system? Thanks   Hi, You can install Postgresql
Advertisements
install graphviz ubuntu 18.04
install graphviz ubuntu 18.04  Hi, How to install graphviz ubuntu 18.04? Thanks   Hi, here are commands: sudo add-apt-repository universe sudo apt update sudo apt install graphviz Thanks
How to install JDK 10 in Ubuntu 18.04?
Java/JDK 10: How to install JDK 10 in Ubuntu 18.04? Java/JDK 10 is already.... Here are the steps of install JDK 10 on Ubuntu 18.04 Step 1: Install using... of this release. The Ubuntu 18.04 is latest release of Ubuntu operation system
install nvm ubuntu 18.04
that's why i want to use nvm. How to install nvm on Ubuntu 18.04? Thanks  ...install nvm ubuntu 18.04  Hi, I want to install the nvm tool... application development. On ubuntu you can install with following command: curl
install nvm ubuntu 18.04
that's why i want to use nvm. How to install nvm on Ubuntu 18.04? Thanks  ...install nvm ubuntu 18.04  Hi, I want to install the nvm tool... application development. On ubuntu you can install with following command: curl
Install Spark on Ubuntu 18.04
How to Install Spark on Ubuntu 18.04 and test? Installing Apache Spark latest.... In this section we are going to install Apache Spark on Ubuntu 18.04 for development... purpose we will install Ubuntu 18.04 operating system on Oracle VirtualBox
Install Spark on Ubuntu 18.04
How to Install Spark on Ubuntu 18.04 and test? Installing Apache Spark latest.... In this section we are going to install Apache Spark on Ubuntu 18.04 for development... purpose we will install Ubuntu 18.04 operating system on Oracle VirtualBox
How to install OpenJDK 8 in Ubuntu 18.04?
How to install OpenJDK 8 in Ubuntu 16.04/18.04? In this tutorial we are going... of JDK. You can use the apt-get installer on Ubuntu operating system to install OpenJDK easily. Steps to install OpenJDK 8 in Ubuntu 18.04 Let's follow the step
how to install anaconda in ubuntu
how to install anaconda in ubuntu  Hi, I have to use Ubuntu... to now install Anaconda Python on Ubuntu and trying to find steps to do it. how to install anaconda in ubuntu? Thanks   Hi, Anaconda Python distribution
How to install Ubuntu 16.04 LTS?
How to install Ubuntu 16.04 LTS?  Hi, Latest version of Ubuntu 16.04 LTS. This video tutorial teaches you to install Ubuntu 16.04 LTS on Your Oracle Virtual Box. Thanks   How to install Ubuntu 16.04 LTS
How to download and install Ubuntu 16.04?
How to download and install Ubuntu 16.04?  Hi, Recently Ubuntu 16.04... to download and install it computer. Tell me How to download and install Ubuntu 16.04...;Hi, Here are steps to download and install Ubuntu 16.04 LTS: Download
How to install Neo4j on Ubuntu 15.10?
How to install Neo4j on Ubuntu 15.10?  How to install the latest version of Neo4j on Ubuntu? Thanks
How to install ffmpeg on Ubuntu 16.04?
computer. I forgot the command to install ffmpeg . How in can install ffmpeg on Ubuntu 16.04? Thanks   Hi, How to install ffmpeg on Ubuntu 16.04? Use...How to install ffmpeg on Ubuntu 16.04?  Hi, My new Ubuntu 16.04 LTS
How to install pip on Ubuntu 16.04?
How to install pip on Ubuntu 16.04?  Hi, How to install pip on Ubuntu 16.04? I am running the command apt-get install pip, but its not working. Thanks   Hi, You can us the Correct command: sudo apt-get install
How to install p7zip on Ubuntu 16.04?
How to install p7zip on Ubuntu 16.04?  Hi, What is the correct command to install p7zip on Ubuntu? How to install p7zip on Ubuntu 16.04? Thanks   Hi, To install p7zip on Ubuntu 16.04 following the following steps
How to install virtualbox guest additions in Ubuntu 16.04?
How to install virtualbox guest additions in Ubuntu 16.04?  Hi, How to install virtualbox guest additions in Ubuntu 16.04? The problem is I am.... Thanks   Hello, After installing the virtualbox guest additions in Ubuntu
How to install autoconf, automake and libtool in Ubuntu 15.10?
How to install autoconf, automake and libtool in Ubuntu 15.10?  Hi, How to install autoconf, automake and libtool in Ubuntu 15.10? Thanks   For installing these components use the following command: sudo apt-get
How to install MySQL Server and Client on Ubuntu 16.04?
How to install MySQL Server and Client on Ubuntu 16.04?  Hi, Latest... want to learn MySQL and finding tutorials for installing MySQL. How to install... to install MySQL on Ubuntu 16.04. Command: Install MySQL 5.7: First of all update
How to install jre on Ubuntu 16.04 LTS?
How to install jre on Ubuntu 16.04 LTS?  Hi, I have installed Ubuntu... with the tutorial for installing jre on Ubunut. How to install jre on Ubuntu 16.04 LTS? Thanks   Hi, Its easy to install jre on Ubuntu. Use following
How to install Oracle JDK 8 on Ubuntu?
How to install Oracle JDK 8 on Ubuntu?  Hi, What are the steps to install Oracle JDK 8 on Ubunut? I am installing JDK 8 on Ubuntu 14.04. Thanks... to install Oracle JDK 8 on Ubuntu? In this tutorial I will show you how you can install
how to install wireshark 2.6 2 on ubuntu 16.04
how to install wireshark 2.6 2 on ubuntu 16.04  Hi, how to install wireshark 2.6 2 on ubuntu 16.04? Thanks   Hi, You can to add Add... wireshark 2.6 2 on ubuntu 16.04 with following command: sudo apt-get install
how to install anaconda in ubuntu for all users
how to install anaconda in ubuntu for all users  Hi, I want to install anaconda for all users in Ubuntu. how to install anaconda in ubuntu for all... directory as described in following tutorial: how to install anaconda
How To Install Google Chrome on Ubuntu 16.04?
How To Install Google Chrome on Ubuntu 16.04?  Hi, What are the correct steps to install Chrome on Ubuntu 16.04? How To Install Google Chrome on Ubuntu 16.04? Thanks   HI, Follow the steps given below to install
How to install LAMP server on Ubuntu 16.04 LTS?
How to install LAMP server on Ubuntu 16.04 LTS?  I have given the task to install LAMP sever on Ubuntu 16.04 LTS. How to install LAMP server on Ubuntu 16.04 LTS? Thanks   Hi, For install LAMP on Ubuntu 16.04 LTS apt
How to install gtk-doc-tools package in Ubuntu?
How to install gtk-doc-tools package in Ubuntu?  How to install gtk... how to install this package on Ubuntu? To install gtk-doc-tools package on Ubuntu you can open the terminal and then type following command: apt-get install
How to install Eclipse in Ubuntu using terminal?
How to install Eclipse in Ubuntu using terminal?  Hi, How to install Eclipse in Ubuntu using terminal? I am looking for good explanation for installing the eclipse on Ubuntu 16.04. Thanks   Hi, You can use
Installing oracle Java 8 on Ubuntu 18.04
Installing oracle Java 8 on Ubuntu 18.04  Hi, What are the steps for installing oracle java 8 on ubuntu 18.04? I want to install Oracle Java 8 on my Ubuntu 18.04 desktop. Ubuntu 18.04 is the latest version of Ubuntu Server
How to Install Oracle Java JDK 8 in Ubuntu 16.04?
How to Install Oracle Java JDK 8 in Ubuntu 16.04?  Hi, Let's know the commands to install Oracle Java 8 on Ubuntu 16.04. How I can install Oracle Java 8? How to Install Oracle Java JDK 8 in Ubuntu 16.04? Thanks   Hi
pip install beautifulsoup - install beautifulsoup on Ubuntu
want to install beautifulsoup on my Ubuntu desktop operating system. What is the command to install beautifulsoup on Ubuntu 18.04? Thanks   Hi... then use following command: pip install beautifulsoup4 or with easy install
How to download install and use MySQL workbench?
How to download install and use MySQL workbench?  Hi, What are the steps of download and install MySQL workbench on Windows computer? Thanks   Hi, You can download the MySQL workbench from mysql.com and then install

Ads