Created
July 23, 2020 19:01
-
-
Save cpjeanpaul/daa562a01ea303368739985f302dcf32 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo mkdir /var/lib/pgadmin | |
$ sudo mkdir /var/log/pgadmin | |
$ sudo chown $USER /var/lib/pgadmin | |
$ sudo chown $USER /var/log/pgadmin | |
$ sudo mkdir /opt/environments && cd /opt/environments | |
$ python3 -m venv pgadmin4 | |
$ source pgadmin4/bin/activate | |
(pgadmin4) $ pip install pgadmin4 | |
... | |
(pgadmin4) $ pgadmin4 (setup credentials) | |
$ sudo nano /etc/apache2/conf-available/pgadmin4.conf | |
... | |
WSGIDaemonProcess pgadmin processes=1 threads=25 python-home=/opt/environments/pgadmin4 | |
WSGIScriptAlias /pgadmin4 /opt/environments/pgadmin4/lib/python3.5/site-packages/pgadmin4/pgAdmin4.wsgi | |
<Directory "/opt/environments/pgadmin4/lib/python3.5/site-packages/pgadmin4/"> | |
WSGIProcessGroup pgadmin | |
WSGIApplicationGroup %{GLOBAL} | |
Require all granted | |
</Directory> | |
... | |
$ sudo a2enconfig pgadmin4 | |
$ sudo service apache2 restart | |
ready to go: localhost/pgadmin4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment