Tuesday, October 22, 2024

Update pgadmin

pgadmin4 on web by python

$sudo mkdir /var/lib/pgadmin
$sudo mkdir /var/log/pgadmin
$sudo chown $USER /var/lib/pgadmin
$sudo chown $USER /var/log/pgadmin
$python3 -m venv pgadmin4
$source pgadmin4/bin/activate
(pgadmin4) $ pip install pgadmin4
(pgadmin4) $ pgadmin4
Change port, by default is 5050 but if you want to change(on the venv):
$PGADMIN_INT_PORT=6060 pgadmin4/bin/pgadmin4
 
Change the credentials(on the venv):
$pgadmin4/bin/pgadmin4-cli add-user email@gmail.com password

 

Remove credentials:

$ls /var/lib/pgadmin/storage
 

Enable remote access to pgadmin4

$vi pgadmin4/lib/python3.10/site-packages/pgadmin4/config.py
 

[1] https://www.digitalocean.com/community/tutorials/how-to-install-configure-pgadmin4-server-mode

 

References:

[1] https://www.pgadmin.org/download/pgadmin-4-python

[2] https://gcore.com/learning/how-to-install-pgadmin4-on-ubuntu/

No comments:

Python3 version alternatives and virtual environments

Solving multiple python installation:   sudo update-alternatives --install /usr/ bin /python3 python3 /usr/ bin /python3 .5 1 sudo update...