我试图在ubuntu 16.04(python,nginx)上设置pgadmin,步骤详述如下,我在url中获得成功消息,访问localhost:5050。我想我可能必须在某个地方指定网址,但我不知道该在哪里做。有人知道或者我在下面犯过错误吗?
wget https://ftp.postgresql.org/pub/pgadmin/pgadmin4/v1.4/pip/pgadmin4-1.4-py2.py3-none-any.whl
pip install pgadmin4-1.4-py2.py3-none-any.whl
gedit lib/python3.5/site-packages/pgadmin4/config_local.py
LOG_FILE = '/var/log/pgadmin4/pgadmin4.log'
SQLITE_PATH = '/var/lib/pgadmin4/pgadmin4.db'
SESSION_DB_PATH = '/var/lib/pgadmin4/sessions'
STORAGE_DIR = '/var/lib/pgadmin4/storage'
CSRF_SESSION_KEY = 'sample'
SECRET_KEY = 'sample'
SECURITY_PASSWORD_SALT = 'sample'
cd ~/pgadmin4
source bin/activate
python lib/python3.5/site-packages/pgadmin4/pgAdmin4.py
得到它以下工作,由于某种原因设置默认服务器第一次我尝试它不起作用,但现在工作,不知道哪些设置是冲突的。无论如何,希望它能帮助别人。
virtualenv pgadmin4
cd pgadmin4
source bin/activate
sudo apt install wget
wget https://ftp.postgresql.org/pub/pgadmin/pgadmin4/v1.4/pip/pgadmin4-1.4-py2.py3-none-any.whl
pip install pgadmin4-1.4-py2.py3-none-any.whl
gedit lib/python3.5/site-packages/pgadmin4/config_local.py
**add to config_local.py**
LOG_FILE = '/var/log/pgadmin4/pgadmin4.log'
SQLITE_PATH = '/var/lib/pgadmin4/pgadmin4.db'
SESSION_DB_PATH = '/var/lib/pgadmin4/sessions'
STORAGE_DIR = '/var/lib/pgadmin4/storage'
CSRF_SESSION_KEY = 'sample'
SECRET_KEY = 'sample'
SECURITY_PASSWORD_SALT = 'sample'
DEFAULT_SERVER = '**your ip here**'
cd ~/pgadmin4
source bin/activate
python lib/python3.5/site-packages/pgadmin4/pgAdmin4.py