Steps to be followed
- 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
- Install PostgreSQL 15 server and client database via command
# apt install postgresql postgresql-client -y
- 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