美文网首页
GitLab服务器的搭建

GitLab服务器的搭建

作者: DontPushMeForev | 来源:发表于2017-10-18 15:54 被阅读0次
  1. git官网 about.gitlab.com

  2. 点击 Install GitLab

  3. 选择具体的系统

  4. 运行命令

    sudo yum install -y curl policycoreutils-python openssh-server cronie
    sudo lokkit -s http -s ssh (打开防火墙的ssh和http)
    sudo yum install postfix
    sudo service postfix start
    sudo chkconfig postfix on     
    (安装postfix发送通知邮件。如果你想使用另一个解决方案来发送电子邮件,请跳过这一步,配置外部SMTP服务器后gitlab已安装。ps:我不会跳过)
    
  5. 安装git

       curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.rpm.sh | sudo bash  (添加gitlab封装库)
       sudo yum -y install gitlab-ee  (安装gitlab包)
       sudo gitlab-ctl reconfigure    (配置并启动gitlab)
    

注意:如果遇到问题:No more mirrors to try.(没有镜像,)
要是一开始就没有镜像,需要换yum源 ,要是开始下载了提示这个 就是说明网络不好,再多次执行 sudo yum -y install gitlab-ee )

  1. 启动不成功
    关闭资源 释放内存

     sudo gitlab-ctl stop unicorn
     sudo gitlab-ctl stop sidekiq
    
  2. 修改配置

     修改 /etc/gitlab/gitlab.rb
     把 /etc/gitlab/gitlab.rb的external_url属性修改成你的ip
     external_url "https:192.168.0.100"(ps:本人虚拟机ip是192.168.0.100)
    
  3. 配置生效

     sudo gitlab-ctl reconfigure
    
  4. 重启服务

     sudo gitlab-ctl restart
    
  5. 测试

    访问external_url 的属性(本人:192.168.0.100)
    

ps:说一下 sudo sudo命令就是让你已管理员(可以理解为root)的身份执行后边的命令

相关文章

网友评论

      本文标题:GitLab服务器的搭建

      本文链接:https://www.haomeiwen.com/subject/vbkeuxtx.html