在 Ubuntu 14安裝gitlab

在 Ubuntu 14 安裝

使用國內安裝源鏡像,加快安裝速度。修改/etc/apt/sources.list.d/gitlab-ce.list,添加以下行
deb https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/debian jessie main


開始安裝:
# 安裝依賴包
sudo apt-get install curl openssh-server ca-certificates postfix
# 安裝 GitLab 社區版
apt-get install gitlab-ce
# 初始化,初始化完自動啓動 GitLab
sudo gitlab-ctl reconfigure


在 CentOS 6 安裝
使用國內鏡像安裝,新建 /etc/yum.repos.d/gitlab-ce.repo,添加以下內容
[gitlab-ce]
name=gitlab-ce
baseurl=http://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el6
repo_gpgcheck=0
gpgcheck=0
enabled=1
gpgkey=https://packages.gitlab.com/gpg.key
安裝步驟:

# 安裝依賴包
sudo yum install curl openssh-server openssh-clients postfix cronie
# 啓動 postfix 郵件服務
sudo service postfix start
# 檢查 postfix
sudo chkconfig postfix on
# 安裝 GitLab 社區版
sudo yum install gitlab-ce
# 初始化 GitLab
sudo gitlab-ctl reconfigure


修改 host
添加訪問的 host,修改/etc/gitlab/gitlab.rb的external_url
external_url 'http://git.home.com'
vi /etc/hosts,添加 host 映射
127.0.0.1 git.home.com
每次修改/etc/gitlab/gitlab.rb,都要運行以下命令,讓配置生效


sudo gitlab-ctl reconfigure
配置本機的 host,如:192.168.113.59 git.home.com。最後,在瀏覽器打開網址http://git.home.com

登陸用戶名: root
密碼: 5iveL!fe

ps:

①(內存給到4G CPU給到4核),比較吃系統資源。

②jenkins+git


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章