美文网首页
centos7搭建gitlab

centos7搭建gitlab

作者: 渐渐地老了 | 来源:发表于2019-11-21 15:11 被阅读0次

虽然可托管代码的平台有很多选择,国外的有 github,国内的有 gitee, coding 之类,但很多公司都会选择自建 gitlab 服务,觉得将代码托管在第三方,内心并不踏实

以下演示如何在 centos7 上搭建 gitlab

image.png
附上官网安装地址:https://about.gitlab.com/install/#centos-7

安装依赖包

# 安装依赖
$ yum install -y curl policycoreutils openssh-server openssh-clients policycoreutils-python
$ systemctl enable sshd 
$ systemctl start sshd

# 使用postfix发送邮件通知
$ yum install -y postfix 
$ systemctl enable postfix 
$ systemctl start postfix 

配置GitLab的仓库地址并下载安装包
添加仓库地址

curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.rpm.sh | sudo bash

安装GitLab

yum install -y gitlab-ee

配置GitLab

$ sudo vim /etc/gitlab/gitlab.rb
# 指定访问的端口
# external_url 'http://127.0.0.1:9090'

# 重启gitlab
$ gitlab-ctl reconfigure

开放指定端口

指定的端口要加入防火墙,不然无法访问

# 启动防火墙
$ sudo systemctl start firewalld

# 查看防火墙
$ firewall-cmd --state

# 列出开放的端口
$ firewall-cmd --list-ports

# 将指定端口加入防火墙
$ firewall-cmd --zone=public --add-port=9090/tcp --permanent

# 重启防火墙
$ firewall-cmd --reload

此外,还需将端口加入安全组,各家云服务器的操作大同小异

访问gitlab
访问 http://127.0.0.1:9090/

首次访问需要初始化root密码,设置完成后,就能使用root登录

image.png

相关文章

  • GitLab install

    CentOS7服务器上搭建Gitlab Gitlab如何搭建? 安装gitlab所需要的依赖sudo yum in...

  • Centos7.2搭建gitlab服务器

    一, 服务器快速搭建gitlab方法可以参考gitlab中文社区 的教程centos7安装gitlab:https...

  • Gitlab搭建指南

    1.本文目标 在centOS7系统上成功装上Gitlab 2.准备工作 需要自己搭建CentOS7系统,不管是在服...

  • Gitlab搭建,配置邮件服务

    Gitlab 在Centos7 搭建 用docker方式安装: 等待数分钟后,容器服务器全部起来,访问http:/...

  • (二)Git+Gitlab连接使用

    前置条件:git客户端windows,gitlab服务端搭建,centos7系统 一、Git客户端安装,创建本地仓...

  • centos6.x搭建gitlab

    可以参考gitlab中文社区 的教程 centos7安装gitlab:https://www.gitlab.cc/...

  • CentOS7搭建gitlab

    由于公司需要一套好的代码托管平台,于是选择了gitlab社区版10.7.3 gitlab的搭建 基础组件的安装首先...

  • centos7搭建gitlab

    虽然可托管代码的平台有很多选择,国外的有 github,国内的有 gitee, coding 之类,但很多公司都会...

  • CentOS7 GitLab搭建

    经过实操,总结以下几点: 1、谷歌云默认有SSH协议,防火墙,postfix,可以略过2、阿里云是一片空白,啥都没...

  • centOS7搭建Gitlab

    1、gitlab下载地址[https://mirrors.tuna.tsinghua.edu.cn/gitlab-...

网友评论

      本文标题:centos7搭建gitlab

      本文链接:https://www.haomeiwen.com/subject/ggktwctx.html