一.GitLab是什么
GitLab 是一个用于仓库管理系统的开源项目。使用 Git 作为代码管理工具,并在此基础上搭建起来的 web 服务。
可通过 Web 界面进行访问公开的或者私人项目。它拥有与 Github 类似的功能,能够浏览源代码,管理缺陷和注释。可以管理团队对仓库的访问,随着git的流行,越来越多的技术团队通过在自己的服务器搭建 gitlab 来实现代码的管理。
二.搭建步骤
1、安装相关依赖
yum install curl openssh-server openssh-clients postfix cronie policycoreutils-python –y
2、启动 postfix ,并设置为开机启动
systemctl start postfix
systemctl enable postfix
3、防火墙设置
systemctl start firewalld
firewall-cmd --add-service=http --permanent
firewall-cmd --reload
4、获取安装包
wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-8.6.7-ce.0.el7.x86_64.rpm
5、安装 rpm 包
rpm -ivh gitlab-ce-8.6.7-ce.0.el7.x86_64.rpm
6、修改配置文件gitlab.rb
vi /etc/gitlab/gitlab.rb
#找到 external_url
将
external_url
改为
external_url = http:// + ip + 地址
7、加载配置文件并启动
gitlab-ctl reconfigure
gitlab-ctl restart
好了,执行完以上步骤就完成了 gitlab 的搭建,接下来就尽情的玩吧!!