centos 6.5 6.6 6.7安裝gitlab教程(社區版)

 

 

 

 

簡單的說安裝gitlab就兩種辦法主要介紹第一種:官網推薦的方法:linux

1.新建yum源

新建 /etc/yum.repos.d/gitlab-ce.repo,內容爲git

 

[gitlab-ce]
name=gitlab-ce
baseurl=http://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el6
repo_gpgcheck=0
gpgcheck=0
enabled=1
gpgkey=https://packages.gitlab.com/gpg.key

2.配置環境

第一步安裝或者配置一些必要環境:
sudo yum install curl openssh-server openssh-clients postfix cronie
sudo service postfix start
sudo chkconfig postfix on
sudo lokkit -s http -s ssh

 

3. 安裝

sudo yum makecache
sudo yum install gitlab-ce

 

4.啓動並配置

安裝完後須要對GitLab進行配置以及啓動:
sudo gitlab-ctl reconfigure

關閉防火強和selinux
/etc/init.d/iptables stop

setenforce 0    getenforce 查看

 

5.漢化(我的以爲不必)

 

6.502報錯解決辦法(Whoops, GitLab is taking too much time to respond.)

a.80端口衝突

緣由:Nginx默認使用了 80 端口。服務器

b.8080端口衝突

/etc/gitlab/gitlab.rb

# unicorn['port'] = 8080


/opt/gitlab/etc/gitlab.rb.template

# unicorn['port'] = 8080

改爲須要的端口

c.gitlab-rails修改

配置文件/var/opt/gitlab/gitlab-rails/etc/unicorn.rb

listen "127.0.0.1:8082", :tcp_nopush => true

 

 d.重置

sudo gitlab-ctl reconfigure 

重啓命令是gitlab-ctl start|stop|restartssh

 7.解決git域名的問題

 

 

 

 

而後curl

 

 在而後,你本地的hosts文件裏面添加服務區的ip,指定域名tcp

我gitlab的服務器是192.168.1.151oop

相關文章
相關標籤/搜索