1. 程式人生 > >gitlab的安裝以及漢化

gitlab的安裝以及漢化

轉載自:http://www.cnblogs.com/yangliheng/p/5760185.html

一,gitlab的安裝

首先在網上下載好任意版本gitlab的rpm包

推薦下面的地址:

https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-8.8.5-ce.1.el7.x86_64.rpm

[[email protected] ~]# rz -E
 2 
 3 rz waiting to receive.
 4 
 5 [[email protected] ~]# ls
 6 
 7 anaconda-ks.cfg  gitlab-ce-8.8
.5-ce.1.el7.x86_64.rpm 8 9 [[email protected] ~]# rpm -ivh gitlab-ce-8.8.5-ce.1.el7.x86_64.rpm #安裝 10 11 Preparing...################################# [100%] 12 13 Updating / installing... 14 15 1:gitlab-ce-8.8.5-ce.1.el7 ################################# [100%] 16 17 gitlab: Thank you for
installing GitLab! 18 19 gitlab: To configure and start GitLab, RUN THE FOLLOWING COMMAND: 20 21 22 23 sudo gitlab-ctl reconfigure #配置並啟動gitlab 24 25 26 27 gitlab: GitLab should be reachable at http://linux-node1 預設的訪問地址 28 29 gitlab: Otherwise configure GitLab for your system by editing /etc/gitlab/gitlab.rb file
#gitlab的配置檔案,修改之後需要重新gitlab-ctl reconfigure 30 31 gitlab: And running reconfigure again. 32 33 gitlab: 34 35 gitlab: For a comprehensive list of configuration options please see the Omnibus GitLab readme 36 37 gitlab: https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md 38 39 gitlab: 40 41 It looks like GitLab has not been configured yet; skipping the upgrade script. 42 43 [[email protected] ~]#

這裡我先修改下配置檔案

vim /etc/gitlab/gitlab.rb   #修改配置檔案

修改結果如下:

[[email protected] ~]# grep -n "^[a-Z]" /etc/gitlab/gitlab.rb

11:external_url 'http://192.168.56.11'

 

[[email protected]-node1 ~]# gitlab-ctl reconfigure  #配置並啟動gitlab

開啟瀏覽器輸入http://192.168.56.11   #192.168.56.11我的本機ip

第一次登入要求設定root密碼

登入成功之後,是這樣的

漢化:

[[email protected] ~]# rz

[[email protected]-node1 ~]# ll

anaconda-ks.cfg
gitlab-ce-8.8.5-ce.1.el7.x86_64.rpm
gitlabhq.tar.gz

[[email protected]-node1 ~]# tar xf gitlabhq.tar.gz

[[email protected]-node1 ~]# ls

anaconda-ks.cfg gitlab-ce-8.8.5-ce.1.el7.x86_64.rpm gitlabhq  gitlabhq.tar.gz

###關於這個也可以直接git clone https://github.com/larryli/gitlabhq.git

[[email protected] ~]# cp -r /opt/gitlab/embedded/service/gitlab-rails{,.ori}

[[email protected]-node1 ~]# gitlab-ctl stop

ok: down: gitlab-workhorse: 1s, normally up

ok: down: logrotate: 0s, normally up

ok: down: nginx: 0s, normally up

ok: down: postgresql: 1s, normally up

ok: down: redis: 0s, normally up

ok: down: sidekiq: 0s, normally up

ok: down: unicorn: 0s, normally up

[[email protected]-node1 ~]# \cp -rf /root/gitlabhq/* /opt/gitlab/embedded/service/gitlab-rails/

cp: cannot overwrite non-directory ‘/opt/gitlab/embedded/service/gitlab-rails/log’ with directory ‘/root/gitlabhq/log’

cp: cannot overwrite non-directory ‘/opt/gitlab/embedded/service/gitlab-rails/tmp’ with directory ‘/root/gitlabhq/tmp’

#這裡的錯誤,忽略,因為之前已經設定gitlab的root密碼了

[[email protected] ~]# gitlab-ctl start

ok: run: gitlab-workhorse: (pid 25910) 0s

ok: run: logrotate: (pid 25914) 0s

ok: run: nginx: (pid 25920) 1s

ok: run: postgresql: (pid 25925) 0s

ok: run: redis: (pid 25933) 1s

ok: run: sidekiq: (pid 25937) 0s

ok: run: unicorn: (pid 25941) 0s

漢化完成之後的效果

二,gitlab的備份與恢復

Gitlab 建立備份

使用Gitlab一鍵安裝包安裝Gitlab非常簡單, 同樣的備份恢復與遷移也非常簡單. 使用一條命令即可建立完整的Gitlab備份:

gitlab-rake gitlab:backup:create

使用以上命令會在/var/opt/gitlab/backups目錄下建立一個名稱類似為1393513186_gitlab_backup.tar的壓縮包, 這個壓縮包就是Gitlab整個的完整部分, 其中開頭的1393513186是備份建立的日期.

Gitlab 修改備份檔案預設目錄

你也可以通過修改/etc/gitlab/gitlab.rb來修改預設存放備份檔案的目錄:

gitlab_rails['backup_path'] = '/mnt/backups'

/mnt/backups修改為你想存放備份的目錄即可, 修改完成之後使用gitlab-ctl reconfigure命令過載配置檔案即可.

Gitlab 自動備份

也可以通過crontab使用備份命令實現自動備份:

sudo su -
crontab -e

加入以下, 實現每天凌晨2點進行一次自動備份:

0 2 * * * /opt/gitlab/bin/gitlab-rake gitlab:backup:create

Gitlab 恢復

同樣, Gitlab的從備份恢復也非常簡單:

# 停止相關資料連線服務
gitlab-ctl stop unicorn
gitlab-ctl stop sidekiq

# 從1393513186編號備份中恢復
gitlab-rake gitlab:backup:restore BACKUP=1393513186

# 啟動Gitlab
sudo gitlab-ctl start

Gitlab遷移

遷移如同備份與恢復的步驟一樣, 只需要將老伺服器/var/opt/gitlab/backups目錄下的備份檔案拷貝到新伺服器上的/var/opt/gitlab/backups即可(如果你沒修改過預設備份目錄的話). 但是需要注意的是新伺服器上的Gitlab的版本必須與建立備份時的Gitlab版本號相同. 比如新伺服器安裝的是最新的7.60版本的Gitlab, 那麼遷移之前, 最好將老伺服器的Gitlab 升級為7.60在進行備份.

其他

最新版本的Gitlab已經修復了HTTPS裝置的BUG, 現在使用官方HTTPS配置即可輕鬆啟用HTTPS. 

相關推薦

gitlab安裝以及

轉載自:http://www.cnblogs.com/yangliheng/p/5760185.html 一,gitlab的安裝 首先在網上下載好任意版本gitlab的rpm包 推薦下面的地址: https://mirrors.tuna.tsinghua.edu.cn/

WebStorm2018破解版安裝以及

1、下載解壓,得到jetbrains webstorm 2018.2主程式,破解檔案和中文語言包; 2、執行“WebStorm-2018.2.exe”開始安裝,安裝目錄可以是預設安裝目錄,也可以自己更改 我軟體安裝盤是F盤所以路徑為:F:\WebStorm 3、勾選建立webstorm 2

Gitlab--安裝

簡介 gitlab是一個利用 Ruby on Rails 開發的開源應用程式,實現一個自託管的Git 專案倉庫,可通過Web介面迚行訪問公開的戒者私人專案。Ruby on Rails 是一個可以使你開發、部署、維護 web 應用程式變得簡單的框架。GitLab 擁有與Github 類似的功能,能夠瀏覽原始碼

gitlab安裝

更新 修改 tlab -i mbed 覆蓋 地址 配置 roo 下載源https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/?C=M&O=A yum install policycoreutils-python -y

Centos 7 安裝 gitlab 以及

一:安裝   1:新增yum配置檔案 # vim /etc/yum.repos.d/gitlab-ce.repo [gitlab-ce] name=gitlab-ce baseurl=http://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el6

PowerDesigner V16.5 安裝教程以及(數據庫建模)

gpo 軟件下載 進入 str strong text 需要 覆蓋 tro 一、power designer是什麽以及是幹什麽的? power designer是能進行數據庫設計的強大的軟件,是一款開發人員常用的數據庫建模工具。分別從概念數據模型(Conceptual D

GitLab 社群版安裝方法

1、GitLab 安裝 1.1 安裝並配置必要的依賴關係 在 CentOS 系統上,下面的命令將會開啟系統防火牆 HTTP 和 SSH 的訪問。 yum install -y curl policycoreutils-python openssh-server

Axure RP安裝破解以及釋出到至AxureShare

Licensee:University of Science and Technology of China (CLASSROOM) Key:DTXRAnPn1P65Rt0xB4eTQ+4bF5IUF0gu0X9XBEUhM4QxY0DRFJxYEmgh4n

GitLab v8.17.0安裝

一、GitLab介紹 GitLab是一個利用 Ruby on Rails 開發的開源應用程式,實現一個自託管的Git專案倉庫,可通過Web介面進行訪問公開的或者私人專案。 它擁有與Github類似的功能,能夠瀏覽原始碼,管理缺陷和註釋。可以管理團隊對倉庫的訪

Gitlab部署和以及簡單運維

在跟網路中心的老師溝通成立映象站的相關事宜的時候,意外地接下來搭建一套校內的 Git 服務的任務。 @怡紅公子曾經搭建過一套類似的服務,但由於伺服器端沒有開啟 VT 虛擬化導致不能安裝 64 位的作業系統,再加上 Gitlab 不提供 32 位的安裝包,所以長期以來怡紅公子一直都是自行編譯並配置 Gitl

Axure RP 8的安裝、破解以及

2、破解: 註冊碼(原部落格網址:http://www.usbmi.com/1045.html) Licensee:usbmi.com Key:8MhUXSkEGZpjrNqWq0BUA3oS

CentOS7 安裝 GitLab

rip 準備 yum script .sh 瀏覽器 check bash 環境 目錄 一、安裝 GitLab 二、漢化 GitLab 參考鏈接

subline Text3 安裝

lin html cef 下載 aid ont pac package font 因為自己的subline 有問題 所以決心重新改一下了。  三步:   http://www.sublimetext.com/3                官網下載subl

git安裝

gitlab 漢化 gitlab安裝:https://www.gitlab.com.cn/downloads/#centos7gitlab漢化包下載:https://gitlab.com/xhang/gitlab.git把下載下來的內容替換gitlab-rails目錄中的內容,然後啟動即可。/opt/

安卓工作室 android studio文件和代碼模板,以及出錯問題

bottom dialog res getconf ring util etc eap tco 安卓工作室 android studio文件和代碼模板,以及漢化出錯問題 作者:韓夢飛沙 Author:han_meng_fei_sha 郵箱:[email p

PHPStorm 3.3 破解方法 以及

phpstorm idea blog rain log jetbrains drive bsp clas 第一步修改host文件(host文件地址為): C:\Windows\System32\drivers\etc 將以下內容添加到host文件裏面 0.0.0.0

GitLab10安裝-部署--備份-升級

gitlab 安裝部署 漢化 備份 升級 本文以 GitLab 10.5 的安裝與漢化進行例子 1、環境簡介: CentOS 7 (and RedHat/Oracle/Scientific Linux 7.4)檢查您的服務器是否符合硬件需求.GitLab packages 是專為64位系統

wordpress安裝、主題等

wordpress1、服務器環境:CentOS + lnmp1.3,連接服務工具:WinSCP、putty 2、https://wordpress.org中下載最新版本 ,漢化版本https://cn.wordpress.org/support/ 3、下載後上傳到服務器: /home/www/defaul

Gitlab部署及操作

hosts VC hub 安裝 true 一個 epo found rails 一、簡介 GitLab是一個利用 Ruby on Rails 開發的開源應用程序,實現一個自托管的Git項目倉庫,可通過Web界面進行訪問公開的或者私人項目。 GitLab擁有與Github類

TortoiseGit安裝

load log 技術 term col git安裝 org 就是 ef7 如果你的電腦上裝的有TortoiseGit;2.點擊about3.點擊visit our website進入4.進入https://tortoisegit.org/官網,點擊download5.裏面