- Download apt key https://www.pgadmin.org/static/packages_pgadmin_org.pub and add key
# wget https://www.pgadmin.org/static/packages_pgadmin_org.pub
# apt-key add packages_pgadmin_org.pub
- Create and append pgadmin4 repository
# echo "deb https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/$(lsb_release -cs) pgadmin4 main" > /etc/apt/sources.list.d/pgadmin4.list
- Run update & install pgadmin4-desktop
# apt-get update
# apt-get install pgadmin4-desktop
By default postgres user has no password in database (not system).
You need to set/change postgres database password. From root linux shell# su - postgres
$ psql
# \password
<type_your_password>
Try login to your postgres using psql$ psql -U postgres -h localhost
Password for user postgres:
psql (11.7 (Debian 11.7-0+deb10u1))
SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, bits: 256, compression: off)
Type "help" for help.
postgres=#
After running pgadmin4, pgadmin4 server will started and the first
time you need to create master password (NOTE: master password is
password to use pgadmin4).
Connect to your local postgresql server
- From your browser http://127.0.0.1:41271/browser/, Add New Server
- Fill
- Connection: localhost (your connection name)
- Port: 5432
- Maintenance Database: postgres
- Username: postgres
- Password: <your password>
- and Save
Reference:
https://www.pgadmin.org/download/pgadmin-4-apt/