当前位置:   article > 正文

Gitlab Server 部署 and 设置 HTTPS_gitlab 禁用 htttps

gitlab 禁用 htttps

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
  • 1
2、关闭防火墙
[root@cicd-gitlab ~]#  systemctl stop firewalld
[root@cicd-gitlab ~]#  systemctl disable firewalld
  • 1
  • 2
3、开启邮件服务
[root@cicd-gitlab ~]# systemctl start postfix
[root@cicd-gitlab ~]# systemctl enable postfix
  • 1
  • 2
4、关闭 SELinux
[root@cicd-gitlab ~]#  sed -ri '/^SELINUX=/c SELINUX=disabled' /etc/selinux/config
[root@cicd-gitlab ~]#  setenforce 0           # 临时关闭SELinux
[root@cicd-gitlab ~]#  reboot
  • 1
  • 2
  • 3
5、添加 hosts
[root@cicd-gitlab ~]# vim /etc/hosts
192.168.122.186 gitlab.example.com
  • 1
  • 2

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
  • 1
  • 2
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
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
手动下载安装包地址
https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/
https://mirrors.tuna.tsinghua.edu.cn/gitlab-ee/yum/el7/
  • 1
  • 2
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 将被安装
正在解决依赖关系
--> 正在检查事务
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Gausst松鼠会/article/detail/208093
推荐阅读
相关标签
  

闽ICP备14008679号