Devopd-gitlab安装于使用


下载gtilabr的rpm安装包

下载地址:https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/

上传到服务器,安装

第一次安装出错

[root@yaoguang ~]# rpm -ivh gitlab-ce-14.10.3-ce.0.el7.x86_64.rpm
warning: gitlab-ce-14.10.3-ce.0.el7.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID f27eab47: NOKEY
error: Failed dependencies:
        policycoreutils-python is needed by gitlab-ce-14.10.3-ce.0.el7.x86_64

原因:缺少以来环境,安装依赖环境

[root@yaoguang ~]# yum install -y policycoreutils-python

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

Complete!

再次安装

[root@yaoguang ~]# rpm -ivh gitlab-ce-14.10.3-ce.0.el7.x86_64.rpm
warning: gitlab-ce-14.10.3-ce.0.el7.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID f27eab47: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:gitlab-ce-14.10.3-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-10

出现以上情况,说明已经安装成功

配置

1、根据安装之后的提示编辑/etc/gitlab/gitlab.rb

external_url参数后面更改为自己的IP地址

external_url 'http://119.3.70.78'

2、根据安装之后的提示执行命令gitlab-ctl reconfigure

3、gitlab-ctl restart

4、systemcel stop firewalld

测试

客户端配置