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
该配置文件也可修改端口号