我跟着:
https://gitlab.com/gitlab-org/gitlab-development-kit
在CentOS 6.7盒子上并且大部分成功;但是,我无法运行postgres,因为克隆时的gitlab-development-kit没有postgres配置文件。
如何设置postgres以使用gitlab-development-kit?
我被困在"安装后"以上链接说明的步骤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中的所有文件似乎都无法满足这种需求。
答案 0 :(得分:2)
答案就在这里:
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
gitlab-development-kit文档都没有涉及设置postgres,并且必须假设开发人员能够找到上面的页面。由于我在postgresql 9.3安装的问题中链接了当前指南,我在postgres网站上链接到该版本的正确文档页面。