gitlab-ce离线安装

GitLab 是一个用于仓库管理系统的开源项目,使用Git作为代码管理工具,并在此基础上搭建起来的web服务。本文基于CentOS 7.3,离线安装GitLab-CE(gitlab-ce-11.7.5-ce.0.el7.x86_64.rpm)。

1、下载离线rpm,安装

[root@localhost soft]# rpm -ivh gitlab-ce-11.7.5-ce.0.el7.x86_64.rpm 
警告:gitlab-ce-11.7.5-ce.0.el7.x86_64.rpm: 头V4 RSA/SHA1 Signature, 密钥 ID f27eab47: NOKEY
准备中...                          ################################# [100%]
正在升级/安装...
   1:gitlab-ce-11.7.5-ce.0.el7        ################################# [100%]
It looks like GitLab has not been configured yet; skipping the upgrade script.

       *.                  *.
      ***                 ***
     *****               *****
    .******             *******
    ********            ********
   ,,,,,,,,,***********,,,,,,,,,
  ,,,,,,,,,,,*********,,,,,,,,,,,
  .,,,,,,,,,,,*******,,,,,,,,,,,,
      ,,,,,,,,,*****,,,,,,,,,.
         ,,,,,,,****,,,,,,
            .,,,***,,,,
                ,*,.
  


     _______ __  __          __
    / ____(_) /_/ /   ____ _/ /_
   / / __/ / __/ /   / __ `/ __ \
  / /_/ / / /_/ /___/ /_/ / /_/ /
  \____/_/\__/_____/\__,_/_.___/
  

Thank you for installing GitLab!
GitLab was unable to detect a valid hostname for your instance.
Please configure a URL for your GitLab instance by setting `external_url`
configuration in /etc/gitlab/gitlab.rb file.
Then, you can start your GitLab instance by running the following command:
  sudo gitlab-ctl reconfigure

For a comprehensive list of configuration options please see the Omnibus GitLab readme
https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md

2、修改配置文件gitlab.rb

[root@localhost soft]# vim /etc/gitlab/gitlab.rb

   将external_url 的值改为服务器ip(192.168.12.5),默认端口80,如:
   external_url 'http://192.168.12.5'
3、重新配置

[root@localhost soft]#gitlab-ctl reconfigure

4、启动

[root@localhost soft]#gitlab-ctl start

 

Docker可以用来轻松地在容器中运行GitLab CE(Community Edition),这是一个开源的Git服务,提供了代码托管、持续集成/持续部署等功能。下面是使用Docker安装GitLab CE的基本步骤: 1. **安装Docker**: 首先确保你的系统上已经安装了Docker。如果你的系统是Linux,可以使用包管理器如apt或yum;如果是Windows或Mac,可以从Docker官网下载并安装。 2. **获取GitLab CE镜像**: 使用Docker Hub上的官方镜像,你可以运行`docker pull gitlab/gitlab-ce`来下载最新的GitLab CE镜像。 3. **运行GitLab容器**: 创建一个Docker运行命令,指定所需的端口映射和数据卷,以保存配置和数据。例如: ``` docker run -d \ --name gitlab \ -p 80:80 -p 443:443 -p 2222:22 \ --restart always \ -v /path/to/data:/var/opt/gitlab \ -v /path/to/config:/etc/gitlab \ gitlab/gitlab-ce ``` 这里 `-d` 表示后台运行,`-p` 映射端口,`--restart always` 确保容器重启时继续运行,`-v` 挂载主机目录到容器中的路径。 4. **设置环境**: 容器启动后,可能需要访问GitLab Web界面进行初始化设置,包括数据库连接信息、邮件服务器配置等。首次启动时,可能还需要完成一些基础的配置步骤。 5. **安全和认证**: 为了保护GitLab,确保配置了适当的安全措施,包括HTTPS(通常映射的443端口)和密码策略。 6. **监控和日志**: 为持久监控和问题排查,你可能需要查看Docker容器的日志和使用第三方工具对GitLab进行性能监控。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值