Skip to content

pgAdmin Installer for systemd-based GNU/Linux Desktop environments

License

Notifications You must be signed in to change notification settings

revolution-robotics/pgadmin-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pgAdmin for GNU/Linux desktops and servers

This script installs with user permissions a Flask-based pgAdmin app hosted by gunicorn web server together with GNU/Linux desktop suport and a systemd service. During installation, if a ~/.pgadmin directory does not already exist, credentials are prompted for (and used to encrypt saved passwords) and the pgAdmin (SQLite) database is updated accordingly.

Files installed for GNU/Linux desktop and systemd support include:

  • pgAdmin config_local.py (setting, e.g.: DATA_DIR=~/.pgadmin),
  • systemd template ${HOME}/.config/systemd/user/[email protected],
  • XDG desktop entry ${HOME}/.local/share/applications/pgadmin.desktop, and
  • command-line script ${HOME}/bin/pgadmin-ctl.

Click on the pgAdmin desktop icon logo-32 to start the pgAdmin service and open the pgAdmin URL (by default: http://localhost:5050). Additional options are available on the command line:

Usage: pgadmin-ctl [OPTION...] enable|disable|start|stop|status|restart
Options:
  -h, --help            Print this help, then exit.
  -s, --server=ADDRESS  Set ADDRESS for pgAdmin to listen on (default: 127.0.0.1).
  -p, --port=PORT       Set PORT for pgAdmin to listen on (default: 5050).

Prerequisites

  • GNU autoconf
  • GNU make
  • python3 and pip3
  • jq

Install pgAdmin

To install pgadmin in virtual environment, run:

git clone https://github.com/revolution-robotics.com/pgadmin-server
cd ./pgadmin-server
python -m venv ~/.local/pgadmin
source ~/.local/pgadmin/bin/activate

Within the virtual environment (command prompt is prefixed by (pgadmin)):

./autogen.sh
./configure --with-opt-path=${HOME}/.local/pgadmin/bin
gmake install
deactivate

Upgrade pgAdmin

The virtual environment can be upgraded as follows:

/path/to/new/python -m venv --upgrade --upgrade-deps ~/.local/pgadmin/bin

Remove pgAdmin

After installation, to remove the pgAdmin service and associated files other than ~/.pgadmin and the virtual environemnt, run:

make -C /path/to/pgadmin-server uninstall

To remove the virtual environment, use:

rm -rf ~/.local/pgadmin

About

pgAdmin Installer for systemd-based GNU/Linux Desktop environments

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published