Centos下安裝GitLab

1、首先需要創建/etc/yum.repos.d/gitlab-ce.repo的文件

vim /etc/yum.repos.d/gitlab-ce.repo

文件內容如下:

[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

然後執行

sudo yum makecache
sudo yum install gitlab-ce

然後需要修改下配置文件中的內容:

vim /etc/gitlab/gitlab.rb

將external_url 屬性設置成 external_url = ‘localhost’
比較關鍵的就是 空格換成等於號
還需要修改

vim /opt/gitlab/embedded/service/gitlab-rails/config/gitlab.yml

中gitlab下host屬性修改爲 host:localhost
該配置文件也可修改端口號

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章