步骤 4. 为 PGAdmin 4 创建本地配置文件

# cd lib/python2.7/site-packages/pgadmin4
# touch config_local.py

编辑 config_local.py 并添加任何所需的配置选项(使用 config.py 文件作为参考,在 config_local.py 中复制的任何设置将覆盖 config.py 中的设置)。
要将 PGAdmin 4 配置为在单用户模式下运行,请添加以下行:

# echo "SERVER_MODE = False" >> lib/python2.7/site-packages/pgadmin4/config_local.py

步骤 4. 运行 PGAdmin 4

# python lib/python2.7/site-packages/pgadmin4/pgAdmin4.py
.
 Enter the email address and password to use for the initial pgAdmin user account:
        Email address: jack@onitroad

我们将提示它添加电子邮件地址和密码以访问 PGAdmin 4

现在访问 http://localhost:5050并连接你的 PostgreSQL 服务器

步骤 1. 安装包

# sudo apt-get install build-essential libssl-dev libffi-dev libgmp3-dev virtualenv python-pip libpq-dev python-dev

步骤 2. 创建虚拟环境

# cd /opt/
# mkdir enviromentpy
# cd enviromentpy/
# virtualenv pgadmin4
# cd pgadmin4
# source bin/activate

步骤 3. 下载并安装 PGAdmin 4

# wget https://ftp.postgresql.org/pub/pgadmin/pgadmin4/v1.3/pip/pgadmin4-1.3-py2.py3-none-any.whl
# pip install pgadmin4-1.3-py2.py3-none-any.whl
如何在 Ubuntu 16.04 LTS 上以桌面模式安装 pgAdmin 4

PgAdmin 4 是对流行的 PostgreSQL 数据库 pgAdmin3 管理工具的重写。

PgAdmin 是 PostgreSQL 领先的图形开源管理、开发和管理工具。

在本教程中,我们将介绍如何在 Ubuntu 16.04 LTS 上以桌面模式安装 PgAdmin 4.

日期:2020-06-02 22:18:16 来源:oir作者:oir