PgAdmin4 is an open source PostgreSQL management tool
designed for multiple PostgreSQL database versions. It is a
tool written in python and jquery and can be installed on
Windows, Mac, and Linux. It provides multiple deployment
models, can be installed as a desktop application or a server
application running behind the webserver such as Apache2.
We're going to install and configure PgAdmin4 in 'Server Mode' on Ubuntu
18.04 server.
Pre-requisites:
root user / sudo access.
PostgreSQL installation on Ubuntu 18.04 Server
To install the PostgreSQL database from the official repository, add the Postgres
key and repository by running following commands
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc \
| sudo apt-key add -
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-
pgdg main" >> /etc/apt/sources.list.d/pgdg.list'
Update the system
sudo apt update
Install PostgreSQL and its dependent repositories
sudo apt -y install postgresql postgresql-contrib
Once the installation is complete login with default user named as
"postgres" and run psql command
from command line
su - postgres
psql
Now add new password to the default postgres user using following command as
Pgadmin4 installation from Repository
1. Adding postgreSQL repository (Downloading the key first)
Download the key and add the repository using following commands:
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc \
| sudo apt-key add -
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`
-pgdg main" >> /etc/apt/sources.list.d/pgdg.list'
2. Installation of Pgadmin4
update the system if not done already
sudo apt update
sudo apt install pgadmin4 pgadmin4-apache2 -y
you can add your own email address and password
Once the installation is complete , you can access the Pgadmin4
tool from application finder.
Comments
Post a Comment