• gitlab版本库安装


    gitlab版本库安装

    下地址

    https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/
    https://packages.gitlab.com/gitlab/gitlab-ce
    
    • 1
    • 2

    此处以 gitlab-ce-14.3.0为例

    安装依赖

    [root@ebs-139265 opt]# sudo yum install -y curl policycoreutils-python openssh-server perl
    [root@ebs-139265 opt]# sudo systemctl enable sshd
    [root@ebs-139265 opt]# sudo systemctl start sshd
    ### 没开防火墙的可以不用执行以下命令
    [root@ebs-139265 opt]# sudo firewall-cmd --permanent --add-service=http
    [root@ebs-139265 opt]# sudo firewall-cmd --permanent --add-service=https
    [root@ebs-139265 opt]# sudo systemctl reload firewalld
    
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    [root@ebs-139265 opt]# sudo yum install -y curl policycoreutils-python openssh-server perl
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
     * base: mirrors.ustc.edu.cn
     * epel: mirror.nyist.edu.cn
     * extras: mirrors.aliyun.com
     * updates: mirrors.aliyun.com
    Package curl-7.29.0-59.el7_9.1.x86_64 already installed and latest version
    Package 4:perl-5.16.3-299.el7_9.x86_64 already installed and latest version
    Resolving Dependencies
    --> Running transaction check
    ---> Package openssh-server.x86_64 0:7.4p1-22.el7_9 will be updated
    ---> Package openssh-server.x86_64 0:7.4p1-23.el7_9 will be an update
    --> Processing Dependency: openssh = 7.4p1-23.el7_9 for package: openssh-server-7.4p1-23.el7_9.x86_64
    ---> Package policycoreutils-python.x86_64 0:2.5-34.el7 will be installed
    --> Processing Dependency: setools-libs >= 3.3.8-4 for package: policycoreutils-python-2.5-34.el7.x86_64
    --> Processing Dependency: libsemanage-python >= 2.5-14 for package: policycoreutils-python-2.5-34.el7.x86_64
    --> Processing Dependency: audit-libs-python >= 2.1.3-4 for package: policycoreutils-python-2.5-34.el7.x86_64
    --> Processing Dependency: python-IPy for package: policycoreutils-python-2.5-34.el7.x86_64
    --> Processing Dependency: libqpol.so.1(VERS_1.4)(64bit) for package: policycoreutils-python-2.5-34.el7.x86_64
    --> Processing Dependency: libqpol.so.1(VERS_1.2)(64bit) for package: policycoreutils-python-2.5-34.el7.x86_64
    --> Processing Dependency: libcgroup for package: policycoreutils-python-2.5-34.el7.x86_64
    --> Processing Dependency: libapol.so.4(VERS_4.0)(64bit) for package: policycoreutils-python-2.5-34.el7.x86_64
    --> Processing Dependency: checkpolicy for package: policycoreutils-python-2.5-34.el7.x86_64
    --> Processing Dependency: libqpol.so.1()(64bit) for package: policycoreutils-python-2.5-34.el7.x86_64
    --> Processing Dependency: libapol.so.4()(64bit) for package: policycoreutils-python-2.5-34.el7.x86_64
    --> Running transaction check
    ---> Package audit-libs-python.x86_64 0:2.8.5-4.el7 will be installed
    ---> Package checkpolicy.x86_64 0:2.5-8.el7 will be installed
    ---> Package libcgroup.x86_64 0:0.41-21.el7 will be installed
    ---> Package libsemanage-python.x86_64 0:2.5-14.el7 will be installed
    ---> Package openssh.x86_64 0:7.4p1-22.el7_9 will be updated
    --> Processing Dependency: openssh = 7.4p1-22.el7_9 for package: openssh-clients-7.4p1-22.el7_9.x86_64
    ---> Package openssh.x86_64 0:7.4p1-23.el7_9 will be an update
    ---> Package python-IPy.noarch 0:0.75-6.el7 will be installed
    ---> Package setools-libs.x86_64 0:3.3.8-4.el7 will be installed
    --> Running transaction check
    ---> Package openssh-clients.x86_64 0:7.4p1-22.el7_9 will be updated
    ---> Package openssh-clients.x86_64 0:7.4p1-23.el7_9 will be an update
    --> Finished Dependency Resolution
    
    Dependencies Resolved
    
    ==================================================================================================================================================================================================================================
     Package                                                         Arch                                            Version                                                   Repository                                        Size
    ==================================================================================================================================================================================================================================
    Installing:
     policycoreutils-python                                          x86_64                                          2.5-34.el7                                                base                                             457 k
    Updating:
     openssh-server                                                  x86_64                                          7.4p1-23.el7_9                                            updates                                          459 k
    Installing for dependencies:
     audit-libs-python                                               x86_64                                          2.8.5-4.el7                                               base                                              76 k
     checkpolicy                                                     x86_64                                          2.5-8.el7                                                 base                                             295 k
     libcgroup                                                       x86_64                                          0.41-21.el7                                               base                                              66 k
     libsemanage-python                                              x86_64                                          2.5-14.el7                                                base                                             113 k
     python-IPy                                                      noarch                                          0.75-6.el7                                                base                                              32 k
     setools-libs                                                    x86_64                                          3.3.8-4.el7                                               base                                             620 k
    Updating for dependencies:
     openssh                                                         x86_64                                          7.4p1-23.el7_9                                            updates                                          510 k
     openssh-clients                                                 x86_64                                          7.4p1-23.el7_9                                            updates                                          655 k
    
    Transaction Summary
    ==================================================================================================================================================================================================================================
    Install  1 Package (+6 Dependent packages)
    Upgrade  1 Package (+2 Dependent packages)
    
    Total download size: 3.2 M
    Downloading packages:
    Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
    (1/10): libcgroup-0.41-21.el7.x86_64.rpm                                                                                                                                                                   |  66 kB  00:00:01     
    (2/10): checkpolicy-2.5-8.el7.x86_64.rpm                                                                                                                                                                   | 295 kB  00:00:01     
    (3/10): audit-libs-python-2.8.5-4.el7.x86_64.rpm                                                                                                                                                           |  76 kB  00:00:01     
    (4/10): libsemanage-python-2.5-14.el7.x86_64.rpm                                                                                                                                                           | 113 kB  00:00:01     
    (5/10): openssh-server-7.4p1-23.el7_9.x86_64.rpm                                                                                                                                                           | 459 kB  00:00:00     
    (6/10): python-IPy-0.75-6.el7.noarch.rpm                                                                                                                                                                   |  32 kB  00:00:00     
    (7/10): policycoreutils-python-2.5-34.el7.x86_64.rpm                                                                                                                                                       | 457 kB  00:00:00     
    (8/10): openssh-7.4p1-23.el7_9.x86_64.rpm                                                                                                                                                                  | 510 kB  00:00:01     
    (9/10): setools-libs-3.3.8-4.el7.x86_64.rpm                                                                                                                                                                | 620 kB  00:00:00     
    (10/10): openssh-clients-7.4p1-23.el7_9.x86_64.rpm                                                                                                                                                         | 655 kB  00:00:00     
    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Total                                                                                                                                                                                             1.7 MB/s | 3.2 MB  00:00:01     
    Running transaction check
    Running transaction test
    Transaction test succeeded
    Running transaction
      Updating   : openssh-7.4p1-23.el7_9.x86_64   1/13 
      Installing : setools-libs-3.3.8-4.el7.x86_64    2/13 
      Installing : libcgroup-0.41-21.el7.x86_64   3/13 
      Installing : audit-libs-python-2.8.5-4.el7.x86_64  4/13 
      Installing : python-IPy-0.75-6.el7.noarch      5/13 
      Installing : libsemanage-python-2.5-14.el7.x86_64   6/13 
      Installing : checkpolicy-2.5-8.el7.x86_64    7/13 
      Installing : policycoreutils-python-2.5-34.el7.x86_64   8/13 
      Updating   : openssh-clients-7.4p1-23.el7_9.x86_64   9/13 
      Updating   : openssh-server-7.4p1-23.el7_9.x86_64   10/13 
      Cleanup    : openssh-server-7.4p1-22.el7_9.x86_64    11/13 
      Cleanup    : openssh-clients-7.4p1-22.el7_9.x86_64   12/13 
      Cleanup    : openssh-7.4p1-22.el7_9.x86_64      13/13 
      Verifying  : checkpolicy-2.5-8.el7.x86_64    1/13 
      Verifying  : openssh-7.4p1-23.el7_9.x86_64     2/13 
      Verifying  : libsemanage-python-2.5-14.el7.x86_64    3/13 
      Verifying  : python-IPy-0.75-6.el7.noarch        4/13 
      Verifying  : openssh-clients-7.4p1-23.el7_9.x86_64  5/13 
      Verifying  : openssh-server-7.4p1-23.el7_9.x86_64    6/13 
      Verifying  : policycoreutils-python-2.5-34.el7.x86_64   7/13 
      Verifying  : audit-libs-python-2.8.5-4.el7.x86_64      8/13 
      Verifying  : libcgroup-0.41-21.el7.x86_64      9/13 
      Verifying  : setools-libs-3.3.8-4.el7.x86_64   10/13 
      Verifying  : openssh-server-7.4p1-22.el7_9.x86_64     11/13 
      Verifying  : openssh-clients-7.4p1-22.el7_9.x86_64   12/13 
      Verifying  : openssh-7.4p1-22.el7_9.x86_64       13/13 
    
    Installed:
      policycoreutils-python.x86_64 0:2.5-34.el7      
    
    Dependency Installed:
      audit-libs-python.x86_64 0:2.8.5-4.el7    checkpolicy.x86_64 0:2.5-8.el7    libcgroup.x86_64 0:0.41-21.el7    libsemanage-python.x86_64 0:2.5-14.el7    python-IPy.noarch 0:0.75-6.el7    setools-libs.x86_64 0:3.3.8-4.el7   
    
    Updated:
      openssh-server.x86_64 0:7.4p1-23.el7_9             
    
    Dependency Updated:
      openssh.x86_64 0:7.4p1-23.el7_9                                                                             openssh-clients.x86_64 0:7.4p1-23.el7_9  
    Complete!
    [root@ebs-139265 opt]# sudo systemctl enable sshd
    [root@ebs-139265 opt]# sudo systemctl start sshd
    [root@ebs-139265 opt]# 
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45
    • 46
    • 47
    • 48
    • 49
    • 50
    • 51
    • 52
    • 53
    • 54
    • 55
    • 56
    • 57
    • 58
    • 59
    • 60
    • 61
    • 62
    • 63
    • 64
    • 65
    • 66
    • 67
    • 68
    • 69
    • 70
    • 71
    • 72
    • 73
    • 74
    • 75
    • 76
    • 77
    • 78
    • 79
    • 80
    • 81
    • 82
    • 83
    • 84
    • 85
    • 86
    • 87
    • 88
    • 89
    • 90
    • 91
    • 92
    • 93
    • 94
    • 95
    • 96
    • 97
    • 98
    • 99
    • 100
    • 101
    • 102
    • 103
    • 104
    • 105
    • 106
    • 107
    • 108
    • 109
    • 110
    • 111
    • 112
    • 113
    • 114
    • 115
    • 116
    • 117
    • 118
    • 119
    • 120
    • 121
    • 122
    • 123
    • 124
    • 125
    • 126
    • 127

    安装服务

    [root@ebs-139265 opt]# rpm -ivh gitlab-ce-14.3.0-ce.0.el7.x86_64.rpm 
    warning: gitlab-ce-14.3.0-ce.0.el7.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID f27eab47: NOKEY
    Preparing...                          ################################# [100%]
    Updating / installing...
       1:gitlab-ce-14.3.0-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
    
    Help us improve the installation experience, let us know how we did with a 1 minute survey:
    https://gitlab.fra1.qualtrics.com/jfe/form/SV_6kVqZANThUQ1bZb?installation=omnibus&release=14-3
    
    [root@ebs-139265 opt]# 
    
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44

    安装目录

    /opt/gitlab
    
    • 1

    配置文件目录

    /etc/gitlab/gitlab.rb
    
    • 1

    帮助文档地址

    https://docs.gitlab.com/omnibus/settings/configuration.html
    
    • 1

    执行命令

    ## 默认系统自启动 不需要执行命令
    gitlab-ctl start #启动全部服务
    gitlab-ctl restart#重启全部服务
    gitlab-ctl stop #停止全部服务
    gitlab-ctl restart nginx #重启单个服务,如重启nginx
    gitlab-ctl status #查看服务状态
    gitlab-ctl reconfigure #使配置文件生效
    gitlab-ctl show-config #验证配置文件
    gitlab-ctl uninstall #删除gitlab(保留数据)
    gitlab-ctl cleanse #删除所有数据,从新开始
    gitlab-ctl tail <service name>查看服务的日志
    gitlab-ctl tail nginx  #如查看gitlab下nginx日志
    gitlab-rails console  #进入控制台
    gitlab-ctl help                  #查看gitlab帮助信息
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14

    日志命令

    tail -f /var/log/gitlab/gitlab-rails/production.log #查看日志
    
    • 1

    访问地址

    http://211.149.160.12:9999
    
    • 1

    管理员信息

    账号:root  
    密码:默认情况下,Linux 软件包安装会自动为初始管理员用户账号 (root) 生成密码,并将其存储到 /etc/gitlab/initial_root_password 至少 24 小时。出于安全原因,24 小时后,此文件会被第一次 gitlab-ctl reconfigure 自动删除。 
    
    • 1
    • 2
  • 相关阅读:
    SSM+心理测验系统 毕业设计-附源码211710
    Python读取NC格式数据绘制风场和涡度图
    面试官:微服务通讯方式有哪些?
    STM32F1与STM32CubeIDE编程实例-热敏传感器驱动
    Glide 源码解析与原理总结——Glide.with
    2022华数杯C题:插层熔喷非织造材料的性能控制研究
    划片机:半导体生产的必备设备
    virtualbox 命令行模式创建虚拟机
    前端各种布局
    Linux系统Shell脚本第三章:for、while循环及脚本实操
  • 原文地址:https://blog.csdn.net/u010416069/article/details/133844376