pgAdmin 4 Installation
using these pages as reference
sudo apt-get install virtualenv python-pip libpq-dev python-dev
mkdir -p ~/pgadmin4/
cd ~/pgadmin4
virtualenv venv -p /usr/bin/python2.7
source ./venv/bin/activate/
Check available versions of pgAdmin 4.
wget https://ftp.postgresql.org/pub/pgadmin/pgadmin4/v1.6/pip/pgadmin4-1.6-py2.py3-none-any.whl
pip install pgadmin4-1.6-py2.py3-none-any.whl
echo "# coding: utf-8
from config import *
SERVER_MODE = False
# Secret key for signing CSRF data. Override this in config_local.py if
# running on a web server
CSRF_SESSION_KEY = 'MyAlternateSuperSecret1'
# Secret key for signing cookies. Override this in config_local.py if
# running on a web server
SECRET_KEY = 'MyAlternateSuperSecret2'
# Salt used when hashing passwords. Override this in config_local.py if
# running on a web server
SECURITY_PASSWORD_SALT = 'MyAlternateSuperSecret3'
" > ./venv/lib/python2.7/site-packages/pgadmin4/config_local.py
python ./venv/lib/python2.7/site-packages/pgadmin4/pgAdmin4.py
Create pgAdmin4.sh and pgAdmin4.desktop files
~/pgadmin4/pgAdmin4.sh
#! /bin/sh
source ~/pgadmin4/venv/bin/activate
python ~/pgadmin4/venv/local/lib/python2.7/site-packages/pgadmin4/pgAdmin4.py &
sleep 5; sensible-browser http://127.0.0.1:5050
~/.local/share/applications/pgAdmin4.desktop
[Desktop Entry]
Name=pgAdmin 4
Exec=~/apps/pgadmin4/pgAdmin4.sh
Icon=~/apps/pgadmin4/pgadmin.svg
Type=Application
Categories=Database
Terminal=false