安裝gitlab的資料網上搜索不少,但發現不少都是比較老的資料了。我把我安裝的過程記錄一下,應該是最簡單的過程了git
1. 到 https://about.gitlab.com/downloads/ 下載跟本身系統對應的版本。 注意必定是對應的。若是會出各類問題ubuntu
以ubuntu 14.04爲例。就是先wget服務器
下面的 app
sudo apt-get install openssh-server 已經都已經安裝了。因此這步基本能夠跳過。
sudo apt-get install postfix 我是用的QQ ,email的郵箱來發的 ,因此這不我已跳過了
而後就是
sudo dpkg -i gitlab_7.4.4-omnibus.5.1.0.ci.1-1_amd64.deb
安裝完成後按提示去 /etc/gitlab/gitlab.rb 裏修改
而後就是
sudo gitlab-ctl reconfigure
遊覽器打開地址輸入 root / 5iveL!fe 看看效果吧
2. 注意的地方:ssh
a. 服務器須要1G以上的內存,我試過用600+的內存。運行報錯誤。搜索好久的資料才知道是內存不夠用。後來改爲1G的順利安裝運行gitlab
b. 搜索的不少資料。其實看完這也沒的內容就不須要去其餘地方找資料了。地址是:post
https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.mdrest
c. 不少配置都是在/etc/gitlab/gitlab.rb 包括髮郵件code
3. 採用的命令有 component
sudo gitlab-ctl reconfigure
sudo gitlab-ctl status
sudo gitlab-ctl restart
4. 安裝後的目錄結構
Omnibus-gitlab uses four different directories.
/opt/gitlab holds application code for GitLab and its dependencies./var/opt/gitlab holds application data and configuration files that gitlab-ctl reconfigure writes to./etc/gitlab holds configuration files for omnibus-gitlab. These are the only files that you should ever have to edit manually./var/log/gitlab contains all log data generated by components of omnibus-gitlab.