CentOS7下快速搭建GitLab

我们是基于CentOS7来搭建的,所以同学们先准备好CentOS的环境,能上网就可以了.

其实安装步骤在GitLab的官网上都有很详细的介绍,同学们可以到官网按照这步骤来实现就可以了。

附上官网安装地址:https://about.gitlab.com/install/#centos-7

1.安装和配置必要的依赖

在CentOS 7 (and RedHat/Oracle/Scientific Linux 7),下面这些命令是在防火墙中开放HTTP和SSH的访问

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

接着,安装Postfix来实现邮件通知的功能,如果你想使用其他的邮件服务器,可以跳过下面这些命令,你可以再GitLab安装完毕后自行安装其他的邮件服务器.如何配置其他的邮件服务器文档地址

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

2.配置GitLab的仓库地址并下载安装包

添加仓库地址

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

安装GitLab

yum install -y gitlab-ee

正常来说,执行完这步之后,会帮我们安装和自动配置GitLab相关的信息的.如果没有启动GitLab可以再执行一下这句命令。

gitlab-ctl reconfigure

整个安装和配置的步骤时间比较长,请耐心等待。

四、界面

转载 http://www.51csdn.cn/article/152.html

猜你喜欢

转载自blog.csdn.net/qq_43599835/article/details/83714395