omnibus方式部署gitlab

omnibus方式部署gitlab

這幾天折騰搭建git服務器,選擇了比較流行的gitlab,一開始就直奔一鍵安裝腳本去了,連gitlab主頁都沒去看看。用的gitlab-installer,centos6.5,各類錯誤,各類依賴關係,還有各類沒法鏈接,兩天了都沒成功。無奈手動配置,沒有接觸過ruby on rails,照着網上的文檔抄,忍受着龜速的epel源,花了幾個小時,終於配置成功。把一個項目託管上去,終於鬆口氣,想着下班回去在配一遍,總結下過程。然而,下班回來一搜gitlab,隨手打開gitlab主頁,我決定暫時放棄這個想法。html

由於我發現,居!然!有!官!方!的!rpm!安!裝!包!git

omnibus方式部署gitlab

 

步驟很簡單,主要就是下載速度太慢,好在有個美國的vps,先下載到vps上,而後從vps下載,速度稍好,順便用百度網盤離線下載了一份。centos

配置開放用戶註冊

默認是不容許註冊的,若是須要開放註冊,能夠編輯 /etc/gitlab/gitlab.rb,查找signup_enabled ,值改成true,並取消註釋,以後從新配置gitlab。ruby

 

 遇到的問題

內存不足

512M的虛擬機,打開gitlab頁面巨卡,簡直沒法忍受,查看內存使用狀況:服務器

查看gitlab官網的硬件需求app

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.less

  • 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 size and supports up to 500 users
  • 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.ssh

把虛擬機內存調到1G,果真好了,頁面打開很流暢。curl

可是以前手動配置的也是512的虛擬機,打開同樣很流暢,看來手動配置仍是有意義的

相關文章
相關標籤/搜索