CentOS7 build gitlab server

  This article describes how to build Gitlab server on CentOS7.2, and briefly explains how to use.

Preface

  Using CentOS7.2 operating system, install the most current version Gitlab server, Download: Tsinghua University Open Source software mirror sites .

What gitlab- 12.0 . 2 -what. 0 .el7.x86_64.rpm     610.5 MiB     2019 - 06 - 27  05 : 58

  Download package.

# cat /etc/redhat-release 
CentOS Linux release 7.2.1511 (Core) 
# wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-12.0.2-ce.0.el7.x86_64.rpm
# ls
gitlab-ce-12.0.2-ce.0.el7.x86_64.rpm

Installation depends

  gitlab dependent policycoreutils-python, need to install its dependencies.

# yum install -y policycoreutils-python

Server installation Gitlab

  Use rpm -i can be directly related to the installation package.

What gitlab-rpm -i # 12.0 . 2 -what. 0 .el7.x86_64.rpm
warning: gitlab-ce-12.0.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

  gitlab occupied by default port 8080, which is because we use a temporary test, in order not to be victimizes, it recommended modifications to other ports other non-Web-like interface, such as 10101 and so on.

Modify the port

  Gitlab modify configuration files.

Vim # / etc / gitlab / gitlab.rb 
... 
external_url ' HTTP: //xx.xx.xx.xx: 10101 '     # ip: port form of

Reconfigure

  After modifying the configuration file, you need to re-configure, execute the following command.

# gitlab-ctl reconfigure
...
Running handlers:
Running handlers complete
Chef Client finished, 30/712 resources updated in 50 seconds
gitlab Reconfigured!

Start Service

  After configuration is complete, start the service.

# gitlab-ctl restart
ok: run: alertmanager: (pid 3687) 0s
ok: run: gitaly: (pid 3697) 0s
ok: run: gitlab-monitor: (pid 3714) 0s
ok: run: gitlab-workhorse: (pid 3716) 1s
ok: run: grafana: (pid 3723) 0s
ok: run: logrotate: (pid 3742) 1s
ok: run: nginx: (pid 3750) 0s
ok: run: node-exporter: (pid 3756) 1s
ok: run: postgres-exporter: (pid 3765) 0s
ok: run: postgresql: (pid 3774) 1s
ok: run: prometheus: (pid 3777) 0s
ok: run: redis: (pid 3792) 0s
ok: run: redis-exporter: (pid 3816) 0s
ok: run: sidekiq: (pid 3904) 0s
ok: run: unicorn: (pid 3915) 0s

Access Interface

  Access to just set in the configuration file http: //xx.xx.xx.xx: 10101

Set an administrator password

  The following interface to set the administrator password.

  You can choose to log in or register, use root and administrator password you just set up to log on.

 

     Currently empty.

  可以创建项目、组、添加用户和进行相关配置,这样Gitlab服务器便安装完成。

Guess you like

Origin www.cnblogs.com/Hi-blog/p/How-To-Install-Gitlab-On-CentOS7.html