搭建Gitlab私服(Linux版)

注意:要使用CentOS7版本安装,CentOS6版本不行。

1.官网地址

首页:https://about.gitlab.com/

安装说明:https://about.gitlab.com/installation/

2.提前下载所需rpm(文末有安装包)

yum安装gitlab-ee(或ce)时,需要联网下载几百M的安装文件,非常耗时,所以应提前把所需RPM包下载并安装好。

下载地址是:https://packages.gitlab.com/gitlab/gitlab-ce/packages/el/7/gitlab-ce-10.8.2-ce.0.el7.x86_64.rpm

下载好后上传到Linux系统,习惯上还是放在/opt目录下

3.安装

shell 复制代码
sudo rpm -ivh /opt/gitlab-ce-10.8.2-ce.0.el7.x86_64.rpm
sudo yum install -y curl policycoreutils-python openssh-server cronie

# sudo yum install lokkit
sudo lokkit -s http -s ssh
sudo yum install postfix


#yum install keyutils-libs-devel libcom_err-devel libselinux-devel  libverto-devel -y
#rpm -ivh mysql-community-libs-compat-5.7.28-1.el7.x86_64.rpm
sudo systemctl enable postfix.service
sudo chkconfig postfix on
curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
sudo EXTERNAL_URL="http://gitlab.example.com" yum -y install gitlab-ce

4.访问

  • 初始化配置

gitlab-ctl reconfigure

  • 启动Gitlab服务

gitlab-ctl start

  • 停止Gitlab服务

gitlab-ctl stop

访问Linux服务器IP地址即可,如果想访问EXTERNAL_URL指定的域名还需要配置域名服务器或本地hosts文件。

初次登录时需要为gitlab的root用户设置密码。

所需要的文件

gitlab-ce-10.8.2-ce.0.el7.x86_64.rpm

相关推荐
丘大梨13 分钟前
QT 基础聊天应用项目文档
运维·数据库·系统架构
怀刃31 分钟前
C# 内存监控怎么定位问题
运维
TPBoreas32 分钟前
Jenkins启动端口修改失败查找日志
运维·服务器·jenkins
正在努力的小河2 小时前
Linux设备树简介
linux·运维·服务器
荣光波比2 小时前
Linux(十一)——LVM磁盘配额整理
linux·运维·云计算
小晶晶京京3 小时前
day35-负载均衡
运维·网络·网络协议·学习·负载均衡
LLLLYYYRRRRRTT3 小时前
WordPress (LNMP 架构) 一键部署 Playbook
linux·架构·ansible·mariadb
轻松Ai享生活3 小时前
crash 进程分析流程图
linux
拾心214 小时前
【运维进阶】LNMP + WordPress 自动化部署实验
运维·自动化·ansible·mariadb
大路谈数字化5 小时前
Centos中内存CPU硬盘的查询
linux·运维·centos