Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install and use GitLab

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly shows you "how to install and use GitLab", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "how to install and use GitLab" this article.

GitLab is an open source project for warehouse management system, which uses Git as a code management tool and builds Web services on this basis. The installation method is to refer to the Wiki page of GitLab on GitHub.

Installation

The following is the installation instructions for the official documentation. For more information, please visit the official website of gitlab or the Chinese website of gitlab.

1, installation dependency

Sudo yum install curl openssh-server openssh-clients postfix croniesudo service postfix startsudo chkconfig postfix onsudo lokkit-s http-s ssh

2. Add the GitLab repository and install it on the server

Curl-sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bashsudo yum install gitlab-ce

3, configure and start, the following command will automatically configure and initialize gitlab

Sudo gitlab-ctl reconfigure

4, start and log in

The following is the default username password, which will prompt you to change your password for the first time:

Username: rootPassword: 5iveL!fe

And then you can have a good time! ?

The installation of GitLab the problems in the installation of GitLab

I heard that there are still many problems in gitlab installation, but I don't seem to encounter many problems in the process of installation!

1. 502 error occurred when accessing GitLab in browser

The installation of GitLab the installation of GitLab

First of all, there is the problem of port occupation. Port 80 will be used to start gitlab, so it is recommended that you turn off all unneeded services or modify the default port before starting gitlab:

Sudo vim / etc/gitlab/gitlab.rb

Modify external_url and directly add the port number. For example, I use port 8800 here:

External_url 'http://localhost:8800'

Then execute:

Sudo gitlab-ctl reconfigure

2pr 8080 port conflict

In addition to port 80, there is also a port for unicorn, which defaults to 8080 if port 8080 is occupied by other programs. Then unicorn will fail to start with a 502 error, "GitLab is not responding".

Solution: modify / etc/gitlab/gitlab.rb

Unicorn ['listen'] =' 127.0.0.1'unicorn ['port'] = 8801

Then run:

Sudo gitlab-ctl reconfigurgitlab Common Command gitlab-ctl startgitlab-ctl stopgitlab-ctl statusgitlab-ctl restart

The default log files for Gitlab are stored in the / var/log/gitlab directory:

Gitlab-ctl tail # View all logs gitlab-ctl tail nginx/gitlab_access.log # View nginx access logs these are all the contents of the article "how to install and use GitLab". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report