WSL2 安装 GitLab


WSL2 安装 GitLab


正文

win10启用WSL2,安装的centos7.8:

[root@BaiYang-PC ~]# cat /etc/redhat-release
CentOS Linux release 7.8.2003 (Core)

我们接下来安装GitLab。

检查内存,安装使用GitLab需要至少4GB可用内存(RAM + Swap)! 由于操作系统和其他正在运行的应用也会使用内存, 所以安装GitLab前一定要注意当前服务器至少有4GB的可用内存。少于4GB内存会出现各种诡异的问题, 而且在使用过程中也经常会出现500错误。

查看内存:

[root@BaiYang-PC src]# free -m
              total        used        free      shared  buff/cache   available
Mem:          19103         101       17756          10        1245       18705
Swap:          5120           0        5120
[root@BaiYang-PC src]#

rpm方式安装

切换到目录:

cd /usr/local/src

下载最新版:

wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-14.7.2-ce.0.el7.x86_64.rpm --no-check-certificate

下载需要些时间,输出:

[root@BaiYang-PC src]# wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-14.7.2-ce.0.el7.x86_64.rpm
--2022-02-14 16:05:49--  https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-14.7.2-ce.0.el7.x86_64.rpm
Resolving mirrors.tuna.tsinghua.edu.cn (mirrors.tuna.tsinghua.edu.cn)... 101.6.15.130, 2402:f000:1:400::2
Connecting to mirrors.tuna.tsinghua.edu.cn (mirrors.tuna.tsinghua.edu.cn)|101.6.15.130|:443... connected.
ERROR: cannot verify mirrors.tuna.tsinghua.edu.cn's certificate, issued by ‘/C=US/O=Let's Encrypt/CN=R3’:
  Issued certificate has expired.
To connect to mirrors.tuna.tsinghua.edu.cn insecurely, use `--no-check-certificate'.
[root@BaiYang-PC src]#
[root@BaiYang-PC src]#
[root@BaiYang-PC src]#
[root@BaiYang-PC src]# wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-14.7.2-ce.0.el7.x86_64.rpm --no-check-certificate
--2022-02-14 16:06:44--  https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-14.7.2-ce.0.el7.x86_64.rpm
Resolving mirrors.tuna.tsinghua.edu.cn (mirrors.tuna.tsinghua.edu.cn)... 101.6.15.130, 2402:f000:1:400::2
Connecting to mirrors.tuna.tsinghua.edu.cn (mirrors.tuna.tsinghua.edu.cn)|101.6.15.130|:443... connected.
WARNING: cannot verify mirrors.tuna.tsinghua.edu.cn's certificate, issued by ‘/C=US/O=Let's Encrypt/CN=R3’:
  Issued certificate has expired.
HTTP request sent, awaiting response... 200 OK
Length: 983726054 (938M) [application/x-redhat-package-manager]
Saving to: ‘gitlab-ce-14.7.2-ce.0.el7.x86_64.rpm’

100%[=============================================================================>] 983,726,054  903KB/s   in 26m 25s

2022-02-14 16:33:11 (606 KB/s) - ‘gitlab-ce-14.7.2-ce.0.el7.x86_64.rpm’ saved [983726054/983726054]

[root@BaiYang-PC src]#
[root@BaiYang-PC src]#
[root@BaiYang-PC src]# ls -l
total 972864
-rw-r--r--  1 root root     57721 Dec 23 16:16 composer-setup.php
-rw-r--r--  1 root root 983726054 Feb  9 04:17 gitlab-ce-14.7.2-ce.0.el7.x86_64.rpm
-rw-r--r--  1 root root      7076 Nov  4 18:25 mysql80-community-release-el7-4.noarch.rpm
-rw-r--r--  1 root root      6140 Nov 12  2015 mysql-community-release-el7-5.noarch.rpm
drwxr-xr-x 18 root root      4096 Dec 14 15:18 protobuf-3.11.2
-rw-r--r--  1 root root   9533148 Dec 14  2019 protobuf-all-3.11.2.zip
drwxr-xr-x 15 root root      4096 Dec 24 14:14 swoole-src-4.8.4
-rwxrwxrwx  1 root root   2855470 Dec 24 13:54 swoole-src-4.8.4.zip
[root@BaiYang-PC src]#

安装:

rpm -i gitlab-ce-14.7.2-ce.0.el7.x86_64.rpm --force --nodeps

输出:

[root@BaiYang-PC src]# rpm -i gitlab-ce-14.7.2-ce.0.el7.x86_64.rpm
warning: gitlab-ce-14.7.2-ce.0.el7.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID f27eab47: NOKEY
error: Failed dependencies:
        openssh-server is needed by gitlab-ce-14.7.2-ce.0.el7.x86_64
[root@BaiYang-PC src]#
[root@BaiYang-PC src]# rpm -i gitlab-ce-14.7.2-ce.0.el7.x86_64.rpm --force --nodeps
warning: gitlab-ce-14.7.2-ce.0.el7.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID f27eab47: NOKEY
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-7

[root@BaiYang-PC src]#

修改gitlab配置文件指定服务器ip和自定义端口:

vi /etc/gitlab/gitlab.rb

external_url 'http://gitlab.example.com' 修改为 external_url 'http://localhost:8080'

修改配置后的编译初始化:

gitlab-ctl reconfigure

过程报错了:

Running handlers:
There was an error running gitlab-ctl reconfigure:

execute[init q] (package::runit_sysvinit line 28) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of init q ----
STDOUT:
STDERR: Couldn't find an alternative telinit implementation to spawn.
---- End output of init q ----
Ran init q returned 1

搜索了一下解决办法,没查到。可能是依赖问题,卸载了吧。

[root@BaiYang-PC src]# rpm -qa | grep gitlab
gitlab-ce-14.7.2-ce.0.el7.x86_64
[root@BaiYang-PC src]#
[root@BaiYang-PC src]# rpm -e gitlab
error: package gitlab is not installed
[root@BaiYang-PC src]#
[root@BaiYang-PC src]# rpm -e gitlab-ce
[root@BaiYang-PC src]#
[root@BaiYang-PC src]# rpm -qa | grep gitlab
[root@BaiYang-PC src]#

删除配置文件:

[root@BaiYang-PC src]# rm -rf /etc/gitlab
[root@BaiYang-PC src]#

gitlab其他命令:

重启:
> gitlab-ctl restart

停止:
> gitlab-ctl stop

yum方式安装

配置yum源:

vi /etc/yum.repos.d/gitlab-ce.repo

写入:

[gitlab-ce]
name=Gitlab CE Repository
baseurl=https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el$releasever/
gpgcheck=0
enabled=1

更新本地yum缓存:

sudo yum makecache

输出:

[root@BaiYang-PC src]# yum makecache
Loaded plugins: fastestmirror, ovl, product-id, search-disabled-repos, subscription-manager

This system is not registered with an entitlement server. You can use subscription-manager to register.

Loading mirror speeds from cached hostfile
epel/x86_64/metalink                                                                            | 5.5 kB  00:00:00
 * base: mirrors.aliyun.com
 * epel: mirrors.ustc.edu.cn
 * extras: mirrors.aliyun.com
 * remi-safe: ftp.riken.jp
 * updates: mirrors.aliyun.com
base                                                                                            | 3.6 kB  00:00:00
epel                                                                                            | 4.7 kB  00:00:00
extras                                                                                          | 2.9 kB  00:00:00
gitlab-ce                                                                                       | 2.9 kB  00:00:00
mysql-connectors-community                                                                      | 2.6 kB  00:00:00
mysql-tools-community                                                                           | 2.6 kB  00:00:00
mysql80-community                                                                               | 2.6 kB  00:00:00
nginx-stable                                                                                    | 2.9 kB  00:00:00
remi-safe                                                                                       | 3.0 kB  00:00:00
updates                                                                                         | 2.9 kB  00:00:00
epel/x86_64/primary_db         FAILED
http://ftp.iij.ad.jp/pub/linux/Fedora/epel/7/x86_64/repodata/0dc97928814438c4ee2e07615b7e5fb841452ad4d560f63c6ce32ea58dfbe33b-primary.sqlite.bz2: [Errno 14] HTTP Error 404 - Not Found
Trying other mirror.
To address this issue please refer to the below wiki article

https://wiki.centos.org/yum-errors

If above article doesn't help to resolve this issue please use https://bugs.centos.org/.

epel/x86_64/updateinfo         FAILED
https://hkg.mirror.rackspace.com/epel/7/x86_64/repodata/98ea4a72caa3d5f87185f8ec3fd3680450bcb00af6248efc1c96093aa58c4429-updateinfo.xml.bz2: [Errno 14] HTTPS Error 404 - Not Found
Trying other mirror.
epel/x86_64/other_db           FAILED                                                ]  0.0 B/s |    0 B  --:--:-- ETA
http://ftp.jaist.ac.jp/pub/Linux/Fedora/epel/7/x86_64/repodata/76951de5b0240f2f4fa30a691c44cecfa4aa21ff3d3a7d7548121e809cc1f862-other.sqlite.bz2: [Errno 14] HTTP Error 404 - Not Found
Trying other mirror.
(1/25): extras/7/x86_64/filelists_db                                                            | 259 kB  00:00:00
extras/7/x86_64/other_db       FAILED
http://mirrors.cloud.aliyuncs.com/centos/7/extras/x86_64/repodata/df71c9c398cab0503d8d69622a9243754dacee42fb2a61709acc3d19eb997655-other.sqlite.bz2: [Errno 14] curl#6 - "Could not resolve host: mirrors.cloud.aliyuncs.com; Unknown error"
Trying other mirror.
(2/25): epel/x86_64/prestodelta                                                                 | 1.0 kB  00:00:02
(3/25): gitlab-ce/7/primary_db                                                                  | 5.0 MB  00:00:07
(4/25): mysql-connectors-community/x86_64/other_db                                              |  25 kB  00:00:00
(5/25): mysql-connectors-community/x86_64/filelists_db                                          | 127 kB  00:00:00
(6/25): gitlab-ce/7/other_db                                                                    |  44 kB  00:00:00
(7/25): mysql-tools-community/x86_64/other_db                                                   |  21 kB  00:00:00
(8/25): mysql80-community/x86_64/other_db                                                       |  53 kB  00:00:00
(9/25): mysql-tools-community/x86_64/filelists_db                                               | 447 kB  00:00:01
(10/25): nginx-stable/7/x86_64/filelists_db                                                     |  95 kB  00:00:01
(11/25): mysql80-community/x86_64/filelists_db                                                  | 1.8 MB  00:00:03
(12/25): nginx-stable/7/x86_64/primary_db                                                       |  71 kB  00:00:02
(13/25): nginx-stable/7/x86_64/other_db                                                         |  43 kB  00:00:02
(14/25): remi-safe/other_db                                                                     | 562 kB  00:00:03
(15/25): updates/7/x86_64/filelists_db                                                          | 7.4 MB  00:00:35
(16/25): remi-safe/filelists_db                                                                 | 1.6 MB  00:00:46
(17/25): updates/7/x86_64/primary_db                                                            |  13 MB  00:00:22
(18/25): remi-safe/primary_db                                                                   | 2.1 MB  00:01:11
epel/x86_64/updateinfo         FAILED                                                ] 597 kB/s |  56 MB  00:11:42 ETA
https://mirror.sabay.com.kh/epel/7/x86_64/repodata/98ea4a72caa3d5f87185f8ec3fd3680450bcb00af6248efc1c96093aa58c4429-updateinfo.xml.bz2: [Errno 14] HTTPS Error 404 - Not Found
Trying other mirror.
updates/7/x86_64/other_db      FAILED                                                ] 586 kB/s |  58 MB  00:11:52 ETA
http://mirrors.aliyuncs.com/centos/7/updates/x86_64/repodata/0461cb403ce1b71dd678fa8d7de465ee06b55b76ab50648814bf8c7f5baa5f54-other.sqlite.bz2: [Errno 12] Timeout on http://mirrors.aliyuncs.com/centos/7/updates/x86_64/repodata/0461cb403ce1b71dd678fa8d7de465ee06b55b76ab50648814bf8c7f5baa5f54-other.sqlite.bz2: (28, 'Connection timed out after 30001 milliseconds')
Trying other mirror.
(19/25): extras/7/x86_64/other_db                                                               | 145 kB  00:00:00
epel/x86_64/updateinfo         FAILED                                                ] 639 kB/s |  59 MB  00:10:52 ETA
http://mirror2.totbb.net/epel/7/x86_64/repodata/98ea4a72caa3d5f87185f8ec3fd3680450bcb00af6248efc1c96093aa58c4429-updateinfo.xml.bz2: [Errno 14] HTTP Error 404 - Not Found
Trying other mirror.
(20/25): updates/7/x86_64/other_db                                                              | 960 kB  00:00:00
(21/25): epel/x86_64/filelists_db                                                               |  12 MB  00:01:31
epel/x86_64/updateinfo         FAILED                                                ] 440 kB/s |  68 MB  00:15:25 ETA
https://mirrors.thzhost.com/epel/7/x86_64/repodata/98ea4a72caa3d5f87185f8ec3fd3680450bcb00af6248efc1c96093aa58c4429-updateinfo.xml.bz2: [Errno 14] curl#7 - "Failed to connect to 2401:5700:503:122::1: Network is unreachable"
Trying other mirror.
epel/x86_64/updateinfo         FAILED                                                ] 436 kB/s |  73 MB  00:15:21 ETA
https://mirror.lzu.edu.cn/epel/7/x86_64/repodata/98ea4a72caa3d5f87185f8ec3fd3680450bcb00af6248efc1c96093aa58c4429-updateinfo.xml.bz2: [Errno 14] curl#7 - "Failed to connect to 2001:da8:c000::160: Network is unreachable"
Trying other mirror.
epel/x86_64/updateinfo         FAILED                                                ] 448 kB/s |  73 MB  00:14:57 ETA
http://ftp.riken.jp/Linux/fedora/epel/7/x86_64/repodata/98ea4a72caa3d5f87185f8ec3fd3680450bcb00af6248efc1c96093aa58c4429-updateinfo.xml.bz2: [Errno 14] HTTP Error 404 - Not Found
Trying other mirror.
epel/x86_64/updateinfo         FAILED                                                ] 289 kB/s |  84 MB  00:22:28 ETA
http://epel.mirror.angkasa.id/pub/epel/7/x86_64/repodata/98ea4a72caa3d5f87185f8ec3fd3680450bcb00af6248efc1c96093aa58c4429-updateinfo.xml.bz2: [Errno 12] Timeout on http://epel.mirror.angkasa.id/pub/epel/7/x86_64/repodata/98ea4a72caa3d5f87185f8ec3fd3680450bcb00af6248efc1c96093aa58c4429-updateinfo.xml.bz2: (28, 'Connection timed out after 30000 milliseconds')
Trying other mirror.
epel/x86_64/primary_db         FAILED                                                ] 300 kB/s |  85 MB  00:21:39 ETA
http://hk.mirrors.thegigabit.com/epel/7/x86_64/repodata/0dc97928814438c4ee2e07615b7e5fb841452ad4d560f63c6ce32ea58dfbe33b-primary.sqlite.bz2: [Errno 12] Timeout on http://hk.mirrors.thegigabit.com/epel/7/x86_64/repodata/0dc97928814438c4ee2e07615b7e5fb841452ad4d560f63c6ce32ea58dfbe33b-primary.sqlite.bz2: (28, 'Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds')
Trying other mirror.
epel/x86_64/updateinfo         FAILED                                                ] 368 kB/s | 145 MB  00:14:51 ETA
http://hk.mirrors.thegigabit.com/epel/7/x86_64/repodata/98ea4a72caa3d5f87185f8ec3fd3680450bcb00af6248efc1c96093aa58c4429-updateinfo.xml.bz2: [Errno 12] Timeout on http://hk.mirrors.thegigabit.com/epel/7/x86_64/repodata/98ea4a72caa3d5f87185f8ec3fd3680450bcb00af6248efc1c96093aa58c4429-updateinfo.xml.bz2: (28, 'Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds')
Trying other mirror.
(22/25): epel/x86_64/other_db                                                                   | 3.4 MB  00:07:30
(23/25): epel/x86_64/updateinfo                                                                 | 1.1 MB  00:00:03
(24/25): gitlab-ce/7/filelists_db                                                               | 408 MB  00:14:27
(25/25): epel/x86_64/primary_db                                                                 | 7.0 MB  00:16:24
Metadata Cache Created
[root@BaiYang-PC src]#
[root@BaiYang-PC src]#

清理缓存:

sudo yum clean all

输出:

[root@BaiYang-PC src]# yum clean all
Loaded plugins: fastestmirror, ovl, product-id, search-disabled-repos, subscription-manager

This system is not registered with an entitlement server. You can use subscription-manager to register.

Cleaning repos: base epel extras gitlab-ce mysql-connectors-community mysql-tools-community
              : mysql80-community nginx-stable remi-safe updates
Cleaning up list of fastest mirrors
Other repos take up 3.8 M of disk space (use --verbose for details)
[root@BaiYang-PC src]#

安装GitLab社区版(自动安装最新版):

sudo yum install -y gitlab-ce

或者安装指定版本:

sudo yum install -y gitlab-ce-x.x.x

输出:

[root@BaiYang-PC src]# yum install -y gitlab-ce
Loaded plugins: fastestmirror, ovl, product-id, search-disabled-repos, subscription-manager

This system is not registered with an entitlement server. You can use subscription-manager to register.

Determining fastest mirrors
epel/x86_64/metalink                                                          | 6.0 kB  00:00:00
 * base: mirrors.aliyun.com
 * epel: mirrors.njupt.edu.cn
 * extras: mirrors.aliyun.com
 * remi-safe: ftp.riken.jp
 * updates: mirrors.aliyun.com
base                                                                          | 3.6 kB  00:00:00
epel                                                                          | 4.7 kB  00:00:00
extras                                                                        | 2.9 kB  00:00:00
gitlab-ce                                                                     | 2.9 kB  00:00:00
mysql-connectors-community                                                    | 2.6 kB  00:00:00
mysql-tools-community                                                         | 2.6 kB  00:00:00
mysql80-community                                                             | 2.6 kB  00:00:00
nginx-stable                                                                  | 2.9 kB  00:00:00
remi-safe                                                                     | 3.0 kB  00:00:00
updates                                                                       | 2.9 kB  00:00:00
(1/13): base/7/x86_64/group_gz                                                | 153 kB  00:00:00
(2/13): epel/x86_64/group_gz                                                  |  96 kB  00:00:00
(3/13): epel/x86_64/updateinfo                                                | 1.0 MB  00:00:00
(4/13): mysql-connectors-community/x86_64/primary_db                          |  90 kB  00:00:01
(5/13): mysql-tools-community/x86_64/primary_db                               |  94 kB  00:00:01
(6/13): mysql80-community/x86_64/primary_db                                   | 198 kB  00:00:01
(7/13): epel/x86_64/primary_db                                                | 7.0 MB  00:00:07
(8/13): extras/7/x86_64/primary_db                                            | 243 kB  00:00:10
(9/13): nginx-stable/7/x86_64/primary_db                                      |  71 kB  00:00:08
(10/13): updates/7/x86_64/primary_db                                          |  13 MB  00:00:16
(11/13): gitlab-ce/7/primary_db                                               | 5.0 MB  00:00:29
(12/13): base/7/x86_64/primary_db                                             | 6.1 MB  00:00:33
(13/13): remi-safe/primary_db                                                 | 2.1 MB  00:00:40
Resolving Dependencies
--> Running transaction check
---> Package gitlab-ce.x86_64 0:14.7.2-ce.0.el7 will be installed
--> Processing Dependency: openssh-server for package: gitlab-ce-14.7.2-ce.0.el7.x86_64
--> Running transaction check
---> Package openssh-server.x86_64 0:7.4p1-22.el7_9 will be installed
--> Processing Dependency: libwrap.so.0()(64bit) for package: openssh-server-7.4p1-22.el7_9.x86_64
--> Running transaction check
---> Package tcp_wrappers-libs.x86_64 0:7.6-77.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=====================================================================================================
 Package                     Arch             Version                      Repository           Size
=====================================================================================================
Installing:
 gitlab-ce                   x86_64           14.7.2-ce.0.el7              gitlab-ce           938 M
Installing for dependencies:
 openssh-server              x86_64           7.4p1-22.el7_9               updates             459 k
 tcp_wrappers-libs           x86_64           7.6-77.el7                   base                 66 k

Transaction Summary
=====================================================================================================
Install  1 Package (+2 Dependent packages)

Total download size: 939 M
Installed size: 939 M
Downloading packages:
(1/3): openssh-server-7.4p1-22.el7_9.x86_64.rpm                               | 459 kB  00:00:00
(2/3): tcp_wrappers-libs-7.6-77.el7.x86_64.rpm                                |  66 kB  00:00:00
(3/3): gitlab-ce-14.7.2-ce.0.el7.x8 83% [=====================-    ] 638 kB/s | 786 MB  00:04:05 ETA
(3/3): gitlab-ce-14.7.2-ce.0.el7.x86_64.rpm                                   | 938 MB  00:23:33
-----------------------------------------------------------------------------------------------------
Total                                                                680 kB/s | 939 MB  00:23:33
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : tcp_wrappers-libs-7.6-77.el7.x86_64                                               1/3
/sbin/ldconfig: /usr/lib/wsl/lib/libcuda.so.1 is not a symbolic link

  Installing : openssh-server-7.4p1-22.el7_9.x86_64                                              2/3
  Installing : gitlab-ce-14.7.2-ce.0.el7.x86_64                                                  3/3







// 页面停在这了,按 ctrl + c 弹出下面的信息
^C/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/omnibus-ctl-0.6.0/lib/omnibus-ctl.rb:238:in `system': Interrupt
        from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/omnibus-ctl-0.6.0/lib/omnibus-ctl.rb:238:in `run_command'
        from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/omnibus-ctl-0.6.0/lib/omnibus-ctl.rb:503:in `run_chef'
        from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/omnibus-ctl-0.6.0/lib/omnibus-ctl.rb:516:in `reconfigure'
        from /opt/gitlab/embedded/service/omnibus-ctl/upgrade.rb:32:in `block in load_file'
        from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/omnibus-ctl-0.6.0/lib/omnibus-ctl.rb:197:in `block in add_command'
        from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/omnibus-ctl-0.6.0/lib/omnibus-ctl.rb:746:in `run'
        from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/omnibus-ctl-0.6.0/bin/omnibus-ctl:31:in `<top (required)>'
        from /opt/gitlab/embedded/bin/omnibus-ctl:23:in `load'
        from /opt/gitlab/embedded/bin/omnibus-ctl:23:in `<main>'
warning: %posttrans(gitlab-ce-14.7.2-ce.0.el7.x86_64) scriptlet failed, signal 2
Non-fatal POSTTRANS scriptlet failure in rpm package gitlab-ce-14.7.2-ce.0.el7.x86_64
[root@BaiYang-PC src]#
[root@BaiYang-PC src]#
[root@BaiYang-PC src]# mv /usr/lib/wsl/lib/libcuda.so.1 /usr/lib/wsl/lib/libcuda.so.1.bak
mv: cannot move ‘/usr/lib/wsl/lib/libcuda.so.1’ to ‘/usr/lib/wsl/lib/libcuda.so.1.bak’: Read-only file system
[root@BaiYang-PC src]#
[root@BaiYang-PC src]#
[root@BaiYang-PC src]#
[root@BaiYang-PC src]# yum install -y gitlab-ce
Loaded plugins: fastestmirror, ovl, product-id, search-disabled-repos, subscription-manager

This system is not registered with an entitlement server. You can use subscription-manager to register.

Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * epel: mirrors.njupt.edu.cn
 * extras: mirrors.aliyun.com
 * remi-safe: ftp.riken.jp
 * updates: mirrors.aliyun.com
Package gitlab-ce-14.7.2-ce.0.el7.x86_64 already installed and latest version
Nothing to do
[root@BaiYang-PC src]#

修改gitlab配置:

vi /etc/gitlab/gitlab.rb

修改时区:# gitlab_rails['time_zone'] = 'UTC'gitlab_rails['time_zone'] = 'Asia/Shanghai'

配置访问地址(域名或IP都可以):external_url 'http://gitlab.example.com' 修改为 external_url 'http://127.0.0.1'

修改配置后的编译初始化:

gitlab-ctl reconfigure

重启gitlab:

gitlab-ctl restart

报错了:

[root@BaiYang-PC src]# gitlab-ctl reconfigure






// 页面停在这了,按 ctrl + c 弹出下面的信息
^CTraceback (most recent call last):
        7: from /opt/gitlab/embedded/bin/omnibus-ctl:23:in `<main>'
        6: from /opt/gitlab/embedded/bin/omnibus-ctl:23:in `load'
        5: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/omnibus-ctl-0.6.0/bin/omnibus-ctl:31:in `<top (required)>'
        4: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/omnibus-ctl-0.6.0/lib/omnibus-ctl.rb:746:in `run'
        3: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/omnibus-ctl-0.6.0/lib/omnibus-ctl.rb:516:in `reconfigure'
        2: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/omnibus-ctl-0.6.0/lib/omnibus-ctl.rb:503:in `run_chef'
        1: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/omnibus-ctl-0.6.0/lib/omnibus-ctl.rb:238:in `run_command'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/omnibus-ctl-0.6.0/lib/omnibus-ctl.rb:238:in `system': Interrupt

[root@BaiYang-PC src]#
[root@BaiYang-PC src]#
[root@BaiYang-PC src]# gitlab-ctl restart
warning: logrotate: unable to open supervise/ok: file does not exist
[root@BaiYang-PC src]#
[root@BaiYang-PC src]# gitlab-ctl start
warning: logrotate: unable to open supervise/ok: file does not exist
[root@BaiYang-PC src]#

完整卸载了吧:

[root@BaiYang-PC src]# yum remove gitlab-ce
Loaded plugins: fastestmirror, ovl, product-id, search-disabled-repos, subscription-manager

This system is not registered with an entitlement server. You can use subscription-manager to register.

Resolving Dependencies
--> Running transaction check
---> Package gitlab-ce.x86_64 0:14.7.2-ce.0.el7 will be erased
--> Finished Dependency Resolution

Dependencies Resolved

=====================================================================================================
 Package               Arch               Version                        Repository             Size
=====================================================================================================
Removing:
 gitlab-ce             x86_64             14.7.2-ce.0.el7                installed             2.1 G

Transaction Summary
=====================================================================================================
Remove  1 Package

Installed size: 2.1 G
Is this ok [y/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Warning: RPMDB altered outside of yum.
  Erasing    : gitlab-ce-14.7.2-ce.0.el7.x86_64                                                  1/1
  Verifying  : gitlab-ce-14.7.2-ce.0.el7.x86_64                                                  1/1

Removed:
  gitlab-ce.x86_64 0:14.7.2-ce.0.el7

Complete!
[root@BaiYang-PC src]#

清除缓存:

[root@BaiYang-PC src]# yum clean all
Loaded plugins: fastestmirror, ovl, product-id, search-disabled-repos, subscription-manager

This system is not registered with an entitlement server. You can use subscription-manager to register.

Cleaning repos: base epel extras gitlab-ce mysql-connectors-community mysql-tools-community
              : mysql80-community nginx-stable remi-safe updates
Cleaning up list of fastest mirrors
Other repos take up 3.8 M of disk space (use --verbose for details)
[root@BaiYang-PC src]#

删除配置文件:

[root@BaiYang-PC src]# rm -rf /etc/gitlab
[root@BaiYang-PC src]#

重新安装:

[root@BaiYang-PC src]# yum makecache
Loaded plugins: fastestmirror, ovl, product-id, search-disabled-repos, subscription-manager

This system is not registered with an entitlement server. You can use subscription-manager to register.

Loading mirror speeds from cached hostfile
epel/x86_64/metalink                                                          | 5.9 kB  00:00:00
 * base: mirrors.aliyun.com
 * epel: mirrors.njupt.edu.cn
 * extras: mirrors.aliyun.com
 * remi-safe: fr2.rpmfind.net
 * updates: mirrors.aliyun.com
base                                                                          | 3.6 kB  00:00:00
epel                                                                          | 4.7 kB  00:00:00
extras                                                                        | 2.9 kB  00:00:00
gitlab-ce                                                                     | 2.9 kB  00:00:00
mysql-connectors-community                                                    | 2.6 kB  00:00:00
mysql-tools-community                                                         | 2.6 kB  00:00:00
mysql80-community                                                             | 2.6 kB  00:00:00
nginx-stable                                                                  | 2.9 kB  00:00:00
remi-safe                                                                     | 3.0 kB  00:00:00
updates                                                                       | 2.9 kB  00:00:00
(1/34): base/7/x86_64/group_gz                                                | 153 kB  00:00:00
(2/34): base/7/x86_64/primary_db                                              | 6.1 MB  00:00:04
(3/34): base/7/x86_64/other_db                                                | 2.6 MB  00:00:01
(4/34): base/7/x86_64/filelists_db                                            | 7.2 MB  00:00:06
(5/34): epel/x86_64/group_gz                                                  |  96 kB  00:00:02
(6/34): epel/x86_64/filelists_db                                              |  12 MB  00:00:00
(7/34): epel/x86_64/updateinfo                                                | 1.0 MB  00:00:00
(8/34): epel/x86_64/prestodelta                                               |  324 B  00:00:00
(9/34): epel/x86_64/primary_db                                                | 7.0 MB  00:00:00
(10/34): epel/x86_64/other_db                                                 | 3.4 MB  00:00:00
(11/34): extras/7/x86_64/filelists_db                                         | 259 kB  00:00:00
(12/34): extras/7/x86_64/other_db                                             | 145 kB  00:00:00
(13/34): extras/7/x86_64/primary_db                                           | 243 kB  00:00:01
(14/34): gitlab-ce/7/primary_db                                               | 5.0 MB  00:00:03
(15/34): gitlab-ce/7/other_db                                                 |  44 kB  00:00:00
(16/34): mysql-connectors-community/x86_64/filelists_db                       | 127 kB  00:00:00
(17/34): mysql-connectors-community/x86_64/primary_db                         |  90 kB  00:00:00
(18/34): mysql-connectors-community/x86_64/other_db                           |  25 kB  00:00:00
(19/34): mysql-tools-community/x86_64/filelists_db                            | 447 kB  00:00:00
(20/34): mysql-tools-community/x86_64/other_db                                |  21 kB  00:00:00
(21/34): mysql80-community/x86_64/primary_db                                  | 198 kB  00:00:00
(22/34): mysql80-community/x86_64/other_db                                    |  53 kB  00:00:00
(23/34): mysql-tools-community/x86_64/primary_db                              |  94 kB  00:00:01
(24/34): mysql80-community/x86_64/filelists_db                                | 1.8 MB  00:00:00
(25/34): nginx-stable/7/x86_64/primary_db                                     |  71 kB  00:00:01
remi-safe/filelists_db         FAILED
https://mirrors.tuna.tsinghua.edu.cn/remi/enterprise/7/safe/x86_64/repodata/895b1c1d195977e130cde3fec2e0a4a7d1d92a2ea5c233ed2f993e413647f0fe-filelists.sqlite.bz2: [Errno 14] HTTPS Error 404 - Not Found
Trying other mirror.
To address this issue please refer to the below wiki article

https://wiki.centos.org/yum-errors

If above article doesn't help to resolve this issue please use https://bugs.centos.org/.

(26/34): nginx-stable/7/x86_64/filelists_db                                   |  95 kB  00:00:01
remi-safe/other_db             FAILED
https://mirrors.tuna.tsinghua.edu.cn/remi/enterprise/7/safe/x86_64/repodata/159299cb2f67d658b703641c2c8d2066e2ee43b3890ed0bc5d76d0316e62fd4b-other.sqlite.bz2: [Errno 14] HTTPS Error 404 - Not Found
Trying other mirror.
(27/34): nginx-stable/7/x86_64/other_db                                       |  43 kB  00:00:00
(28/34): updates/7/x86_64/primary_db                                          |  13 MB  00:00:03
(29/34): updates/7/x86_64/other_db                                            | 960 kB  00:00:00
(30/34): remi-safe/primary_db                                                 | 2.1 MB  00:00:03
(31/34): updates/7/x86_64/filelists_db                                        | 7.4 MB  00:00:05
remi-safe/other_db             FAILED                                           182 MB  00:00:25 ETA
http://mirror.uta.edu.ec/remi/enterprise/7/safe/x86_64/repodata/159299cb2f67d658b703641c2c8d2066e2ee43b3890ed0bc5d76d0316e62fd4b-other.sqlite.bz2: [Errno 14] HTTP Error 404 - Not Found
Trying other mirror.
(32/34): remi-safe/filelists_db                                               | 1.6 MB  00:00:05
(33/34): gitlab-ce/7/filelists_db                                             | 408 MB  00:00:43
remi-safe/other_db             FAILED
http://mirror.veriteknik.net.tr/remi/enterprise/7/safe/x86_64/repodata/159299cb2f67d658b703641c2c8d2066e2ee43b3890ed0bc5d76d0316e62fd4b-other.sqlite.bz2: [Errno 12] Timeout on http://mirror.veriteknik.net.tr/remi/enterprise/7/safe/x86_64/repodata/159299cb2f67d658b703641c2c8d2066e2ee43b3890ed0bc5d76d0316e62fd4b-other.sqlite.bz2: (28, 'Connection timed out after 30000 milliseconds')
Trying other mirror.
remi-safe/other_db             FAILED
http://mirror.yer.az/remi/enterprise/7/safe/x86_64/repodata/159299cb2f67d658b703641c2c8d2066e2ee43b3890ed0bc5d76d0316e62fd4b-other.sqlite.bz2: [Errno 14] HTTP Error 404 - Not Found
Trying other mirror.
(34/34): remi-safe/other_db                                                   | 563 kB  00:00:02

Metadata Cache Created
[root@BaiYang-PC src]#
[root@BaiYang-PC src]# yum clean all
Loaded plugins: fastestmirror, ovl, product-id, search-disabled-repos, subscription-manager

This system is not registered with an entitlement server. You can use subscription-manager to register.

Cleaning repos: base epel extras gitlab-ce mysql-connectors-community mysql-tools-community
              : mysql80-community nginx-stable remi-safe updates
Cleaning up list of fastest mirrors
Other repos take up 3.8 M of disk space (use --verbose for details)
[root@BaiYang-PC src]#
[root@BaiYang-PC src]#
[root@BaiYang-PC src]# yum install -y gitlab-ce
Loaded plugins: fastestmirror, ovl, product-id, search-disabled-repos, subscription-manager

This system is not registered with an entitlement server. You can use subscription-manager to register.

Determining fastest mirrors
epel/x86_64/metalink                                                          | 5.9 kB  00:00:00
 * base: mirrors.aliyun.com
 * epel: epel.mirror.angkasa.id
 * extras: mirrors.aliyun.com
 * remi-safe: fr2.rpmfind.net
 * updates: mirrors.aliyun.com
base                                                                          | 3.6 kB  00:00:00
epel                                                                          | 4.7 kB  00:00:00
extras                                                                        | 2.9 kB  00:00:00
gitlab-ce                                                                     | 2.9 kB  00:00:00
mysql-connectors-community                                                    | 2.6 kB  00:00:00
mysql-tools-community                                                         | 2.6 kB  00:00:00
mysql80-community                                                             | 2.6 kB  00:00:00
nginx-stable                                                                  | 2.9 kB  00:00:00
remi-safe                                                                     | 3.0 kB  00:00:00
updates                                                                       | 2.9 kB  00:00:00
(1/13): base/7/x86_64/group_gz                                                | 153 kB  00:00:00
(2/13): epel/x86_64/group_gz                                                  |  96 kB  00:00:00
(3/13): epel/x86_64/updateinfo                                                | 1.0 MB  00:00:00
(4/13): extras/7/x86_64/primary_db                                            | 243 kB  00:00:00
(5/13): epel/x86_64/primary_db                                                | 7.0 MB  00:00:00
(6/13): base/7/x86_64/primary_db                                              | 6.1 MB  00:00:00
(7/13): mysql-connectors-community/x86_64/primary_db                          |  90 kB  00:00:00
(8/13): mysql-tools-community/x86_64/primary_db                               |  94 kB  00:00:00
(9/13): mysql80-community/x86_64/primary_db                                   | 198 kB  00:00:00
(10/13): remi-safe/primary_db                                                 | 2.1 MB  00:00:00
(11/13): updates/7/x86_64/primary_db                                          |  13 MB  00:00:00
(12/13): nginx-stable/7/x86_64/primary_db                                     |  71 kB  00:00:01
(13/13): gitlab-ce/7/primary_db                                               | 5.0 MB  00:00:02
Resolving Dependencies
--> Running transaction check
---> Package gitlab-ce.x86_64 0:14.7.2-ce.0.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=====================================================================================================
 Package               Arch               Version                        Repository             Size
=====================================================================================================
Installing:
 gitlab-ce             x86_64             14.7.2-ce.0.el7                gitlab-ce             938 M

Transaction Summary
=====================================================================================================
Install  1 Package

Total download size: 938 M
Installed size: 938 M
Downloading packages:
gitlab-ce-14.7.2-ce.0.el7.x86_64.rpm                                          | 938 MB  00:02:19
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : gitlab-ce-14.7.2-ce.0.el7.x86_64                                                  1/1
Checking PostgreSQL executables:/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/mixlib-shellout-3.2.5/lib/mixlib/shellout/unix.rb:128:in `run_command': Command timed out after 600s: (Mixlib::ShellOut::CommandTimeout)
Command exceeded allowed execution time, process terminated
---- Begin output of /opt/gitlab/embedded/bin/chef-client -z -c /opt/gitlab/embedded/cookbooks/solo.rb -j /opt/gitlab/embedded/cookbooks/postgresql-bin.json ----
STDOUT:
STDERR:
---- End output of /opt/gitlab/embedded/bin/chef-client -z -c /opt/gitlab/embedded/cookbooks/solo.rb -j /opt/gitlab/embedded/cookbooks/postgresql-bin.json ----
Ran /opt/gitlab/embedded/bin/chef-client -z -c /opt/gitlab/embedded/cookbooks/solo.rb -j /opt/gitlab/embedded/cookbooks/postgresql-bin.json returned
        from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/mixlib-shellout-3.2.5/lib/mixlib/shellout.rb:270:in `run_command'
        from /opt/gitlab/embedded/service/omnibus-ctl/lib/gitlab_ctl/util.rb:29:in `run_command'
        from /opt/gitlab/embedded/service/omnibus-ctl/lib/gitlab_ctl/util.rb:98:in `chef_run'
        from /opt/gitlab/embedded/service/omnibus-ctl/upgrade.rb:47:in `block (2 levels) in load_file'
        from /opt/gitlab/embedded/service/omnibus-ctl/lib/gitlab_ctl/util.rb:124:in `progress_message'
        from /opt/gitlab/embedded/service/omnibus-ctl/upgrade.rb:45:in `block in load_file'
        from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/omnibus-ctl-0.6.0/lib/omnibus-ctl.rb:197:in `block in add_command'
        from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/omnibus-ctl-0.6.0/lib/omnibus-ctl.rb:746:in `run'
        from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/omnibus-ctl-0.6.0/bin/omnibus-ctl:31:in `<top (required)>'
        from /opt/gitlab/embedded/bin/omnibus-ctl:23:in `load'
        from /opt/gitlab/embedded/bin/omnibus-ctl:23:in `<main>'
warning: %posttrans(gitlab-ce-14.7.2-ce.0.el7.x86_64) scriptlet failed, exit status 1
Non-fatal POSTTRANS scriptlet failure in rpm package gitlab-ce-14.7.2-ce.0.el7.x86_64
  Verifying  : gitlab-ce-14.7.2-ce.0.el7.x86_64                                                  1/1

Installed:
  gitlab-ce.x86_64 0:14.7.2-ce.0.el7

Complete!
[root@BaiYang-PC src]#
[root@BaiYang-PC src]# vi /etc/gitlab/gitlab.rb
[root@BaiYang-PC src]#
[root@BaiYang-PC src]# gitlab-ctl reconfigure






^CTraceback (most recent call last):
        7: from /opt/gitlab/embedded/bin/omnibus-ctl:23:in `<main>'
        6: from /opt/gitlab/embedded/bin/omnibus-ctl:23:in `load'
        5: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/omnibus-ctl-0.6.0/bin/omnibus-ctl:31:in `<top (required)>'
        4: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/omnibus-ctl-0.6.0/lib/omnibus-ctl.rb:746:in `run'
        3: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/omnibus-ctl-0.6.0/lib/omnibus-ctl.rb:516:in `reconfigure'
        2: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/omnibus-ctl-0.6.0/lib/omnibus-ctl.rb:503:in `run_chef'
        1: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/omnibus-ctl-0.6.0/lib/omnibus-ctl.rb:238:in `run_command'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/omnibus-ctl-0.6.0/lib/omnibus-ctl.rb:238:in `system': Interrupt

[root@BaiYang-PC src]#
[root@BaiYang-PC src]#
[root@BaiYang-PC src]# gitlab-ctl start
warning: logrotate: unable to open supervise/ok: file does not exist
[root@BaiYang-PC src]# gitlab-ctl status
warning: logrotate: unable to open supervise/ok: file does not exist
[root@BaiYang-PC src]#
[root@BaiYang-PC src]#
[root@BaiYang-PC src]# gitlab-ctl restart
warning: logrotate: unable to open supervise/ok: file does not exist
[root@BaiYang-PC src]#
[root@BaiYang-PC src]#

还是有问题!

搜索到可用解决方案如下,但systemctl不支持:

  1. 按住CTRL+C强制结束;
  2. 运行:sudo systemctl restart gitlab-runsvdir;
  3. 再次执行:sudo gitlab-ctl reconfigure

WSL 一个残废的Linux,以后还是别用了!

卸载及清空配置文件:

[root@BaiYang-PC src]# yum remove gitlab-ce
Loaded plugins: fastestmirror, ovl, product-id, search-disabled-repos, subscription-manager

This system is not registered with an entitlement server. You can use subscription-manager to register.

Resolving Dependencies
--> Running transaction check
---> Package gitlab-ce.x86_64 0:14.7.2-ce.0.el7 will be erased
--> Finished Dependency Resolution

Dependencies Resolved

=====================================================================================================
 Package               Arch               Version                       Repository              Size
=====================================================================================================
Removing:
 gitlab-ce             x86_64             14.7.2-ce.0.el7               @gitlab-ce             2.1 G

Transaction Summary
=====================================================================================================
Remove  1 Package

Installed size: 2.1 G
Is this ok [y/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Erasing    : gitlab-ce-14.7.2-ce.0.el7.x86_64                                                  1/1
  Verifying  : gitlab-ce-14.7.2-ce.0.el7.x86_64                                                  1/1
base/7/x86_64                                                                 | 3.6 kB  00:00:00
epel/x86_64/metalink                                                          | 5.5 kB  00:00:00
extras/7/x86_64                                                               | 2.9 kB  00:00:00
gitlab-ce/7                                                                   | 2.9 kB  00:00:00
mysql-connectors-community/x86_64                                             | 2.6 kB  00:00:00
mysql-tools-community/x86_64                                                  | 2.6 kB  00:00:00
mysql80-community/x86_64                                                      | 2.6 kB  00:00:00
nginx-stable/7/x86_64                                                         | 2.9 kB  00:00:00
remi-safe                                                                     | 3.0 kB  00:00:00
remi-safe/primary_db                                                          | 2.1 MB  00:00:00
updates/7/x86_64                                                              | 2.9 kB  00:00:00
updates/7/x86_64/primary_db                                                   |  13 MB  00:00:38

Removed:
  gitlab-ce.x86_64 0:14.7.2-ce.0.el7

Complete!
[root@BaiYang-PC src]#
[root@BaiYang-PC src]#
[root@BaiYang-PC src]# yum clean all
Loaded plugins: fastestmirror, ovl, product-id, search-disabled-repos, subscription-manager

This system is not registered with an entitlement server. You can use subscription-manager to register.

Cleaning repos: base epel extras gitlab-ce mysql-connectors-community mysql-tools-community
              : mysql80-community nginx-stable remi-safe updates
Cleaning up list of fastest mirrors
Other repos take up 3.8 M of disk space (use --verbose for details)
[root@BaiYang-PC src]#
[root@BaiYang-PC src]# rm -rf /etc/gitlab
[root@BaiYang-PC src]#
[root@BaiYang-PC src]# ls -l
total 972864
-rw-r--r--  1 root root     57721 Dec 23 16:16 composer-setup.php
-rw-r--r--  1 root root 983726054 Feb  9 04:17 gitlab-ce-14.7.2-ce.0.el7.x86_64.rpm
-rw-r--r--  1 root root      7076 Nov  4 18:25 mysql80-community-release-el7-4.noarch.rpm
-rw-r--r--  1 root root      6140 Nov 12  2015 mysql-community-release-el7-5.noarch.rpm
drwxr-xr-x 18 root root      4096 Dec 14 15:18 protobuf-3.11.2
-rw-r--r--  1 root root   9533148 Dec 14  2019 protobuf-all-3.11.2.zip
drwxr-xr-x 15 root root      4096 Dec 24 14:14 swoole-src-4.8.4
-rwxrwxrwx  1 root root   2855470 Dec 24 13:54 swoole-src-4.8.4.zip
[root@BaiYang-PC src]#
[root@BaiYang-PC src]# rm -f gitlab-ce-14.7.2-ce.0.el7.x86_64.rpm
[root@BaiYang-PC src]#
[root@BaiYang-PC src]# ll
total 12188
-rw-r--r--  1 root root   57721 Dec 23 16:16 composer-setup.php
-rw-r--r--  1 root root    7076 Nov  4 18:25 mysql80-community-release-el7-4.noarch.rpm
-rw-r--r--  1 root root    6140 Nov 12  2015 mysql-community-release-el7-5.noarch.rpm
drwxr-xr-x 18 root root    4096 Dec 14 15:18 protobuf-3.11.2
-rw-r--r--  1 root root 9533148 Dec 14  2019 protobuf-all-3.11.2.zip
drwxr-xr-x 15 root root    4096 Dec 24 14:14 swoole-src-4.8.4
-rwxrwxrwx  1 root root 2855470 Dec 24 13:54 swoole-src-4.8.4.zip
[root@BaiYang-PC src]#

dnf方式安装

DNF 是新一代的rpm软件包管理器。他首先出现在 Fedora 18 这个发行版中。而最近,它取代了yum,正式成为 Fedora 22 的包管理器。

DNF包管理器克服了YUM包管理器的一些瓶颈,提升了包括用户体验,内存占用,依赖分析,运行速度等多方面的内容。 DNF使用 RPM, libsolv 和 hawkey 库进行包管理操作。尽管它没有预装在 CentOS 和 RHEL 7 中,但你可以在使用 YUM 的同时使用 DNF。






参考资料

centOS7 安装gitlab 转 亲测实用 https://www.cnblogs.com/934827624-qq-com/p/10964722.html

清华大学开源软件镜像站 https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/

dnf 新一代的RPM软件包管理器 https://ipcmen.com/dnf

gitlab安装教程 https://www.cnblogs.com/breg/p/11720407.html

Linux Centos7/8安装gitlab及配置防坑指南 https://blog.csdn.net/weixin_44534057/article/details/116076342

GitLab的安装及使用教程 https://www.cnblogs.com/weifeng1463/p/7714492.html

GitLab的安装及使用教程 https://www.cnblogs.com/lpfuture/p/8582239.html

docker下gitlab安装配置使用(完整版) https://www.jianshu.com/p/080a962c35b6


返回