centos安装gitlab

1.打开系统防火墙 HTTP 和 SSH 的访问,安装postfixhtml

sudo yum install curl policycoreutils policycoreutils-python openssh-server openssh-clients
sudo systemctl enable sshd
sudo systemctl start sshd
sudo yum install postfix
sudo systemctl enable postfix
sudo systemctl start postfix
sudo firewall-cmd --permanent --add-service=http
sudo systemctl reload firewalld

2.下载gitlab rpm安装文件python

crul下载:git

> curl -s https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
> sudo yum install gitlab-ce-10.1.0-ce.0.el7.x86_64

rpm下载redis

curl -LJO https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-10.1.0-ce.0.el7.x86_64.rpm
rpm -i gitlab-ce-10.1.0-ce.0.el7.x86_64.rpm

若是下载失败,能够到https://packages.gitlab.com/gitlab/gitlab-ce手动下载,再用 rpm的方式本身安装spring

出现 It looks like… 表示安装成功!sql

3.配置 gitlab centos

vi /etc/gitlab/gitlab.rb

把external_url改为部署机器的域名或者IP地址。ruby

4.对GitLab进行重配置 (这一步也是启动 GitLab)bash

gitlab-ctl reconfigure

 

遇到的坑:dom

ruby_block[supervise_redis_sleep] action run,会一直卡没法往下进行

解决方案:

一、按住CTRL+C强制结束;

二、运行:sudo systemctl restart gitlab-runsvdir;

三、再次执行:sudo gitlab-ctl reconfigure

 

PG::ConnectionBad: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/opt/gitlab/postgresql/.s.PGSQL.5432"?
/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/db.rake:49:in `block (3 levels) in <top (required)>'
/opt/gitlab/embedded/bin/bundle:23:in `load'
/opt/gitlab/embedded/bin/bundle:23:in `<main>'
Tasks: TOP => gitlab:db:configure
(See full trace by running task with --trace)
STDERR:
---- End output of "bash" "/tmp/chef-script20171027-3190-3qzkrj" ----
Ran "bash" "/tmp/chef-script20171027-3190-3qzkrj" returned 1

找不到文件 /var/opt/gitlab/postgresql/.s.PGSQL.5432

怀疑多是执行的时候没有权限建立

sudo chmod 755 postgresql/

 

 

参考:

1.http://blog.csdn.net/u011241606/article/details/51471367

2.https://www.gitlab.cc/installation/#centos-7

3.http://www.cnblogs.com/springwind2006/p/6872773.html

4.https://isempty.me/archives/605

相关文章
相关标签/搜索