zoukankan      html  css  js  c++  java
  • centos 6.5 6.6 6.7安装gitlab教程(社区版)

    简单的说安装gitlab就两种办法主要介绍第一种:官网推荐的方法:

    1.新建yum源

    新建 /etc/yum.repos.d/gitlab-ce.repo,内容为

    [gitlab-ce]
    name=gitlab-ce
    baseurl=http://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el6
    repo_gpgcheck=0
    gpgcheck=0
    enabled=1
    gpgkey=https://packages.gitlab.com/gpg.key

    2.配置环境

    第一步安装或者配置一些必要环境:
    sudo yum install curl openssh-server openssh-clients postfix cronie
    sudo service postfix start
    sudo chkconfig postfix on
    sudo lokkit -s http -s ssh
    

    3. 安装

    sudo yum makecache
    sudo yum install gitlab-ce

    4.启动并配置

    安装完后需要对GitLab进行配置以及启动:
    sudo gitlab-ctl reconfigure

    关闭防火强和selinux
    /etc/init.d/iptables stop

    setenforce 0    getenforce 查看

    5.汉化(个人觉得没必要)

    6.502报错解决办法(Whoops, GitLab is taking too much time to respond.)

    a.80端口冲突

    原因:Nginx默认使用了 80 端口。

    b.8080端口冲突

    /etc/gitlab/gitlab.rb
    
    # unicorn['port'] = 8080
    
    
    /opt/gitlab/etc/gitlab.rb.template
    
    # unicorn['port'] = 8080
    
    改成需要的端口

    c.gitlab-rails修改

    配置文件/var/opt/gitlab/gitlab-rails/etc/unicorn.rb
    
    listen "127.0.0.1:8082", :tcp_nopush => true

     d.重置

    sudo gitlab-ctl reconfigure 

    重启命令是gitlab-ctl start|stop|restart

     7.解决git域名的问题

     

    然后

     在然后,你本地的hosts文件里面添加服务区的ip,指定域名

    我gitlab的服务器是192.168.1.151

  • 相关阅读:
    zabbix短信网关调用问题总结
    zabbix短信接口调用
    Windows Open with Sublime Text
    [转载]windows下安装Python虚拟环境virtualenvwrapper-win
    Resilio-sync auto restart
    django-orm-standalone
    RabbitMQ笔记
    RabbitMQ启动出错:- unable to connect to epmd on xxxx: timeout (timed out)
    [Python笔记]第十六篇:web框架之Tornado
    [前端笔记]第三篇:JavaScript
  • 原文地址:https://www.cnblogs.com/renfanzi/p/6169281.html
Copyright © 2011-2022 走看看