Linux教程

[Linux]Gitlab搭建(官网版!)

本文主要是介绍[Linux]Gitlab搭建(官网版!),对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

安装所需要的环境

#sudo yum install -y curl policycoreutils-python openssh-server perl
#systemctl enable sshd //设置sshd服务自启
#systemctl start sshd //启动sshd服务
#yum install postfix //搭建邮件系统 
#systemctl enable postfix
#systemctl start postfix

添加GitLab包存储库并安装

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

下载getlab

#vim /etc/yum.repos.d/gitlab.repo //创建并编辑该文件,将以下字符填入
[gitlab-ce]
name=Gitlab CE Repository
baseurl=https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el$releasever/
gpgcheck=0
enabled=1
#yum install -y gitlab-ce //开始安装gitlab
#gitlab-ctl reconfigure //重载gitlab,可能会非常长哦!
#gitlab-ctl start //开启gitlab服务

此时即可以虚拟机ip进入搭建的gitlab了。

查看初始默认密码

#cat /etc/gitlab/initial_root_password
password后,就是密码

注意:

gitlab启动后,会使用非常多个端口。所以尽量在一个干净的服务器/虚拟机中搭建!

 

 

这篇关于[Linux]Gitlab搭建(官网版!)的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!