官网安装地址 (https://about.gitlab.com/install/#centos-7)
1:先安装依赖
yum install -y curl policycoreutils-python openssh-server
sudo systemctl enable sshd
sudo systemctl start sshd
启动防火墙:
systemctl start firewalld.service
添加防火墙规则:
sudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --permanent --add-service=https
重新加载防火墙
sudo systemctl reload firewalld
安装 postfix(发送邮件使用)
sudo yum install postfix
sudo systemctl enable postfix
sudo systemctl start postfix
添加 gitlab 依赖,并且安装
curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.rpm.sh | sudo bash
安装客户端
yum install -y gitlab-ee
出现这个界面说明安装成功 。
gitlab-ctl reconfigure
启动gitlab 的服务器 硬件配置 最少要 2核4G,不然CPU 会 100%使用率