Install pgadmin4 in ubuntu 20.04
PgAdmin is one of the most popular tools for managing postgresql database.you can have a graphical interface to manage everything related to PostgreSQL.This article guides you on how to install pgAdmin4 on Ubuntu 20.04.
Also Read -> Install phpPgAdmin On CentOS 7
Step 1: Install Pgadmin 4
Pgadmin4 is not available in the ubuntu default repositories.we nned to add external pgadmin4 repository.First we will add the GPG key to the repository.
curl https://www.pgadmin.org/static/packages_pgadmin_org.pub | sudo apt-key add
Now create repository config file.
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'
Now update with apt and install pgadmin4
apt update
apt install pgadmin4
Once the installation is complete, run the web setup script to configure the system to run in web mode and promts to enter pgadmn4 login email and password as shown below.
We hope you are following "How to Install PgAdmin4 on Ubuntu 20 04" step by step carefully. The remaining steps will help you to finish the upgrade process..
root@ubuntu20:~# sudo /usr/pgadmin4/bin/setup-web.sh
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: admin@lampblogs.net
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
Step 2: Access web interface
To access the pgadmin4web application interface, open your favorite web browser, and type following address
Also Read -> Install PostgreSQL in XAMPP on Windows and integrate phpPgAdmin
http://server_ip_address/pgadmin4 (Replace your server ip).
Now, enter the email address and password you created during the installation.
Add a PostgreSQL server to administer with pgAdmin by clicking on 'Add New Server'. Under General section give the server a name & description as below.
save the details. Then go to 'connection' Tab and enter access details like hostname, DB user and Password like below.
Next Click on 'save' button to save the configurations. now you are successfully added the server, the name will display in the left side as shown below.
That's it.You have successfully installed pgAdmin4 on your Ubuntu 20.04 server.