Centos7安装GitLab
-
Gitlab安装之后访问 修改端口8080为9090
Gitlab服务器端口配置
-
似乎只能按照当前安装文件的格式来修改
解决nginx冲突
官方配置说明
Problem
-
upstream gitlab-workhorse {
server unix:/var/opt/gitlab/gitlab-workhorse/socket fail_timeout=0;
} -
路径
访问报错
-
502 Bad Gateway nginx
POSTfix注意事项
- 选择 internet site
- system mail name 填写服务器IP地址或者二级域名,项目创建变为git@ip 或 git@域名
经试验,应该修改以下配置项:
unicorn['port'] = 8888
gitlab_workhorse['auth_backend'] = "http://localhost:8888"
注意:unicorn['port']与gitlab_workhorse['auth_backend']的端口必须相同
安装GitLab出现ruby_block[supervise_redis_sleep] action run
在卸载gitlab然后再次安装执行sudo gitlab-ctl reconfigure的时候往往会出现:ruby_block[supervise_redis_sleep] action run,会一直卡无法往下进行!
解决方案:
1、按住CTRL+C强制结束;
2、运行:sudo systemctl restart gitlab-runsvdir;
3、再次执行:sudo gitlab-ctl reconfigure
Centos查看端口占用情况命令,比如查看80端口占用情况使用如下命令:
lsof -i tcp:80
列出所有端口
netstat -ntlp
netstat -tulpn | grep :8080
查看LOG
my gitlab-ctl tail
> /var/log/gitlab/nginx/access.log <
> /var/log/gitlab/nginx/error.log <
> /var/log/gitlab/nginx/current <
> /var/log/gitlab/nginx/gitlab_error.log <
https://gitlab.com/gitlab-org/omnibus-gitlab/issues/2204
GEM安装
em sources --add https://ruby.taobao.org/ --remove https://rubygems.org/
gem sources -l
Bundle安装
https://www.cnblogs.com/Wolfmanlq/p/5896168.html
清华镜像安装包(实时更新)
手动安装
- 比较稳
- https://docs.gitlab.com/omnibus/manual_install.html
- wget清华镜像
完全卸载Gitlab
https://yq.aliyun.com/articles/114619
手动安装尝试
- yum -y install policycoreutils openssh-server openssh-clients postfix
- systemctl enable postfix && systemctl start postfix
- wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-10.3.3-ce.0.el7.x86_64.rpm
- 参考: https://docs.gitlab.com/omnibus/manual_install.html
- sudo EXTERNAL_URL="http://gitlab.example.com" rpm -i gitlab-ce-10.3.3-ce.0.el7.x86_64.rpm
- 改URL
- reconfigue
自动安装
- 前面的步骤可以参考执行,接下来进行自动部分
- curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
- yum install gitlab-ce
- sudo gitlab-ctl reconfigure
- 最终由于缺少依赖:
- create symlink at /opt/gitlab/service/redis to /opt/gitlab/sv/redis
- ruby_block[supervise_redis_sleep] action run