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

相關文章
相關標籤/搜索