Gitlab(2)- centos7.x 下安装社区版 Gitlab 以及它的配置管理 (上)

简介: Gitlab(2)- centos7.x 下安装社区版 Gitlab 以及它的配置管理 (上)

前置准备:虚拟机安装以及配置相关


包含安装 centos7、8 虚拟机、设置静态 ip 等

https://www.cnblogs.com/poloyy/category/1703784.html

 

注意:我用的是 centos 7

 

官方安装教程

https://about.gitlab.com/install/

 

安装 Gitlab 前系统预配置准备工作


关闭 firewalld 防火墙

# 看防火墙状态
systemctl status firewalld
# 暂停运行防火墙
systemctl stop firewalld
# 看防火墙状态
systemctl status firewalld
# 禁止防火墙自启
systemctl disable firewalld
# 看防火墙状态
systemctl status firewalld


image.png


关闭 selinux 强制访问安全策略

保证该策略不会影响 gitlab 正常运行

# 第一步 关闭selinux
vim /etc/sysconfig/selinux
....
SELINUX = disabled
....
# 第二步重启虚拟机
reboot


image.png


验证是否已关闭成功

[root@localhost ~]# getenforce

Disabled

 

安装 Omnibus Gitlab-ce package


Omnibus

  • 综合性
  • Gitlab 为了方便大家快速上手,推出这个包,一键下载安装 Gitlab 需要的依赖、组件、配置
  • 如果用源代码的安装方式,会比较繁琐、

 

安装 Gitlab 组件

yum -y install curl policycoreutils openssh-server openssh-clients postfix perl

image.png


配置 Gitlab yum 仓库源

curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sud


image.png

启动 postfix 邮件服务

systemctl start postfix && systemctl enable postfix

 

安装 Gitlab-ce 社区版本

记住是社区版本,所以是免费的

sudo EXTERNAL_URL="http://gitlab.example.com" yum install -y gitlab-ce

image.png

这里其实就可以通过浏览器访问你的 Gitlab 了,但还有一些操作要做


本地 hosts 文件,配置域名和虚拟机 IP


为什么要做这一步

因为我们是通过虚拟机需搭建社区版 Gitlab 的,上面安装 gitlab-ce 的时候也指定了相对 URL,为的就是更方便访问 Gitlab,有一个域名(就是下面这部分操作)

sudo EXTERNAL_URL="http://gitlab.example.com"yuminstall -y gitlab-ce


相关文章
|
4天前
|
前端开发 jenkins 持续交付
新的centos7.9安装docker版本的jenkins2.436.1最新版本-前端项目发布(五)
新的centos7.9安装docker版本的jenkins2.436.1最新版本-前端项目发布(五)
20 1
|
4天前
|
jenkins 网络安全 持续交付
新的centos7.9安装docker版本的jenkins2.436.1最新版本-后端项目发布(四)
新的centos7.9安装docker版本的jenkins2.436.1最新版本-后端项目发布(四)
18 3
|
1天前
|
安全 关系型数据库 MySQL
解决centos7.0安装mysql后出现access defind for user@'localhost'的错误
在使用yum 安装完mariadb, mariadb-server, mariadb-devel后
7 0
|
2天前
|
Linux 网络安全 数据安全/隐私保护
centos7安装gitlab-ce社区版全过程,详细到爆炸,这些面试官常问的开发面试题你都掌握好了吗
centos7安装gitlab-ce社区版全过程,详细到爆炸,这些面试官常问的开发面试题你都掌握好了吗
|
4天前
|
NoSQL Linux Redis
在CentOS上安装和配置Redis
在CentOS上安装和配置Redis
46 0
|
4天前
|
安全 Linux 测试技术
在CentOS上安装Elasticsearch和Kibana
在CentOS上安装Elasticsearch和Kibana
11 0
|
4天前
|
运维 Kubernetes 监控
本地CentOS安装轻量级容器PaaS平台KubeSphere并实现无公网IP远程访问
本地CentOS安装轻量级容器PaaS平台KubeSphere并实现无公网IP远程访问
6 0
|
4天前
|
Kubernetes Docker 容器
Docker 安装 Portainer
Portainer Community Edition是一个针对容器化应用程序的轻量级服务交付平台,可用于管理 Docker、Swarm、Kubernetes 和 ACI 环境。它的设计理念是部署和使用都简单,该应用程序允许您通过“智能”GUI 和/或广泛的 API 管理所有编排器资源。
42 3
|
4天前
|
Linux 应用服务中间件 网络安全
linux安装Gitlab
linux安装Gitlab
93 0
|
4天前
|
缓存 数据安全/隐私保护 Docker
安装gitlab
安装gitlab
167 0