gitlab官網(wǎng) https://about.gitlab.com/gitlab-com/
官方安裝文檔 https://about.gitlab.com/installation/?version=ce#centos-7 (ce/ee)
要求服務(wù)器內(nèi)存不少于2g
國外比較慢,所以我們用國內(nèi)源
vim /etc/yum.repos.d/gitlab.repo//加入如下內(nèi)容
[gitlab-ce]
name=Gitlab CE Repository
baseurl=https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el$releasever/
gpgcheck=0
enabled=1
yum install -y gitlab-ce
gitlab-ctl reconfigure
netstat -lnpt //查看監(jiān)聽端口
gitlab-ctl stop/restart/start/status
瀏覽器訪問gitlab,輸入ip即可
注意如果訪問502,注意是否有端口沖突,最好啟動gitlab前關(guān)閉所有之前搭建的服務(wù)
默認(rèn)管理員root,無密碼,它會讓我們?nèi)ザx一個密碼
gitlab常用命令 https://www.cnyunwei.cc/archives/1204
gitlab備份 gitlab-rake gitlab:backup:create
備份目錄在/var/opt/gitlab/backups
gitlab 恢復(fù) 先停服務(wù) gitlab-ctl stop unicorn ; gitlab-ctl stop sidekiq
gitlab-rake gitlab:backup:restore BACKUP=xxxxx (這里是一個編號,即備份文件的前綴)
例如:
gitlab-rake gitlab:backup:restore BACKUP=1511704184_2017_11_26_10.2.1
再啟動服務(wù) gitlab-ctl start
rpm安裝:(centos6.5)
安裝依賴:
yum install curl openssh-server openssh-clients postfix cronie
rpm地址:
https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el6/gitlab-ce-8.0.5-ce.0.el6.x86_64.rpm
下載:
wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el6/gitlab-ce-8.0.5-ce.0.el6.x86_64.rpm
安裝:
rpm -ivh gitlab-ce-8.0.5-ce.0.el6.x86_64.rpm
gitlab-ctl reconfigure
啟動:
gitlab-ctl start
漢化:
其他版本可參考:http://blog.csdn.net/wh311212/article/details/72627803
#8版本下載漢化包并漢化
[root@git hanhua]# git clonehttps://gitlab.com/larryli/gitlab.git Gitlab-cn && cd Gitlab-cn
#備份/opt/gitlab/embedded/service目錄下的gitlab-rails目錄,該目錄下的內(nèi)容主要是web應(yīng)用部分
#備份
[root@git Gitlab-cn]#\cp -rf /opt/gitlab/embedded/service/gitlab-rails{,.ori}
#關(guān)閉gitlab這個服務(wù)
[root@git Gitlab-cn]#gitlab-ctl stop
#開始漢化
[root@git gitlab_pack]# \cp -rf ../Gitlab-cn/* /opt/gitlab/embedded/service/gitlab-rails/
測試是否漢化成功
[root@git ~]# gitlab-ctl start
ok: run: gitlab-workhorse: (pid 1407) 263s
ok: run: logrotate: (pid 1403) 263s
ok: run: nginx: (pid 1404) 263s
ok: run: postgresql: (pid 1405) 263s
ok: run: redis: (pid 1402) 263s
ok: run: sidekiq: (pid 1400) 263s
ok: run: unicorn: (pid 1401) 263s
登錄
http://192.168.201.131/users/sign_in
GitLab 項目創(chuàng)建后地址由Localhost改為實際IP的方法
進入終端修改以下文件即可。
vim /opt/gitlab/embedded/service/gitlab-rails/config/gitlab.yml
gitlab:
host: localhost >> 這里改為主機的IP即可
port: 80
https: false
# Uncommment this line below if your ssh host is different from HTTP/HTTPS one
# (you'd obviously need to replace ssh.host_example.com with your own host).
# Otherwise, ssh host will be set to the `host:` value above
重啟GitLab
gitlab-ctl restart
git clean 參數(shù)
-n 顯示 將要 刪除的 文件 和 目錄
-f 刪除 文件,-df 刪除 文件 和 目錄
另外有需要云服務(wù)器可以了解下創(chuàng)新互聯(lián)cdcxhl.cn,海內(nèi)外云服務(wù)器15元起步,三天無理由+7*72小時售后在線,公司持有idc許可證,提供“云服務(wù)器、裸金屬服務(wù)器、高防服務(wù)器、香港服務(wù)器、美國服務(wù)器、虛擬主機、免備案服務(wù)器”等云主機租用服務(wù)以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡單易用、服務(wù)可用性高、性價比高”等特點與優(yōu)勢,專為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應(yīng)用場景需求。
本文題目:gitlab搭建-創(chuàng)新互聯(lián)
轉(zhuǎn)載注明:http://jinyejixie.com/article34/dpphse.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站策劃、外貿(mào)建站、App開發(fā)、微信小程序、網(wǎng)站設(shè)計公司、品牌網(wǎng)站建設(shè)
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)