CentOS 7搭建GitLab

  
  

<强>简介:
<强> GitLab是一个用于仓库管理系统的开源项目,使用Git作为代码管理工具,并在此基础上搭建起来的web服务。安装方法是参考GitLab在GitHub上的Wiki页面。

  <人力资源/>   

<>强特点:
1. web框架使用RubyonRails。
2。基于麻省理工学院代码发布协议。
3。需要gitolite协同工作

     

<强>一、安装依赖

  
  

1。安装ssh

     
 <代码> sudo使用yum安装- y curl policycoreutils-pythonopenssh-server  
  
  

2。将SSH服务设置成开机自启动,启动SSH服务

     
 <代码> sudo systemctl启用sshd
  sudo systemctl启动sshd  
  
  

3。安装后缀

     
 <代码> sudo yum安装后缀 
  
  

4。将后缀服务设置成开机自启动,并启动

     
 <代码> sudo systemctl启用后缀
  sudo systemctl开始后缀 
  
  

5。安装policycoreutils-python

     
 <代码> yum安装policycoreutils-python  
  

<强>二、安装gitlab

  
  

1。gitlab rpm包下载
centos 6系统的下载地址:https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el6
centos 7系统的下载地址:https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7

     
 <代码> wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-11.11.5-ce.0.el7.x86_64.rpm  
  
  

2。gitlab rpm包安装

     
 <代码> rpm - gitlab-ce-11.11.5-ce.0.el7.x86_64.rpm  
  

<强>三,修改gitlab配置文件指定服务器ip和自定义端口

  
  

1。修改等/gitlab gitlab.rb文件中external_url的值,分配一个不会冲突的端口号,默认80

  

2。重置并启动GitLab

     
 <代码> gitlab-ctl重新配置
  gitlab-ctl重启 

CentOS 7搭建GitLab