官網安裝地址 (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%使用率