一 离线包安装(推荐)
1 配置安装源
vi /etc/yum.repos.d/gitlab-ce.repo
[gitlab-ce]
name=gitlab-ce
# 清华大学的镜像源
baseurl=http://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7
repo_gpgcheck=0
gpgcheck=0
enabled=1
gpgkey=https://packages.gitlab.com/gpg.key
2 安装依赖
yum install curl policycoreutils-python openssh-server openssh-clients
3 安装最新版
yum install gitlab-ce
4 安装指定版
curl -LJO https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-11.0.0-ce.0.el7.x86_64.rpm
rpm -ivh gitlab-ce-11.0.0-ce.0.el7.x86_64.rpm
5 编辑gitlab配置文/etc/gitlab/gitlab.rb
external_url 'http://gitlab.example.com' #改成自己的ip或域名
#开启备份目录
gitlab_rails['backup_path'] = "/var/opt/gitlab/backups"
#开启备份
gitlab_rails['backup_keep_time'] = 604800
#ssh协议端口修改
#gitlab_rails['gitlab_shell_ssh