Gitlab Server 部署 and 设置 HTTPS

Gitlab Server 部署

1、资源环境

主机名 IP地址 服务 系统版本
cicd-gitlab 192.168.122.186 gitlab-ee (13.4.1) CentOS7.4
1、修改主机名
[root@localhost ~]# hostnamectl --static set-hostname cicd-gitlab
2、关闭防火墙
[root@cicd-gitlab ~]#  systemctl stop firewalld
[root@cicd-gitlab ~]#  systemctl disable firewalld
3、开启邮件服务
[root@cicd-gitlab ~]# systemctl start postfix
[root@cicd-gitlab ~]# systemctl enable postfix
4、关闭 SELinux
[root@cicd-gitlab ~]#  sed -ri '/^SELINUX=/c SELINUX=disabled' /etc/selinux/config
[root@cicd-gitlab ~]#  setenforce 0           # 临时关闭SELinux
[root@cicd-gitlab ~]#  reboot
5、添加 hosts
[root@cicd-gitlab ~]# vim /etc/hosts
192.168.122.186 gitlab.example.com

2、部署 Gitlab

1、安装 Gitlab 依赖包
[root@cicd-gitlab ~]# yum install -y curl openssh-server openssh-clients postfix cronie policycoreutils-python
# gitlab-ce 10.x.x以后的版本需要依赖policycoreutils-python
2、添加 Gitlab 安装源 (根据需求配置源)
添加清华源
[root@cicd-gitlab ~]# vim 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

[root@cicd-gitlab ~]# vim gitlab-ee.repo
[gitlab-ee]
name=Gitlab EE Repository
baseurl=https://mirrors.tuna.tsinghua.edu.cn/gitlab-ee/yum/el$releasever/
gpgcheck=0
enabled=1
手动下载安装包地址
https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/
https://mirrors.tuna.tsinghua.edu.cn/gitlab-ee/yum/el7/
3、安装 Gitlab(根据需要选择 ce/ee)
[root@cicd-gitlab ~]# yum -y install gitlab-ce                    # 自动安装最新版
[root@cicd-gitlab ~]# yum -y install gitlab-ce-x.x.x				# 安装指定版本Gitlab
[root@cicd-gitlab ~]# ls  #这里我们提前下好了最新版本的企业版的包,我们直接本地安装
anaconda-ks.cfg  gitlab-ee-13.4.1-ee.0.el7.x86_64.rpm
[root@cicd-gitlab ~]#[root@cicd-gitlab ~]# yum localinstall gitlab-ee-13.4.1-ee.0.el7.x86_64.rpm 
已加载插件:fastestmirror
正在检查 gitlab-ee-13.4.1-ee.0.el7.x86_64.rpm: gitlab-ee-13.4.1-ee.0.el7.x86_64
gitlab-ee-13.4.1-ee.0.el7.x86_64.rpm 将被安装
正在解决依赖关系
--> 正在检查事务
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值