gitlab 开发工具包:如何​​设置 postgres?

gitlab development kit: how to setup postgres?

我已关注:

https://gitlab.com/gitlab-org/gitlab-development-kit

在 CentOS 6.7 机器上并且大部分成功;但是,我无法将 postgres 设置为 运行,因为克隆时的 gitlab-development-kit 没有 postgres 配置文件。

如何设置 postgres 以与 gitlab-development-kit 一起工作?

我卡在上面链接说明的 "Post-installation" 步骤,bundle exec foreman start 给我:

[me1@gitlabdevkit gitlab-development-kit]$ bundle exec foreman start
16:47:49 redis.1            | started with pid 1275
16:47:49 postgresql.1       | started with pid 1276
16:47:49 nginx.1            | started with pid 1277
16:47:49 gitlab-workhorse.1 | started with pid 1280
16:47:49 redis.1            | [1275] 03 Nov 16:47:49 * Server started, Redis version 2.4.10
16:47:49 postgresql.1       | postgres cannot access the server configuration file "/home/me1/src/postgresql/data/postgresql.conf": No such file or directory
16:47:49 redis.1            | [1275] 03 Nov 16:47:49 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
16:47:49 redis.1            | [1275] 03 Nov 16:47:49 * The server is now ready to accept connections at /home/me1/src/gitlab-development-kit/redis/redis.socket
16:47:49 redis.1            | [1275] 03 Nov 16:47:49 - 0 clients connected (0 slaves), 717512 bytes in use
16:47:49 gitlab-workhorse.1 | 2015/11/03 16:47:49 Starting gitlab-workhorse 0.4.0-1-ged976a2-20151103.202110
16:47:49 postgresql.1       | exited with code 2
16:47:49 system             | sending SIGTERM to all processes
16:47:49 gitlab-workhorse.1 | exited with code 2
16:47:49 redis.1            | [1275] 03 Nov 16:47:49 # Received SIGTERM, scheduling shutdown...
16:47:49 nginx.1            | exited with code 0
16:47:49 redis.1            | [1275] 03 Nov 16:47:49 # User requested shutdown...
16:47:49 redis.1            | exited with code 0
16:47:49 redis.1            | [1275] 03 Nov 16:47:49 * Removing the unix socket file.
[me1@gitlabdevkit gitlab-development-kit]$ 

当然,令人不快的兴趣是:

    16:47:49 postgresql.1       | postgres cannot access the server configuration file "/home/me1/src/postgresql/data/postgresql.conf": No such file or directory
gitlab-development-kit 中的

和 none 文件似乎有助于满足这一需求。

答案就在这里:

http://www.postgresql.org/docs/9.3/static/install-short.html

简短版本(与 gitlab-development-kit 说明相关的工作)是:

mkdir -p postgresql/data
/usr/pgsql-9.3/bin/initdb -D postgresql/data

None 的 gitlab-development-kit 文档涵盖了设置 postgres 并且必须假设开发人员能够找到上述页面。由于我在问题中链接到的当前指南安装了 postgresql 9.3,因此我链接到 postgres 网站上该版本的正确文档页面。