• 搭建GitLab服务器


    前言

    每一个开发工作者无非身处2中开发环境:1.开源环境  2.闭源开发环境,若你身处闭源环境或对自己代码安全性要求较高,搭建和使用自己GitLab服务器是必不可少的环节。

    可以通过各种方式搭建自己的GitLab服务器:基于NFS、Git、SSH、GitWeb、GitLab,实现版本控制;

    一、搭建GitLab服务器

    0.centos7环境安装GitLab依赖软件、设置开机启动

     yum -y install curl policycoreutils openssh-server openssh-clents libsemanage-static libsemanage-devel
    
    yum install curlpolicycoreutils openssh-server openssh-clients
    
    systemctl enablesshd
    
    systemctl enable sshd
    
    systemctl start sshd
    
    yum install postfix
    
    systemctl enable postfix
    
    systemctl start postfix
    
    firewall-cmd --permanent --add-service=http
    
    systemctl reload firewalld

    2.下载gitlab安装包,然后安装、启动GitLab

    yum install -y gitlab-ce

      gitlab-ctl reconfigure

      gitlab-ctl restart

    3.访问GitLab并设置第1个用户root的密码

     

    4.root用户登录

     5.在gitlab创建一个test项目

    6.克隆gitlab服务器中项目到本地

    git clone http://192.168.226.131/root/test.git

    7.推送本地项目到gitlab服务器

    cd test
    echo hello GitLib > zhanggen.txt
    git add .
    git commit -m zhanggen.txt  
    git push origin master

  • 相关阅读:
    JavaScript闭包基本概念
    JavaScript函数
    JavaScript类型比较
    Java思维导图之Class对象
    Python进阶之装饰器
    Java IO学习要点导图
    sl003完全平方数
    sl002个税计算
    sl001数字拼接
    装饰器
  • 原文地址:https://www.cnblogs.com/sss4/p/8412508.html
Copyright © 2020-2023  润新知