This article is half-done without your Comment! *** Please share your thoughts via Comment ***
PostgreSQL recently launched the new pgAdmin 4 tool to access the PostgreSQL Database Server.
In this post, I am sharing steps to install pgAdmin 4 desktop mode in Ubuntu 16.04.
First, create a virtual environment:
1 |
sudo apt-get install virtualenv python-pip libpq-dev |
Create pgadmin4 virtual environment:
1 2 |
cd virtualenv pgadmin4 |
Now, go to pgadmin4 and activate it:
1 2 |
cd pgadmin4 source bin/activate |
Download the pgadmin4:
1 |
wget https://ftp.postgresql.org/pub/pgadmin/pgadmin4/v1.4/pip/pgadmin4-1.4-py2.py3-none-any.whl |
Just check the pgadmin4:
1 2 3 4 5 6 7 8 9 10 |
ls -ltr postgres@ip-172-31-27-19:~/pgadmin4$ ls -ltr total 24 drwxrwxr-x 3 postgres postgres 4096 Jul 18 20:07 lib drwxrwxr-x 2 postgres postgres 4096 Jul 18 20:07 include drwxrwxr-x 3 postgres postgres 4096 Jul 18 20:07 share drwxrwxr-x 2 postgres postgres 4096 Jul 18 20:07 local -rw-rw-r-- 1 postgres postgres 60 Jul 18 20:07 pip-selfcheck.json drwxrwxr-x 2 postgres postgres 4096 Jul 18 20:07 bin |
Now install pgadmin4:
1 |
pip install pgadmin4-1.4-py2.py3-none-any.whl |
Do activate:
1 2 |
cd ~/pgadmin4 source bin/activate |
Execute require python script:
1 |
python lib/python2.7/site-packages/pgadmin4/pgAdmin4.py |
Check the output:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
pgAdmin 4 - Application Initialisation ====================================== The configuration database - '/var/lib/postgresql/.pgadmin/pgadmin4.db' does not exist. Entering initial setup mode... NOTE: Configuring authentication for SERVER mode. Enter the email address and password to use for the initial pgAdmin user account: Email address: anveshpatel88@gmail.com Password: Retype password: Password must be at least 6 characters. Please try again. Password: Retype password: The configuration database has been created at /var/lib/postgresql/.pgadmin/pgadmin4.db Starting pgAdmin 4. Please navigate to http://localhost:5050 in your browser. |
Access pgadmin4 in a browser:
1 |
http://localhost:5050 |