PostgreSQL:如何为初始数据库实验设置本地服务器/客户端环境

时间:2016-11-02 21:33:08

标签: postgresql server

我最近决定开展一个有趣/有教育意义的个人项目,为我的梦幻足球联赛创建一些数据可视化和力量指标。由于ESPN没有提供API,我决定使用肘部油脂和nfldb的组合来提取相关数据(我希望熟悉Plotly来呈现数据)。在设置nfldb时,我也首次使用postgresql(as required by nfldb)接触数据库。

由于nfldb提供的安装指南是以Linux为中心的,并假设了以前的数据库经验,我已经向this guide寻求帮助,并盲目地按照其指示希望避开postgresql(aka "只是让它工作""解决方案")。当然,这不起作用,我不知道如何诊断问题,所以我决定继续利用这个机会熟悉数据库/ postgresql。 / p>

我已向postgresql documentation寻求指导。从未在服务器/客户端环境中工作过,以下文本(来自" 18.1.PostgreSQL用户帐户")让我特别困惑:

As with any server daemon that is accessible to the outside world, it is advisable
to run PostgreSQL under a separate user account. This user account should only own
the data that is managed by the server, and should not be shared with other
daemons. (For example, using the user nobody is a bad idea.) It is not advisable
to install executables owned by this user because compromised systems could then
modify their own binaries.

To add a Unix user account to your system, look for a command useradd or adduser.
The user name postgres is often used, and is assumed throughout this book, but you
can use another name if you like.

我非常感谢这些段落的注释版本。它如何适用于像我这样的人,在同一台机器上存储和访问日期?我是否需要创建新的系统用户帐户?我如何确保它只拥有由服务器管理的数据"?安装postgresql的负责位置在哪里?通过下载nfldb数据库,我是否面临某种安全风险?为什么用户nobody是个坏主意?

相关:我正在使用Mac(v10.11.6)并计划使用Homebrew安装(或必要时重新安装)postgresql。

0 个答案:

没有答案