Install pgAdmin4 on Ubuntu 18/19/20.04

pgAdmin is an Open Source administration and management tool for the PostgreSQL database. It includes a graphical administration interface, an SQL query tool, a procedural code debugger and much more. The tool is designed to answer the needs of developers, DBAs and system administrators alike.

This guide will walk you through the steps to to set up pgAdmin4 on an Ubuntu 20.04 


Add pgAdmin Repository

Type the following command to add pgAdmin4 official repository on your Ubuntu:

curl https://www.pgadmin.org/static/packages_pgadmin_org.pub | sudo apt-key add
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 && apt update'

 

Install pgAdmin

Type below command to install pgAdmin4 on your Ubuntu:

sudo apt install pgadmin4

 

Configure pgAdmin

Web Type to below command to configure pgAdmin4 Web GUI:

sudo /usr/pgadmin4/bin/setup-web.sh
You will need to provide a username and password to be created for pgAdmin web gui login:
Setting up pgAdmin 4 in web mode on a Debian platform...
Creating configuration database...
NOTE: Configuring authentication for SERVER mode.

Enter the email address and password to use for the initial pgAdmin user account:

Email address: administrator@localhost
Password:
Retype password:
pgAdmin 4 - Application Initialisation
======================================

Creating storage and log directories...
We can now configure the Apache Web server for you. This involves enabling the wsgi module and configuring the pgAdmin 4 application to mount at /pgadmin4. Do you wish to continue (y/n)? y
The Apache web server is running and must be restarted for the pgAdmin 4 installation to complete. Continue (y/n)? y
Apache successfully restarted. You can now start using pgAdmin 4 in web mode at http://127.0.0.1/pgadmin4

 

Access pgAdmin Web Interface

Open up your favorite web browser and type http://your_ubuntu_ip/pgadmin4 in the address bar to access pgadmin4 web interface. You will see the following login page, enter your username and password you created earlier to log in:

Click Add New Server to add your PostgreSQL database server you would like to manage:

Enter your PostgreSQL name in the Name box, then click Connection tab.

Provide your PostgreSQL database credentials on the following screen and click Save button.

Conclusion

You now have successfully installed pgAdmin4 on your Ubuntu to access and manage your PostgreSQL database using pgAdmin4 web interface.

No comments:

Comments with links will not be published.

Powered by Blogger.