歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
您现在的位置: Linux教程網 >> UnixLinux >  >> Linux綜合 >> 學習Linux

centos6使用yum源安裝gitlab-ce私有環境

centos6使用yum源安裝gitlab-ce私有環境


centos6使用yum源安裝gitlab-ce私有環境


  1. 使用清華鏡像源配置yum源:

vim /etc/yum.repos.d/gitlab.repo

[Gitlab-CE]name=GitlabCEbaseurl=https://mirror.tuna.tsinghua.edu.cn/gitlab-ce/yum/el6/enabled=1gpgcheck=0

2. yum安裝

yum installgitlab-ce -y

3. gitlab配置(/opt/gitlab/gitlab.rb)

external_url'#配置服務器IP地址或域名#配置e-mailgitlab_rails['time_zone']='UTC'gitlab_rails['gitlab_email_enabled']=truegitlab_rails['gitlab_email_from']='[email protected]'gitlab_rails['gitlab_email_display_name']='APICloud_Gitlab'gitlab_rails['gitlab_email_reply_to']='[email protected]'gitlab_rails['smtp_enable']=truegitlab_rails['smtp_address']="smtp.163.com"gitlab_rails['smtp_port']=25gitlab_rails['smtp_user_name']="[email protected]"gitlab_rails['smtp_password']="nxgfvizafijytymx"gitlab_rails['smtp_domain']="163.com"gitlab_rails['smtp_authentication']="login"gitlab_rails['smtp_enable_starttls_auto']=truegitlab_rails['smtp_tls']=falsegitlab_ci['smtp_enable']=truegitlab_ci['smtp_address']="smtp.163.com"gitlab_ci['smtp_port']=25gitlab_ci['smtp_user_name']="[email protected]"gitlab_ci['smtp_password']="nxgfvizafijytymx"gitlab_ci['smtp_domain']="163.com"gitlab_ci['smtp_authentication']="login"gitlab_ci['smtp_enable_starttls_auto']=true

4. gitlab命令

  1. 重置配置,使修改生效

gitlab-ctlreconfigure

b. 登錄測試

Username:root(管理員賬號)Password:5iveL!fe

c. 解決gitlab默認頭像不能正常顯示的問題

gitlab_rails['gravatar_plain_url']='http://secure.gravatar.com/avatar/%{hash}?s=%{size}&d=identicon'gitlab_rails['gravatar_ssl_url']='https://secure.gravatar.com/avatar/%{hash}?s=%{size}&d=identicon'

5. 開機自啟動腳本設置

vim/opt/startGitlab.sh==========================#!/bin/bashsudolokkit-shttp-sssh==========================echo"/opt/startGitlab.sh">>vim/etc/rc.d/rc.local================================================

6. 數據備份與恢復

數據備份及恢復命令:備份path:/var/opt/gitlab/backups(備份和恢復文件都是git用戶)數據備份:gitlab-rakegitlab:backup:create數據恢復:gitlab-rakegitlab:backup:restore

使用Gitlab一鍵安裝包後的日常備份恢復與遷移https://segmentfault.com/a/1190000002439923

創建備份:gitlab-rakegitlab:backup:create恢復備份:#停止相關數據連接服務gitlab-ctlstopunicorngitlab-ctlstopsidekiq#從1393513186編號備份中恢復gitlab-rakegitlab:backup:restoreBACKUP=1393513186#啟動Gitlabsudogitlab-ctlstart

7. 參考鏈接:

http://swht1278.blog.51cto.com/7138082/1643939

http://xxxxxx/Linuxjc/1156077.html TechArticle

Copyright © Linux教程網 All Rights Reserved