gpt4 book ai didi

postgresql - 在 CentOS 6.5 上安装 Gitlab 时遇到问题

转载 作者:行者123 更新时间:2023-11-29 11:35:17 25 4
gpt4 key购买 nike

我曾多次尝试按照 Official page 上的说明在我的 CentOS 6.5 VPS 上安装 Gitlab。并且每次都在安装的“gitlab-ctl reconfigure”阶段失败。我试着用谷歌搜索并在这里寻找其他问题,但运气不佳。

错误如下:

* execute[create gitlab database user] action run
================================================================================
Error executing action `run` on resource 'execute[create gitlab database user]'
================================================================================


---- Begin output of /opt/gitlab/embedded/bin/psql --port 5432 -d template1 -c "CREATE USER gitlab" ----
STDOUT:
STDERR: psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
---- End output of /opt/gitlab/embedded/bin/psql --port 5432 -d template1 -c "CREATE USER gitlab" ----

最佳答案

这可能与 GitLab 没有直接关系,但与 PostgreSQL 本身有关。
参见“Chapter 17. Server Setup and Operation”,“Client Connection Problems”部分:

Alternatively, you'll get this when attempting Unix-domain socket communication to a local server:

psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?

The last line is useful in verifying that the client is trying to connect to the right place.
If there is in fact no server running there, the kernel error message will typically be either Connection refused or No such file or directory, as illustrated.
(It is important to realize that Connection refused in this context does not mean that the server got your connection request and rejected it. That case will produce a different message, as shown in Section 19.4.)
Other error messages such as Connection timed out might indicate more fundamental problems, like lack of network connectivity.

所以首先确保数据库可以启动。

OP Luke Usher确认 in the comments :

The default PostgreSQL config included in gitlab was set to allocate more memory for shared_buffer than I have available.

This was corrected by adding postgresql['shared_buffers'] = "1024MB" to /etc/gitlab/gitlab.rb.

关于postgresql - 在 CentOS 6.5 上安装 Gitlab 时遇到问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24353370/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com