[go: up one dir, main page]

0% found this document useful (0 votes)
5 views1 page

INSTALL PSQL

The document outlines the steps to install and configure PostgreSQL 14 and pgAdmin on a system. It includes commands for updating the package list, installing necessary packages, setting up PostgreSQL roles and databases, and configuring pgAdmin. The final step provides a URL for accessing pgAdmin after installation.

Uploaded by

Njajal Studio
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views1 page

INSTALL PSQL

The document outlines the steps to install and configure PostgreSQL 14 and pgAdmin on a system. It includes commands for updating the package list, installing necessary packages, setting up PostgreSQL roles and databases, and configuring pgAdmin. The final step provides a URL for accessing pgAdmin after installation.

Uploaded by

Njajal Studio
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

sudo apt update && sudo apt -y full-upgrade

sudo apt install vim curl wget gpg gnupg2 software-properties-common apt-transport-https lsb-release
ca-certificates
apt policy postgresql
curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc|sudo gpg --dearmor -o
/etc/apt/trusted.gpg.d/postgresql.gpg

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 update
sudo apt install postgresql-14
sudo -i -u postgres
sudo nano /etc/postgresql/14/main/pg_hba.conf
sudo nano /etc/postgresql/14/main/postgresql.conf
sudo systemctl restart postgresql
sudo systemctl enable postgresql
sudo -u postgres psql
CREATE ROLE adminexo WITH LOGIN SUPERUSER CREATEDB CREATEROLE PASSWORD
'Passw0rd';
create database exodb;
grant all privileges on database exodb to adminexo;
Pgadmin
curl -fsSL https://www.pgadmin.org/static/packages_pgadmin_org.pub | sudo gpg --dearmor -o
/etc/apt/trusted.gpg.d/pgadmin.gpg
sudo sh -c 'echo "deb https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/$(lsb_release -cs)
pgadmin4 main" > /etc/apt/sources.list.d/pgadmin4.list'
sudo apt update && sudo apt upgrade
sudo apt install pgadmin4-web
sudo /usr/pgadmin4/bin/setup-web.sh
http://your-server-ip-address/pgadmin4

You might also like