PgAdmin 4 is a rewrite of the popular pgAdmin3 management tool for the PostgreSQL database.
PgAdmin is the leading graphical Open Source management, development and administration tool for PostgreSQL.
In this tutorial, we are going to show you How to install PgAdmin 4 in Desktop Mode on Ubuntu 16.04 LTS.
If you didn’t yet install PostgreSQL take a look the below links :
- How to Install PostgreSQL on Ubuntu 16.04 LTS
- How To Install PostgreSQL 9.6 on CentOS 7 / RHEL 7
- How To Change PostgreSQL Data Directory Location on Ubuntu 16.04
- How To Enable Network Remote Access To PostgreSQL Database Server
- How to install PgAdmin 4 in Server mode on Ubuntu 16.04 LTS
- How to install pgAdmin 4 in Server mode as web application on CentOS 7 / RHEL 7
Step 1. Installation Packages
# sudo apt-get install build-essential libssl-dev libffi-dev libgmp3-dev virtualenv python-pip libpq-dev python-dev
Step 2. Create the virtual environment
# cd /opt/ # mkdir enviromentpy # cd enviromentpy/ # virtualenv pgadmin4 # cd pgadmin4 # source bin/activate
Step 3. Download and install PGAdmin 4
# wget https://ftp.postgresql.org/pub/pgadmin/pgadmin4/v1.3/pip/pgadmin4-1.3-py2.py3-none-any.whl # pip install pgadmin4-1.3-py2.py3-none-any.whl
Step 4. Create the local configuration file for PGAdmin 4
# cd lib/python2.7/site-packages/pgadmin4 # touch config_local.py
– Edit config_local.py and add any desired configuration options (use the config.py file as a reference – any settings duplicated in config_local.py will override those in config.py). To configure PGAdmin 4 to run in single-user mode add the following line:
# echo "SERVER_MODE = False" >> lib/python2.7/site-packages/pgadmin4/config_local.py
Step 4. Run PGAdmin 4
# python lib/python2.7/site-packages/pgadmin4/pgAdmin4.py . Enter the email address and password to use for the initial pgAdmin user account: Email address: firstname.lastname@example.org
– you will prompt it to add an email address and a password to access PGAdmin 4
Now Access at http://localhost:5050 and connect your PostgreSQL Server
We hope this tutorial was enough Helpful. If you need more information, or have any questions, just comment below and we will be glad to assist you!
PS. If you like this post please share it with your friends on the social networks using the buttons below.Thanks.