温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

centos7安装gitlab

发布时间:2020-05-31 12:40:15 来源:网络 阅读:455 作者:刘小潭 栏目:系统运维
  1. 关闭selinux
    sed -i "s/SELINUX=enforcing/SELINUX=disabled/g" /etc/selinux/config
    setenforce 0
  2. 关闭防火墙
    systemctl disable firewalld.service
    systemctl stop firewalld.service
    或者设置防火墙允许80端口访问
    firewall-cmd --zone=public --add-port=80/tcp --permanent
    firewall-cmd --zone=public --add-port=80/udp --permanent
    firewall-cmd --reload
  3. 下载gitlab源
    curl -s https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
  4. 安装gitlab
    yum install gitlab-ce-12.4.2-ce.0.el7.x86_64

  5. 优化gitlab
    vim /etc/gitlab/gitlab.rb
    external_url 'http://192.168.11.247' #我没有搭建dns,直接填ip

    unicorn['worker_timeout'] = 60
    
    unicorn['worker_processes'] = 2               #官方建议cpu核数加1
    
    unicorn['worker_memory_limit_min'] = "200 * 1 << 20"
    
    unicorn['worker_memory_limit_max'] = "300 * 1 << 20"
    
    postgresql['shared_buffers'] = "256MB"
    
    postgresql['max_worker_processes'] = 8
  6. 启动gitlab
    校验: gitlab-ctl reconfigure
    启动: gitlab-ctl start

  7. 访问gitlab

    centos7安装gitlab

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI