ubuntu安装pgAdmin 4
Posted Go_Forward
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ubuntu安装pgAdmin 4相关的知识,希望对你有一定的参考价值。
One way to install pgadmin4 is to download its Python wheel at https://www.postgresql.org/ftp/pgadmin3/pgadmin4/v1.0-beta1/pip/ and then use pip to install it:
it is better to install with virtualenv
virtualevn pgadmin_install cd pgadmin_install source ./bin/activate pip install <name of the pgadmin wheel download from https://www.pgadmin.org/download/pgadmin-4-python-wheel/>
According to https://www.pgadmin.org/download/pip4.php, to run pgadmin4, do the following:
and add following code in your config_local.py which is in the same location with config.py, if you install it with virtualenv, the config_local.py should locate in ~/pgadmin4/lib/python2.7/site-packages/pgadmin4
import os DATA_DIR = os.path.realpath(os.path.expanduser(u‘~/.pgadmin/‘)) LOG_FILE = os.path.join(DATA_DIR, ‘pgadmin4.log‘) SQLITE_PATH = os.path.join(DATA_DIR, ‘pgadmin4.db‘) SESSION_DB_PATH = os.path.join(DATA_DIR, ‘sessions‘) STORAGE_DIR = os.path.join(DATA_DIR, ‘storage‘)
Once installed, you will need to create a config_local.py file in the same directory as config.py. On a machine with a virtual environment created at ~/pgadmin4, this is~/pgadmin4/lib/python2.7/site-packages/pgadmin4. Ensure you set values for the SECRET_KEY, SECURITY_PASSWORD_SALT and CSRF_SESSION_KEY settings at bare minimum - see config.py for more information and other settings that can be customised. In order to reference other variables from config.py, you may need to include from config import *at the top of config_local.py.
pgAdmin can now be run with a command like python ~/pgadmin4/lib/python2.7/site-packages/pgadmin4/pgAdmin4.py. Finally, point your browser to http://127.0.0.1:5050.
ref: https://askubuntu.com/questions/788457/how-to-install-pgadmin-4-in-server-mode-on-ubuntu-16-04
https://stackoverflow.com/questions/46707935/oserror-errno-13-permission-denied-var-lib-pgadmin
以上是关于ubuntu安装pgAdmin 4的主要内容,如果未能解决你的问题,请参考以下文章
如何在UBUNTU 16.04上安装桌面模式中的PGADMIN 4
软件包“pgadmin4”没有安装候选,适用于 Ubuntu 20.04 [关闭]
在 nginx ubuntu 20.04 上安装 Pgadmin4
续:纠正:ubuntu7.04可以安装,而且完美的安装 ! for《Oracle-10.2.0.1,打补丁10.2.0.5:在 debian 版本4不含4以上,及 ubuntu 7.04不含(代码片段