1.軟件準(zhǔn)備
準(zhǔn)備Centos7虛擬機(jī)
以下是百度網(wǎng)盤(pán)下載 提取碼 6666
VMware-workstation-full-15
VMware15激活碼 CG392-4PX5J-H816Z-HYZNG-PQRG2
CentOS-7-x86_64-DVD-1708.iso
2.環(huán)境準(zhǔn)備
安裝依賴(lài)
yum install -y curl policycoreutils-python openssh-server
關(guān)閉防火墻并禁用防火墻
systemctl stop firewalld
systemctl disable firewalld
3.安裝GitLab
包含兩種方式
3.1 [方式一] 設(shè)置gitlab安裝源,下載最新版本
vim /etc/yum.repos.d/gitlab-ce.repo
[gitlab-ce]
name=gitlab-ce repository
baseurl=http://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7
gpgcheck=0
enabled=1
yum install -y gitlab-ce
注意: GitLab有離線(xiàn)導(dǎo)入導(dǎo)出功能,如果兩個(gè)GitLab服務(wù)器版本不一致,容易導(dǎo)致導(dǎo)入失敗,這種情況就可以使用指定版本安裝。
3.2 [方式二]下載指定版本并安裝
yum install -y gitlab-ce-10.4.1-ce.0.el7.x86_64.rpm
安裝成功

image.png
4. GitLab啟動(dòng)及使用
修改配置
vim /etc/gitlab/gitlab.rb
# 修改訪(fǎng)問(wèn)IP
external_url 'http://192.168.227.129:8085'
啟動(dòng)
gitlab-ctl reconfigure
查看狀態(tài)
gitlab-ctl status

image.png
UI界面
http://192.168.227.129:8085
首次登陸需要設(shè)置密碼 eg: 12345678
賬號(hào)為 root

image.png

image.png
取消UI注冊(cè)

image.png

image.png
注冊(cè)用戶(hù)

image.png