gitlab版本库安装

gitlab版本库安装

下地址

http 复制代码
https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/
https://packages.gitlab.com/gitlab/gitlab-ce

此处以 gitlab-ce-14.3.0为例

安装依赖

powershell 复制代码
[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
powershell 复制代码
[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]# 

安装服务

powershell 复制代码
[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]# 

安装目录

shell 复制代码
/opt/gitlab

配置文件目录

txt 复制代码
/etc/gitlab/gitlab.rb

帮助文档地址

http 复制代码
https://docs.gitlab.com/omnibus/settings/configuration.html

执行命令

sh 复制代码
## 默认系统自启动 不需要执行命令
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帮助信息

日志命令

powershell 复制代码
tail -f /var/log/gitlab/gitlab-rails/production.log #查看日志

访问地址

http 复制代码
http://211.149.160.12:9999

管理员信息

txt 复制代码
账号:root  
密码:默认情况下,Linux 软件包安装会自动为初始管理员用户账号 (root) 生成密码,并将其存储到 /etc/gitlab/initial_root_password 至少 24 小时。出于安全原因,24 小时后,此文件会被第一次 gitlab-ctl reconfigure 自动删除。 
相关推荐
草莓熊Lotso7 小时前
【C++ 基于微服务的即时通讯系统】ElasticSearch 用户数据管理实现
linux·数据库·c++·elasticsearch·微服务·架构
IT大白鼠7 小时前
eBPF 观测入门:用 bpftrace 给服务器装上“内核摄像头“
运维·服务器·ebpf
星恒随风7 小时前
MySQL 从零入门(十一):视图与用户权限管理详解
linux·服务器·数据库·笔记·mysql
分布式存储与RustFS8 小时前
Zeppelin 笔记本重启就丢:三个环境变量把 .zpln 存进 RustFS 桶
运维·云原生·开源·对象存储·分布式存储·s3·性能基准
好用斋9 小时前
内网测速 LibreSpeed:网页版 Docker 测速服务
运维·docker·容器
江华森10 小时前
从零开始:智能运维概念与Linux环境准备完全指南
linux·运维
努力写代码的熊大11 小时前
Linux 个人复盘博客 · 第六篇 Linux 进程间五种通信:匿名管道、命名管道、共享内存、消息队列与信号量
linux·经验分享·笔记
橙橙子23011 小时前
Linux----libevent
linux·运维·服务器
不积跬步无以至千里mmbb2611 小时前
Rust内核开发核心入口解析
linux·rust
如夏倾城12 小时前
五大远程桌面协议:RDP、SSH、VNC/RFB、Citrix ICA/HDX 与 VMware Blast Extreme
运维·windows·网络协议·安全·自动化·ssh·远程工作