5643532 发表于 2016-3-25 09:04:26

Centos6.7 gitlab安装

安装环境:

CentOS release 6.7 (Final)
CPU:16核

内存:48G内存

安装软件:
#sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production

System information
System:         CentOS 6.7
Current User:   git
Using RVM:      no
Ruby Version:   2.1.2p95
Gem Version:    2.2.2
Bundler Version:1.11.2
Rake Version:   10.3.2
Sidekiq Version:2.17.0

GitLab information
Version:      7.4.5
Revision:       19d572e
Directory:      /home/git/gitlab
DB Adapter:   mysql2
URL:            http://192.168.2.34
HTTP Clone URL: http://192.168.2.34/some-project.git
SSH Clone URL:git@192.168.2.34:some-project.git
Using LDAP:   no
Using Omniauth: no

GitLab Shell
Version:      2.0.1
Repositories:   /home/git/repositories/
Hooks:          /home/git/gitlab-shell/hooks/
Git:            /usr/bin/git
You have new mail in /var/spool/mail/root


安装遇到很多坑:
错误1:
# sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production
Checking Environment ...

Git configured for git user? ... yes

Checking Environment ... Finished

Checking GitLab Shell ...

GitLab Shell version >= 2.0.1 ? ... OK (2.0.1)
Repo base directory exists? ... yes
Repo base directory is a symlink? ... no
Repo base owned by git:git? ... yes
Repo base access is drwxrws---? ... yes
Satellites access is drwxr-x---? ... yes
hooks directories in repos are links: ... can't check, you have no projects
Running /home/git/gitlab-shell/bin/check
Check GitLab API access: FAILED. code: 502
gitlab-shell self-check failed
Try fixing it:
Make sure GitLab is running;
Check the gitlab-shell configuration file:
sudo -u git -H editor /home/git/gitlab-shell/config.yml
Please fix the error above and rerun the checks.


经过查询是由于nginx日志
2016/03/24 10:10:14 30821#0: *1 connect() to unix:/home/git/gitlab/tmp/sockets/gitlab.socket failed (13: Permission denied
) while connecting to upstream, client: 192.168.2.34, server: 192.168.2.34, request: "GET //api/v3/internal/check HTTP/1.1", upst
ream: "http://unix:/home/git/gitlab/tmp/sockets/gitlab.socket:/502.html", host: "192.168.2.34"

解决方式:
1、selinux 要关闭 机器要重启,

2、/home/gitnginx需要有权限读取加入git组



错误2:
版本:
GitLab ShellVersion:      2.1.1安装以后一直报Check GitLab API access: FAILED. code: 403
后降级顺利通过。



页: [1]
查看完整版本: Centos6.7 gitlab安装