Centos6快速安裝Litlab中文版
一、使用國內(nèi)鏡像安裝會比較快:
vi/etc/yum.repos.d/gitlab-ce.repo,添加以下內(nèi)容:
[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
二、將服務器上的軟件包信息 現(xiàn)在本地緩存,以提高 搜索 安裝軟件的速度
sudo yum makecache
三、安裝 GitLab 社區(qū)版
sudo yum install gitlab-ce(自動安裝最新版)
sudo yum install gitlab-ce-8.8.2-ce.0.el6(安裝指定版本)
四、安裝依賴包
sudo yum install curl openssh-server openssh-clients postfix cronie git
五、啟動 postfix 郵件服務
sudo service postfix start
六、檢查 postfix
sudo chkconfig postfix on
七、初始化 GitLab
sudo gitlab-ctl reconfigure
八、修改 host(可省略)
添加訪問的 host:
vi /etc/gitlab/gitlab.rb
將external_url 'http://git.home.com'修改成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.0.59 git.home.com。最后,在瀏覽器打開網(wǎng)址http://git.home.com,登陸,會提示修改密碼,可以修改,也可以在漢化之后再修改
默認管理員:
用戶名: root
密碼: 5iveL!fe
九、克隆 GitLab 源碼倉庫:
git clone https://gitcafe.com/larryli/gitlab.git(快)
git clone https://gitlab.com/larryli/gitlab.git(慢)
git clone https://git.coding.net/larryli/gitlab.git (Coder.net 鏡像)(快)
十、安裝中文語言包(漢化)
1、首先確認當前安裝版本
cat /opt/gitlab/embedded/service/gitlab-rails/VERSION
2、下載對應的漢化補?。梢栽诰W(wǎng)上搜索或者加入Gitlab中文群,群共享有漢化補丁下載),并上傳到Gitlab主機
3、停止 gitlab
sudo gitlab-ctl stop
4、應用漢化補丁
cd /opt/gitlab/embedded/service/gitlab-rails
git apply 漢化補丁文件
5、啟動gitlab
sudo gitlab-ctl start
至此,漢化完畢。打開地址http://git.home.com,便會看到中文版的GitLab