《Centos7——gitlab搭建步骤》

Git相关的家族成员

  • Github:一个在线代码托管仓库
  • Gitlab: 一般用于企业、学校内网搭建git私服的时候,实现代码托管
  • Gitlib:: 用于实现git功能的开发库
  • Git: 就是版本控制管理的一个命令,一个工具
  • Gitee国内

Gitlab介绍

  • Gitlab是利用ruby on rails的一个开源的版本管理系统,实现一个自托管的git项目仓库,可以通过web界面进行访问公开的或者是私人项目。与gitlab类似的,一般是公司使用,gitlab能够浏览源代码,也能管理缺陷和注释等等。
  • 它还提供一个代码片段手机功能可以轻松实现代码复用,便于日后有需要的时候进行查找。

gitlab搭建步骤

1. 关闭防火墙

[root@localhost ~]# systemctl stop firewalld;setenforce 0

2. 上传的是gitlab的rpm包

gitlab包

链接: https://pan.baidu.com/s/18668xYAPChueHZ_ePfPU8Q 提取码: bfbw 复制这段内容后打开百度网盘手机App,操作更方便哦

3. 安装依赖软件

[root@localhost ~]# yum -y install curl policycoreutils openssh-server openssh-clients postfix policycoreutils-python

4. 设置postfix开机自启,并启动,postfix支持gitlab发信功能

[root@localhost ~]# systemctl enable postfix && systemctl start postfix

5. 安装gitlib

[root@localhost ~]# rpm -i gitlab-ce-10.0.0-ce.0.el7.x86_64.rpm

6. 修改gitlab配置文件指定服务器ip和自定义端口

[root@localhost ~]# cp /etc/gitlab/gitlab.rb{,.bak} #备份文件
[root@localhost ~]# vim /etc/gitlab/gitlab.rb #修改gitlab配置文件指定服务器ip和自定义端口
external_url 'http://localhost'    #[修改成如此内容]

7. 重置并启动GitLab

[root@localhost ~]# gitlab-ctl reconfigure

[root@localhost ~]# gitlab-ctl restart

8. 查看日志

[root@localhost ~]# tailf /var/log/gitlab/nginx/gitlab_access.log 

9. 登录网页

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值