Centos7 安装gitlab

可以参考gitlab中文社区 的教程
centos7安装gitlab:https://www.gitlab.cc/downloads/#centos7
centos6安装gitlab:https://www.gitlab.cc/downloads/#centos6

1. 安装配置依赖项

如想使用Postfix来发送邮件,在安装期间请选择'Internet Site'. 您也可以用sendmai或者 配置SMTP服务 并 使用SMTP发送邮件.

在 Centos 6 和 7 系统上, 下面的命令将在系统防火墙里面开放HTTP和SSH端口.

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
//如何这里报错!
我们只需要去 /etc/postfix/main.cf下
对下面俩属性进行修改就行了
inet_protocols = ipv4
inet_interfaces = all

sudo firewall-cmd --permanent --add-service=http sudo systemctl reload firewalld
//如果这里报错

FirewallD is not running

或者 

Failed to start firewalld.service: Unit firewalld.service is masked.

我们这样:

systemctl unmask firewalld.service

 然后在启动fillwalld就行了  systemctl start firewalld.service

    sudo firewall-cmd --permanent --add-service=http

    sudo systemctl reload firewalld 



接着我们去下载安装包
这里去下载 https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/


wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-CE-11.5.1-ce.0.el7.x86_64.rpm

wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-11.1.4-ce.0.el7.x86_64.rpm

 下载下来后 放入/opt下

rpm -i gitlab-ce-11.1.4-ce.0.el7.x86_64.rpm 

 

接着进行安装  yum install -y policycoreutils-python

安装好后,在执行上面的安装就ok了

安装完成!

接下来就行配置就行了

gitlab-ctl reconfigure
原文地址:https://www.cnblogs.com/gaosf/p/10058501.html