编程语言-6-代码仓库GitLab在centos7中安装

参考Centos7下搭建Gitlab
参考清华大学开源软件镜像站
参考GitLab官方文档
参考centos7安装gitLab

1 GitLab简介

GitLab 是一个用于仓库管理系统的开源项目,使用Git作为代码管理工具,并在此基础上搭建起来的web服务。

GitLab由乌克兰程序员DmitriyZaporozhets和ValerySizov开发,它由Ruby写成。后来,一些部分用Go语言重写,现今并在国内外大中型互联网公司广泛使用。

GitLab是一个基于git实现的在线代码仓库托管软件,一般用于在企业、学校等内部网络搭建专属git仓库,越来越多的企业在使用GitLab作为项目托管仓库,社区版(CE)免费,大部分公司一般够用,企业版(EE)收费,功能更强大。

2 安装GitLab

2.1 安装依赖

(1)安装启动ssh服务
yum install -y curl 
yum install -y policycoreutils-python
yum install -y openssh-server #安装ssh
systemctl enable sshd  #开机自启动
systemctl start sshd   #启动ssh

(2)配置防火墙
firewall-cmd --state #查看防火墙状态
systemctl start firewalld #没有启动,可以启动防火墙
firewall-cmd --permanent --add-service=http #添加防火墙支持http永久访问
systemctl reload firewalld  #重新加载防火漆配置

(3)安装邮件服务
yum install postfix -y   #安装postfix
systemctl enable postfix  #开机自启
systemctl start postfix  #启动postfix

2.2 配置yum源

#下载此脚本并运行,会自动下载当前系统的yum源,/etc/yum.repos.d/gitlab_gitlab-ce.repo。

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

2.2.1 文件script.rpm.sh

#!/bin/bash

unknown_os ()
{
   
  echo "Unfortunately, your operating system distribution and version are not supported by this script."
  echo
  echo "You can override the OS detection by setting os= and dist= prior to running this script."
  echo "You can find a list of supported OSes and distributions on our website: https://packages.gitlab.com/docs#os_distro_version"
  echo
  
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

皮皮冰燃

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值