系统学习Docker 践行DevOps理念-第12章 Docker+DevOps实战——过程和工具

1.本章简介

2.搭建GitLab服务器

参考:https://about.gitlab.com/install/

1.准备工作

以Centos为例,准备一台至少内存为4G的机器

2.安装依赖软件

sudo yum install -y curl policycoreutils-python openssh-server
sudo systemctl enable sshd
sudo systemctl start sshd

sudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --permanent --add-service=https
sudo systemctl reload firewalld

如果使用邮件服务安装下面依赖

sudo yum install postfix
sudo systemctl enable postfix
sudo systemctl start postfix

安装其他工具

sudo yum install -y git vim gcc glibc-static telnet

2.设置GitLab安装源

修改配置

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

如果是国外的话可以使用

curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash

3.安装GitLab

sudo  yum install -y gitlab-ce

安装完成后运行下面命令进行配置

sudo gitlab-ctl reconfigure

原文地址:https://www.cnblogs.com/0bug/p/13891114.html