CentOS-6.8系列-gitlab安裝指南

本文章也是在參考了網上好多相關文章(主要參考文章見文末)後自學整理的,如有錯誤之處煩請留言指正。

基礎環境準備

#安裝基礎依賴
yum install make cmake gcc gcc-c++
yum install -y wget
#安裝ruby
cd /usr/local/src
wget https://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.5.tar.gz
tar -zxvf ruby-2.3.5.tar.gz
cd ruby-2.3.5
./configure
make
make install
ruby -v
cd ../

安裝gitlab

#安裝依賴
yum install -y curl openssh-server openssh-clients postfix cronie
#打開系統防火牆 HTTP 和 SSH 的訪問
service postfix start
chkconfig postfix on
lokkit -s http -s ssh
#使用國內的鏡像
vi /etc/yum.repos.d/gitlab-ce.repo
    #文件內容如下
    [gitlab-ce]
    name=Gitlab CE Repository
    baseurl=https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el$releasever/
    gpgcheck=0
    enabled=1
yum makecache
yum install gitlab-ce
gitlab-ctl reconfigure
vi /etc/gitlab/gitlab.rb
    external_url 'http://gitlab.example.com',改爲你的域名 / IP
gitlab-ctl reconfigure
#訪問地址(ip修改爲對應的ip)
http://10.150.27.29

常用命令

#gitlab 啓動、停止、重啓
gitlab-ctl start/stop/restart
#查看所有日誌
gitlab-ctl tail
#查看nginx 訪問日誌
gitlab-ctl tail nginx/gitlab_acces.log
#查看 postgresql 日誌
gitlab-ctl tail  postgresql
#查看狀態
gitlab-ctl status

主要參考文章:
doc/settings/nginx.md · master · GitLab.org / omnibus-gitlab · GitLab
GitLab 簡明安裝配置指南 - Hiufan - SegmentFault
我所遇到的GitLab 502問題的解決 - CSDN博客
gitlab簡單使用教程 - Wuyuan’s Blog
gitlab的使用 - 劉坤的技術博客
清華大學開源軟件鏡像站 | Tsinghua Open Source Mirror

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