前置要求

找到可以联网的机器下载依赖组件:

  1. yum -y install policycoreutils-python --downloadonly --downloaddir /home/gitlab/
  2. #打包下载好的依赖组件,上传到需要安装的服务器中,然后执行如下命令安装依赖组件
  3. rpm -Uvh *.rpm --nodeps --force

下载GitLab离线安装包:https://packages.gitlab.com/gitlab/gitlab-ce

1.开始安装

  1. rpm -ivh gitlab-ce-13.8.3-ce.0.el7.x86_64.rpm

2.编辑GitLab配置文件

  1. vi /etc/gitlab/gitlab.rb

修改如下内容,指定IP和端口,端口自己随意写一个但是不要和服务器中的其他服务冲突即可。

  1. external_url 'http://IP:PORT'

3.重置配置文件并启动GitLab

  1. gitlab-ctl reconfigure
  2. gitlab-ctl restart

4.验证

访问GitLab服务:http://IP:PORT