说明:
GitLab是GitHub的免费私有库替代方案,并且安装与配置都很方便。
本人自己搭建的时候用的是1核1GB的CentOS7.6的腾讯云服务器,最后初始化命令后一直报错失败。后来选用2核4GB的CentOS7.6的腾讯云服务器一次成功。
查阅相关资料如下:
安装完成后,系统内存图如下所示:
参考地址
安装步骤
查看操作系统:
打开安装说明地址:
安装包地址:https://packages.gitlab.com/gitlab/gitlab-ce
Install and configure the necessary dependencies
yum install -y curl policycoreutils-python openssh-server
systemctl enable sshd
systemctl start sshd
systemctl start firewalld
firewall-cmd --permanent --add-service=http
firewall-cmd --permanent --add-service=https
systemctl reload firewalld
install
curl -s https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
yum install gitlab-ce-12.3.0-ce.0.el7.x86_64
安装成功后,如下图所示:
gitlab服务操作:
初始化配置:gitlab-ctl reconfigure
启动gitlab服务:gitlab-ctl start
停止gitlab服务:gitlab-ctl stop
输入服务器IP,出现如下页面,设置密码。默认用户名为:root,设置密码为:12345678(最少八位)
设置后,重新登录。如下图所示:
配置GitLab域名
vim /etc/gitlab/gitlab.rb
编辑:external_url '你的网址'
例如:external_url 'http://192.168.1.100'
编辑完成后,再gitlab-ctl reconfigure一下,使配置生效
申明:本文只是学习过程中的一个笔记。绝大部分内容来源于网络。主要有:廖雪峰的官方网站、菜鸟教程、尚硅谷官网,在此特别感谢。转摘引用,请注明出处。尊重别人的劳动成果是一种美德。