zoukankan      html  css  js  c++  java
  • gitlab搭建

    我们是基于CentOS7来搭建的,所以同学们先准备好CentOS的环境,能上网就可以了.
    其实安装步骤在GitLab的官网上都有很详细的介绍,同学们可以到官网按照这步骤来实现就可以了。
    附上官网安装地址:https://about.gitlab.com/install/#centos-7


    1.安装和配置必要的依赖

    在CentOS 7 (and RedHat/Oracle/Scientific Linux 7),下面这些命令是在防火墙中开放HTTP和SSH的访问

    sudo yum install -y curl policycoreutils-python openssh-server
    sudo systemctl enable sshd
    sudo systemctl start sshd
    sudo firewall-cmd --permanent --add-service=http
    sudo firewall-cmd --permanent --add-service=https
    sudo systemctl reload firewalld

    接着,安装Postfix来实现邮件通知的功能,如果你想使用其他的邮件服务器,可以跳过下面这些命令,你可以再GitLab安装完毕后自行安装其他的邮件服务器.如何配置其他的邮件服务器文档地址

    sudo yum install postfix
    sudo systemctl enable postfix
    sudo systemctl start postfix
    2.配置GitLab的仓库地址并下载安装包

    添加仓库地址

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

    安装GitLab

    sudo EXTERNAL_URL="https://gitlab.example.com" yum install -y gitlab-ee

    正常来说,执行完这步之后,会帮我们安装和自动配置GitLab相关的信息的.如果没有启动GitLab可以再执行一下这句命令。

    gitlab-ctl reconfigure    # 启动服务;

    运行时可能报错:

    There was an error running gitlab-ctl reconfigure

     解决:

     gitlab-ctl stop

    chmod 755 /var/opt/gitlab/postgresql/

    systemctl restart gitlab-runsvdir

    gitlab-ctl reconfigure
    gitlab-ctl restart

    相关操作:

    sudo gitlab-ctl start # 启动所有 gitlab 组件;
    sudo gitlab-ctl stop # 停止所有 gitlab 组件;
    sudo gitlab-ctl restart # 重启所有 gitlab 组件;
    sudo gitlab-ctl status # 查看服务状态;
    sudo gitlab-ctl reconfigure # 启动服务;
    sudo vim /etc/gitlab/gitlab.rb # 修改默认的配置文件;
    gitlab-rake gitlab:check SANITIZE=true --trace # 检查gitlab;
    sudo gitlab-ctl tail # 查看日志;

  • 相关阅读:
    前端各种小细节
    图片等比例缩放
    微信小程序倒计时,购物车,向左滑删除 左拉删除
    微信小程序用户拒绝授权,重新调起授权
    微信小程序swiper切换卡内嵌滚动条不显示
    php面试总结
    tp5.0 学习(三):URL和路由
    pytorch 基础内容
    Grammarly for Chrome-语法、用词自动检查
    时空图神经网路:STGNNs
  • 原文地址:https://www.cnblogs.com/l-zl/p/13800055.html
Copyright © 2011-2022 走看看