Live Chat
True
FAQs
Technical

How to install Pgadmin4 for manage postgresql database on ubuntu

#install pgadmin4

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'

cat /etc/apt/sources.list.d/pgadmin4.list

 

sudo apt update


sudo apt install pgadmin4

sudo /usr/pgadmin4/bin/setup-web.sh

#set password for postgres user (without this step you can't register server to login by pgadmin4 on postgresql)

su - postgres

psql

\password postgres

#wirte your password like postgres

#quite

\q

#return to your root user again

su root

#create direction for log and add user 'root' or any other ubuntu user for this direction

mkdir -p /var/log/pgadmin4/

 mkdir -p /var/lib/pgadmin4/{sessions,storage}

chown -R root:root /var/log/pgadmin4/ /var/lib/pgadmin4/

#restart postgresql service 

sudo service postgresql restart

#login to you pgadmin4 on web browser using your server ip/pgadmin4 like 192.168.1.2/pgadmin4

 


Was this article helpful?

FAQ HOME

To install this Web App in your iPhone/iPad press and then Add to Home Screen.