• gitlab git 安装


    1.配置yum源

    vim /etc/yum.repos.d/gitlab-ce.repo

    [gitlab-ce]
    name=Gitlab CE Repository
    baseurl=https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/
    gpgcheck=0
    enabled=1
    

    2.更新本地yum 缓存

    yum makecache

    3.安装gitlab

    yum install gitlab-ce

    4.启动 gitlab

    gitlab-ctl reconfigure

    5.访问 

    http://192.168.64.128

    6.常用命令

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

      

     7.gitlab默认使用的80端口,占用了nginx的默认端口,我们修改下gitlab的端口

    vi /etc/gitlab/gitlab.rb
    

    修改 external_url 访问地址

    external_url 'http://192.168.5.256'

     修改监听端口 80 改为 9091

    nginx['listen_port'] = 9091

    修改监听端口 8080 改为9092

    unicorn['port'] = 9092

    让配置生效

    gitlab-ctl reconfigure
    

      

    重启gitlab

    gitlab-ctl restart

     访问

    curl http://localhost:9091
    

     日志,可能一次配置并不会成功,需要查看日志。

    gitlab-ctl tail unicorn
    

      

     

  • 相关阅读:
    EXCEL启动慢
    存货跌价准备-资产减值损失
    绩效软件交流-ZQDJ
    库存股
    CF788A Functions again dp
    CF788C The Great Mixing BFS+思维
    CF788B Weird journey 欧拉路径+计数
    CF786C Till I Collapse 整体二分+根号分治
    CF922D Robot Vacuum Cleaner 贪心+排序
    CF920C Swap Adjacent Elements 贪心
  • 原文地址:https://www.cnblogs.com/yun965861480/p/9416079.html
Copyright © 2020-2023  润新知