十二12 发表于 2018-1-10 19:35:30

omnibus方式部署gitlab

  这几天折腾搭建git服务器,选择了比较流行的gitlab,一开始就直奔一键安装脚本去了,连gitlab主页都没去看看。用的gitlab-installer,centos6.5,各种错误,各种依赖关系,还有各种无法连接,两天了都没成功。无奈手动配置,没有接触过ruby on rails,照着网上的文档抄,忍受着龟速的epel源,花了几个小时,终于配置成功。把一个项目托管上去,终于松口气,想着下班回去在配一遍,总结下过程。然而,下班回来一搜gitlab,随手打开gitlab主页,我决定暂时放弃这个想法。
  因为我发现,居!然!有!官!方!的!rpm!安!装!包!
  Contents

[*]1 omnibus方式部署gitlab
[*]2 配置开放用户注册
[*]3遇到的问题

[*]3.1 内存不足
[*]3.2 Memory

[*]4 参考资料
omnibus方式部署gitlab
1234567891011121314151617181920Download the Omnibus package and install everything curl -O https://downloads-packages.s3.amazonaws.com/centos-6.6/gitlab-7.6.2_omnibus.5.3.0.ci.1-1.el6.x86_64.rpmsudo yum install openssh-serversudo yum install postfixsudo yum install croniesudo service postfix startsudo chkconfig postfix onsudo rpm -i gitlab-7.6.2_omnibus.5.3.0.ci.1-1.el6.x86_64.rpmConfigure and start GitLab sudo gitlab-ctl reconfiguresudo lokkit -s http -s sshBrowse to the hostname and login Username: root Password: 5iveL!fe  步骤很简单,主要就是下载速度太慢,好在有个美国的vps,先下载到vps上,然后从vps下载,速度稍好,顺便用百度网盘离线下载了一份。
配置开放用户注册
  默认是不允许注册的,如果需要开放注册,可以编辑 /etc/gitlab/gitlab.rb,查找signup_enabled ,值改为true,并取消注释,之后重新配置gitlab。
1sudo gitlab-ctl reconfigure 遇到的问题
内存不足
  512M的虚拟机,打开gitlab页面巨卡,简直无法忍受,查看内存使用情况:
12345# free -m            total       used       free   shared    buffers   cachedMem:         482      476          6          0          0         13-/+ buffers/cache:      462         20Swap:         1023      260      763  查看gitlab官网的硬件需求。
MEMORY
  You need at least 2GB of addressable memory (RAM + swap) to install and use GitLab! With less memory GitLab will give strange errors during the reconfigure run and 500 errors during usage.

[*]512MB RAM + 1.5GB of swap is the absolute minimum but we strongly advise against this amount of memory. See the unicorn worker section below for more advise.
[*]1GB RAM + 1GB swap supports up to 100 users
[*]2GB RAM is the recommended memory>
[*]4GB RAM supports up to 2,000 users
[*]8GB RAM supports up to 5,000 users
[*]16GB RAM supports up to 10,000 users
[*]32GB RAM supports up to 20,000 users
[*]64GB RAM supports up to 40,000 users
  Notice: The 25 workers of Sidekiq will show up as separate processes in your process overview (such as top or htop) but they share the same RAM allocation since Sidekiq is a multithreaded application.
  把虚拟机内存调到1G,果然好了,页面打开很流畅。
12345# free -m             total       used       free   shared    buffers   cachedMem:         988      906         82          0         23      114-/+ buffers/cache:      768      220Swap:         1023          0       1023  但是之前手动配置的也是512的虚拟机,打开一样很流畅,看来手动配置还是有意义的
页: [1]
查看完整版本: omnibus方式部署gitlab