How to install PostgreSQL 15 on Ubuntu 22.04

Steps to be followed

  1. Enable the PostgreSQL package repository via command

# 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 -qO- https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo tee /etc/apt/trusted.gpg.d/pgdg.asc &>/dev/null

  1. Install PostgreSQL 15 server and client database via command

# apt install postgresql postgresql-client -y

  1. After that, check the PostgreSQL service status via the screenshot command

   4. To verify the version, run the below screenshot command

   5. If needed, change the PostgreSQL password of the Admin user

# sudo -u postgres psql

And add the below command line in that,

ALTER USER postgres PASSWORD 'demoPassword';

/q --- command is for the end the current session with the server

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to add IP Address to servers

1.Login to the server via RDP. 2.In the Run window type NCPA.CPL. 3.In the network properties...

How to configure IP's on Ubuntu 18?

To configure a static IP address on your Ubuntu 18.04 server you need to modify a relevant...

How to install Wordpress in webmin

  The following steps are followed for installing Wordpress in Webmin   Open File Manager in...

How to install Webmin in CentOs

  Installing webmin using YUM repository Create a .repo file using a command # nano...

How to install Virtualmin in webmin

  Steps for Installing Virtualmin on Webmin (Ubuntu):   Setting the hostname and FQDN For...

Powered by WHMCompleteSolution