centos安裝gitlab


1.打開系統防火牆 HTTP 和 SSH 的訪問,安裝postfix

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安裝文件

crul下載:

> 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下載

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的方式自己安裝

出現 It looks like… 表示安裝成功!

3.配置 gitlab 

vi /etc/gitlab/gitlab.rb

把external_url改成部署機器的域名或者IP地址。

4.對GitLab進行重配置 (這一步也是啟動 GitLab)

gitlab-ctl reconfigure

 

遇到的坑:

ruby_block[supervise_redis_sleep] action run,會一直卡無法往下進行

解決方案:

1、按住CTRL+C強制結束;

2、運行:sudo systemctl restart gitlab-runsvdir;

3、再次執行: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

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM