Centos7(RHEL7)安装Gitlab

在线安装参考:https://about.gitlab.com/install/#centos-7

  1. 安装 配置必要依赖

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 systemctl reload firewalld

  1. 安装 postfix

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

  1. 获取gitlab 安装信息

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

  1. 安装 gitlab

sudo EXTERNAL_URL=“http://gitlab.example.com” yum install -y gitlab-ee

  1. 初始化 gitlab

vim /etc/gitlab/gitlab.rb

编辑:external_url ‘你的网址’

例如:external_url ‘http://192.168.1.1’

编辑完成后,再sudo gitlab-ctl reconfigure一下,使配置生效

你可能感兴趣的:(Gitlab)