How to Install pgAdmin 4 on Ubuntu 16.04 – Ubuntu 18.04

PgAdmin is an open source graphical administration platform for PostgreSQL. You are able to manipulate schema and data on an instance or multiple instances of PostgreSQL engines.

Requirements

  • SSH Access
  • Admin Account
  • Ubuntu 16.04/18.04

Install dependencies

Enter the following command in SSH to install dependencies

sudo apt-get install build-essential libssl-dev libffi-dev libgmp3-dev virtualenv python-pip libpq-dev python-dev

Create Virtual Environment

The following command will create a Virtual Environment

virtualenv .pgadmin
cd .pgadmin4
source bin/activate

Install Python Wheel

wget https://ftp.postgresql.org/pub/pgadmin/pgadmin4/v1.4/pip/pgadmin4-1.4-py2.py3-none-any.whl

pip install pgadmin4-1.4-py2.py3-none-any.whl 

Configure

Write the SERVER_MODE = False in lib/python2.7/site-packages/pgadmin4/config_local.py to configure to run in single-user mode:

echo "SERVER_MODE = False" >> lib/python2.7/site-packages/pgadmin4/config_local.py

Run

python lib/python2.7/site-packages/pgadmin4/pgAdmin4.py

pgAdmin can be accessed at http://localhost:5050

yoast seo premium free
%d bloggers like this: