gitlub私服的搭建

最近應公司需求,搭建gitlab私服,在這裏做一個簡單的記錄。

1.安裝和配置必要的依賴

sudo yum install curl policycoreutils openssh-  server openssh-clients
sudo systemctl enable sshd
sudo systemctl start sshd
sudo yum install postfix
sudo systemctl enable postfix
sudo systemctl start postfix
sudo firewall-cmd --permanent --add-service=http
sudo systemctl reload firewalld

2.使用國內鏡像安裝,新建 /etc/yum.repos.d/gitlab-ce.repo,添加以下內容,否則下載安裝太過緩慢

[gitlab-ce]
name=gitlab-ce
baseurl=http://mirrors.tuna.tsinghua.edu.cn/    gitlab-ce/yum/el6
repo_gpgcheck=0
gpgcheck=0
enabled=1
gpgkey=https://packages.gitlab.com/gpg.key

3.安裝並初始化gitlab

# 安裝 GitLab 社區版
sudo yum install gitlab-ce
# 初始化 GitLab
sudo gitlab-ctl reconfigure

最後通過ip訪問80端口即可(giutlab默認使用80端口)

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