• gitlab安装


    centos7先更新containerd
    sudo yum install containerd
    docker pull gitlab/gitlab-ce:16.3.4-ce.0

    docker-compose.yml

    
    version: '3.4'
    services:
      web:
        image: 'gitlab/gitlab-ce:16.3.4-ce.0'
        restart: always
        hostname: '192.168.227.128'
        environment:
          GITLAB_OMNIBUS_CONFIG: |
            external_url 'http://192.168.227.128:8888'
            # Add any other gitlab.rb configuration here, each on its own line
        ports:
          - '8888:8888'
          - '443:443'
          - '2222:22'
        volumes:
          - '/usr/share/local/gitlab/config:/etc/gitlab'
          - '/usr/share/local/gitlab/logs:/var/log/gitlab'
          - '/usr/share/local/gitlab/data:/var/opt/gitlab'
        shm_size: '256m'
    
    
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22

    注意,要用http方式连接,8888:8888前后两个端口需要一样。

    ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
            inet 192.168.227.128  netmask 255.255.255.0  broadcast 192.168.227.255
            inet6 fe80::20c:29ff:fedf:8b  prefixlen 64  scopeid 0x20<link>
            ether 00:0c:29:df:00:8b  txqueuelen 1000  (Ethernet)
            RX packets 48559  bytes 63651085 (60.7 MiB)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 25226  bytes 2113318 (2.0 MiB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    在浏览器中输
    入以下地址来访问GitLab界面:
    
    http://192.168.227.128:80 或者 http://localhost:80
    https://192.168.227.128:443 或者 https://localhost:443
    ssh://192.168.227.128:2222 或者 ssh://localhost:2222
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6

    重置root密码:

    1.进入容器:
    docker exec -it <容器名称或ID> /bin/bash

    2.进入GitLab Rails控制台:
    gitlab-rails console
    在这里插入图片描述

    3.重置root用户的密码:

    user = User.where(id: 1).first
    user.password = '新密码'
    user.password_confirmation = '新密码'
    user.save
    
    • 1
    • 2
    • 3
    • 4

    这个时候密码可能设置错误,因为gitlab的密码策略非常严格,包括至少一个小写字母、一个大写字母、一个数字和一个特殊字符,而且,密码包含常见的单词和字母组合也不行,而且,密码里面最好不要有!符号,可以用@代替
    如果上面的步骤失败了,可以尝试这个步骤:

    gitlab-rake "gitlab:password:reset[root, 'R0@tR00tP@ssw0rd']"
    
    gitlab-ctl restart
    
    • 1
    • 2
    • 3

    4.退出GitLab Rails控制台:
    exit
    5.退出容器终端:
    exit

    装好之后长这样:
    在这里插入图片描述

    rpm方式安装
    在这里插入图片描述
    rpm -ivh * --nodeps

  • 相关阅读:
    LRU 缓存
    【TypeScript】什么是字面量类型、类型推断、类型拓宽和类型缩小?
    Apache Paimon 使用之 Querying Tables
    Fastjson 1.2.24反序列化漏洞(Vulhub)使用方法
    有价无市是什么意思
    Listen,Attend,and Spell(LAS)——李宏毅人类语言处理学习笔记3
    [附源码]计算机毕业设计JAVA个性化新闻推荐系统
    ES集群搭建及Kibana安装
    python学习:split()分割字符串和join()合并字符串
    1965. 丢失信息的雇员
  • 原文地址:https://blog.csdn.net/jifgnie/article/details/134092834