• 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

  • 相关阅读:
    Git中使用.gitignore忽略文件的推送
    git stash详解
    Git撤销&回滚操作(git reset 和 get revert)
    git rebase和git merge的区别
    git撤销已经push到远程仓库上的代码
    Git Merge
    git cherry-pick 教程
    Failed to start LSB: Bring up/down错误解决方法
    linux centos7安装部署gitlab服务器
    CentOs7 HP找回root密码
  • 原文地址:https://www.cnblogs.com/renfanzi/p/6169281.html
Copyright © 2020-2023  润新知