CentOS7下yum安装GitLab-CE
前提准备
- 建立git用户(如果是测试,可直接用root安装)
useradd git
passwd git - 关闭防火墙
systemctl stop firewalld
systemctl disabled firewalld - 安装依赖库
yum install curl openssh-server postfix cronie
service postfix start
chkconfig postfix on - 配置yum源进行安装
注意: gitlab-ce 镜像仅支持 x86-64 架构
centos中可以直接通过配置yum源然后使用yum进行一键安装
国内可以使用的清华大学的镜像源安装GitLab,相关配置及安装参照:https://mirror.tuna.tsinghua.edu.cn/help/gitlab-ce/
以下内容写入yum源配置文件:/etc/yum.repos.d/gitlab-ce.repo
vim /etc/yum.repos.d/gitlab-ce.repo
[gitlab-ce]
name=Gitlab CE Repository
baseurl=https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el$releasever/
gpgcheck=0
enabled=1
yum makecache
yum install gitlab-ce #自动安装最新版
yum install gitlab-ce-x.x.x #可安装指定版本
安装成功后的提示:
Thank you for installing GitLab!
GitLab was unable to detect a valid hostname for your instance.
Please configure a URL for your GitLab instance by setting external_url
configuration in /etc/gitlab/gitlab.rb file.
Then, you can start your GitLab instance by runni