zoukankan      html  css  js  c++  java
  • Linux:搭建GitLab

    0.写在前面

    GitLab官方明确要求最低配置2核4G,如果配置过低,会出现502错误。

    1.安装SSH

    #安装ssh
    sudo yum install -y curl policycoreutils-pythonopenssh-server
    
    #将SSH服务设置成开机自启动
    sudo systemctl enable sshd
    
    #启动SSH服务
    sudo systemctl start sshd

    2.安装防火墙

    #安装防火墙
    yum install firewalld systemd -y
    
    #开启防火墙
    service firewalld start
    
    #添加http服务到firewalld,pemmanent表示永久生效,若不加--permanent系统下次启动后就会失效
    sudo firewall-cmd --permanent --add-service=http
    
    #重启防火墙,安装命令
    sudo systemctl reload firewalld

    开启防火墙之后,导致服务器访问不了,可以停掉:service firewalld stop

    3.安装Postfix

    #安装Postfix以发送通知邮件
    sudo yum install postfix
    
    #将postfix服务设置成开机自启动
    sudo systemctl enable postfix
    
    #启动postfix
    sudo systemctl start postfix

    4.安装GitLab

    #wget未安装则进行安装
    yum -y install wget
    
    #下载GitLab安装包
    wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-12.4.3-ce.0.el7.x86_64.rpm
    
    #安装
    rpm -ivh gitlab-ce-12.4.3-ce.0.el7.x86_64.rpm

    EL是Red Hat Enterprise Linux的简写

    • EL5软件包用于在Red Hat 5.x, CentOS 5.x, CloudLinux 5.x的安装

    • EL6软件包用于在Red Hat 6.x, CentOS 6.x, and CloudLinux 6.x进行安装

    • EL7 软件包用于在Red Hat 7.x, CentOS 7.x, and CloudLinux 7.x的安装

    cat /etc/redhat-release 查看CentOS版本

    5.配置GitLab

    #修改gitlab配置文件指定服务器ip和自定义端口:
    vim  /etc/gitlab/gitlab.rb
    
    修改这个参数
    external_url 'ip:port'
    
    #重置并启动GitLab
    gitlab-ctl reconfigure
    gitlab-ctl restart
  • 相关阅读:
    函数的设计和使用
    python正则表达式
    Python字符串
    Python序列(十一)集合
    centos 磁盘分区、格式化及挂载
    Nginx下配置SSL证书 调转到IIS、tomcat二级站点
    Mime 类型列表
    WCF学习- 体系结构
    .NET Framework Client Profile 简介
    WCF学习- 基础概念
  • 原文地址:https://www.cnblogs.com/fdzang/p/11910316.html
Copyright © 2011-2022 走看看