Centos6 安裝 GItLab

1.鏡像下載地址:https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/官網下載比較慢所有在這下載

centos 6系統的下載地址:https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el6

centos 7系統的下載地址:https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7

 

2.下載:gitlab-ce-10.0.5-ce.0.el7.x86_64.rpm

3.系統工具:

yum install vim gcc gcc-c++ wget net-tools lrzsz iotop lsof iotop bash-completion -y
yum install curl policycoreutils openssh-server openssh-clients postfix -y

yum localinstall gitlab-ce-10.0.5-ce.0.el7.x86_64.rpm

#安裝過程中

##error: Failed dependencies:

policycoreutils-python is needed by gitlab-ce-10.7.3-ce.0.el7.x86_64

##安裝環境

##yum install policycoreutils-python

##繼續安裝

參考地址;https://www.cnblogs.com/hero123/p/10559201.html

https://blog.csdn.net/gududedabai/article/details/81145216

 4.GitLab漢化

git clone https://gitlab.com/xhang/gitlab.git ##克隆補丁倉

head -1 /opt/gitlab/version-manifest.txt ##查看當前gitlab版本並且獲取對應版本的中文補丁

 

cd gitlab

git diff v10.0.5 v10.0.5-zh >  ../v10.0.5-zh.diff #用diff將英文原版與中文版的對比生成.diff文件,版本號根據自己的修改

gitlab-ctl stop ##停止gitlab

patch -d /opt/gitlab/embedded/service/gitlab-rails -p1 < ../v10.0.5-zh.diff ##patch可能需要自行安裝:yum install -y patch

 

gitlab-ctl start

如果啓動不來:嘗試 gitlab-ctl reconfigure

 

5.完全卸載GitLab

一、停止gitlab  sudo gitlab-ctl stop 二、卸載gitlab(這塊注意了,看看是gitlab-ce版本還是gitlab-ee版本,別寫錯誤了)  sudo rpm -e gitlab-ce

三、查看gitlab進程

 ps -ef|grep gitlab      殺掉第一個守護進程(runsvdir -P /opt/gitlab/service log)      kill -9 4473      再次查看gitlab進程是否存在

四、刪除gitlab文件

        find / -name *gitlab*|xargs rm -rf      刪除所有包含gitlab的文件及目錄

        find / -name gitlab |xargs rm -rf

        刪除gitlab-ctl uninstall時自動在root下備份的配置文件(ls /root/gitlab* 看看有沒有,有也刪除) 通過以上幾步就可以徹底卸載gitlab;

如有侵權請告知;

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