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



我遵循了:

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

在一个CentOS 6.7盒子上,并取得了很大的成功;但是,我无法运行postgres,因为gitlab开发工具包在克隆时没有postgres配置文件。

如何设置postgres以使用gitlab开发工具包?

我被困在上述链接说明的"安装后"步骤,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开发工具包中的任何文件似乎都无法满足这一需求。

答案就在这里:

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

简短的版本(与gitlab开发工具包说明相关)是这样做的:

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

gitlab开发工具包的文档中没有一个涉及到postgres的设置,并且必须假设开发人员能够找到上面的页面。由于我在问题中链接到的当前指南安装了postgresql9.3,我正在postgres网站上链接到该版本的相应文档页面。

最新更新