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-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

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

This article is about how to install and use GitLab. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

GitLab is a self-hosted Git project repository developed by Ruby, which can access public or private projects through the Web interface.

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 Log Thank you for reading! This is the end of the article on "how to install and use GitLab". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!

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