gitlab搭建-創(chuàng)新互聯(lián)

gitlab官網(wǎng) https://about.gitlab.com/gitlab-com/
官方安裝文檔 https://about.gitlab.com/installation/?version=ce#centos-7 (ce/ee)
要求服務(wù)器內(nèi)存不少于2g
國(guó)外比較慢,所以我們用國(guó)內(nèi)源

站在用戶(hù)的角度思考問(wèn)題,與客戶(hù)深入溝通,找到扎蘭屯網(wǎng)站設(shè)計(jì)與扎蘭屯網(wǎng)站推廣的解決方案,憑借多年的經(jīng)驗(yàn),讓設(shè)計(jì)與互聯(lián)網(wǎng)技術(shù)結(jié)合,創(chuàng)造個(gè)性化、用戶(hù)體驗(yàn)好的作品,建站類(lèi)型包括:網(wǎng)站建設(shè)、成都網(wǎng)站建設(shè)、企業(yè)官網(wǎng)、英文網(wǎng)站、手機(jī)端網(wǎng)站、網(wǎng)站推廣、域名與空間、網(wǎng)站空間、企業(yè)郵箱。業(yè)務(wù)覆蓋扎蘭屯地區(qū)。

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)聽(tīng)端口
gitlab-ctl stop/restart/start/status
瀏覽器訪問(wèn)gitlab,輸入ip即可
注意如果訪問(wèn)502,注意是否有端口沖突,最好啟動(dòng)gitlab前關(guān)閉所有之前搭建的服務(wù)
默認(rèn)管理員root,無(wú)密碼,它會(huì)讓我們?nèi)ザx一個(gè)密碼
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 (這里是一個(gè)編號(hào),即備份文件的前綴)
例如:
gitlab-rake gitlab:backup:restore BACKUP=1511704184_2017_11_26_10.2.1

再啟動(dòng)服務(wù) gitlab-ctl start

rpm安裝:(centos6.5)
安裝依賴(lài):
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
啟動(dòng):
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這個(gè)服務(wù)
[root@git Gitlab-cn]#gitlab-ctl stop
#開(kāi)始漢化
[root@git gitlab_pack]# \cp -rf ../Gitlab-cn/* /opt/gitlab/embedded/service/gitlab-rails/
測(cè)試是否漢化成功
[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 項(xiàng)目創(chuàng)建后地址由Localhost改為實(shí)際IP的方法
進(jìn)入終端修改以下文件即可。
vim /opt/gitlab/embedded/service/gitlab-rails/config/gitlab.yml

GitLab settings

gitlab:

Web server settings (note: host is the FQDN, do not include http://)

host: localhost         >> 這里改為主機(jī)的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元起步,三天無(wú)理由+7*72小時(shí)售后在線,公司持有idc許可證,提供“云服務(wù)器、裸金屬服務(wù)器、高防服務(wù)器、香港服務(wù)器、美國(guó)服務(wù)器、虛擬主機(jī)、免備案服務(wù)器”等云主機(jī)租用服務(wù)以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡(jiǎn)單易用、服務(wù)可用性高、性?xún)r(jià)比高”等特點(diǎn)與優(yōu)勢(shì),專(zhuān)為企業(yè)上云打造定制,能夠滿足用戶(hù)豐富、多元化的應(yīng)用場(chǎng)景需求。

本文題目:gitlab搭建-創(chuàng)新互聯(lián)
轉(zhuǎn)載注明:http://muchs.cn/article34/dpphse.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站策劃外貿(mào)建站、App開(kāi)發(fā)、微信小程序、網(wǎng)站設(shè)計(jì)公司、品牌網(wǎng)站建設(shè)

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶(hù)投稿、用戶(hù)轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)

h5響應(yīng)式網(wǎng)站建設(shè)