PgAdmin Installation and Configuration
PgAdmin4 Installation and Configuration
PgAdmin is a GUI designed specifically for PostgreSQL. It works very well. It can run as either a local GUI program or a web service. Since PgAdmin’s GUI components have display issues on Retina screens, this guide primarily covers how to configure and run PgAdmin4 as a web service (Python Flask).
Download
PgAdmin can be downloaded from the official FTP.
PostgreSQL website FTP directory
You can also download from the official Git Repo:
Install Dependencies
First, you need to install Python - either version 2 or 3 will work. Here we’ll use administrator privileges to install the Anaconda3 distribution as an example.
First create a virtual environment (though using the physical environment directly is also fine):
Based on your Python version, install dependencies according to the corresponding requirements file.
Configuration Options
First run the initialization script to create the PgAdmin administrator user.
Follow the prompts to enter email and password.
Edit web/config.py to modify default configuration, mainly changing the listen address and port.
Change the listen address to 0.0.0.0 to allow access from any IP.
Modify the port as needed.
