安裝gitlab的資料網上搜索很多,但發現很多都是比較老的資料了。我把我安裝的過程記錄一下,應該是最簡單的過程了
1. 到 https://about.gitlab.com/downloads/ 下載跟自己系統對應的版本。 注意一定是對應的。如果會出各種問題
以ubuntu 14.04為例。就是先wget
下面的
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. 注意的地方:
a. 服務器需要1G以上的內存,我試過用600+的內存。運行報錯誤。搜索很久的資料才知道是內存不夠用。后來改成1G的順利安裝運行
b. 搜索的很多資料。其實看完這也沒的內容就不需要去其他地方找資料了。地址是:
https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md
c. 很多配置都是在/etc/gitlab/gitlab.rb 包括發郵件
3. 采用的命令有
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.