Gitlab官網地址:https://about.gitlab.com/downloads/git
Linux系統環境: Centos7vim
gitlab服務安裝以前須要安裝一些依賴包:
yum install postfix
systemctl enable postfix
systemctl start postfix瀏覽器
1、安裝最新版本的gitlab
yum install git gitlab-ce
vim /etc/yum.repos.d/gitlab-ce.repo
[gitlab-ce]
name=gitlab-ce
baseurl=http://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7
repo_gpgcheck=0
gpgcheck=0
enabled=1
gpgkey=https://packages.gitlab.com/gpg.key
sudo gitlab-ctl reconfigure
sudo gitlab-ctl restartgitlab
2、安裝指定版本的gitlabpost
例以下載安裝10.8.2版本的gitlab
下載地址:https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-10.8.2-ce.0.el7.x86_64.rpmurl
wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-10.8.2-ce.0.el7.x86_64.rpm
rpm -i gitlab-ce-10.8.2-ce.0.el7.x86_64.rpm
sudo gitlab-ctl reconfigure
sudo gitlab-ctl startrest
3、卸載gitlab
一、# sudo gitlab-ctl stop ### 中止gitlab
二、# sudo rpm -e gitlab-ce ### 卸載gitlab
三、查看gitlab進程進程
# ps -elf | grep gitlabip
# kill -9 進程號內存
四、刪除gitlab文件
find / -name gitlab | xargs rm -rf ### 刪除全部包含gitlab的文件及目錄
4、安裝遇到的錯誤信息
瀏覽器上輸入ip地址,直接進入gitlab頁面,若是刷新不出來,報錯一、找不到服務緣由:防火牆開啓,阻擋了外面的鏈接,關閉firewall便可,命令systemctl stop firewalld 二、505錯誤內存過小,刪除一些無用的文件便可三、502錯誤端口被佔用,修改默認端口