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 build a server warehouse by using Gitlab

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

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

In this issue, the editor will bring you about how to use Gitlab to build a server warehouse. The article is rich in content and analyzes and describes it from a professional point of view. I hope you can get something after reading this article.

Operating system required for Gitlab self-built server warehouse

Before the start of the tutorial, did many people search: build GitLab server under Windows? The answer is no, GitLab is only developed for Unix-like systems.

Of course, GitLab itself is a derivative of Git, if you have to build a Git server under Windows, then other derivatives of Git, such as Gitblit, can be done.

Introduction to the advantages and disadvantages of Git

Advantages

Suitable for distributed development, emphasizing individuals

The pressure on public servers and the amount of data will not be too large.

Fast and flexible

Conflicts can be easily resolved between any two developers

Offline can submit code and work normally.

Shortcoming

The learning cycle is relatively long.

Not in line with conventional thinking

The confidentiality of the code is poor, and once the developer has cloned the entire library, all the code and version information can be fully disclosed.

Gitlab installation

Git installation

$apt update

$apt install git

Install dependency packages

$sudo apt-get install curl openssh-server ca-certificates postfix

OK--- > InternetSite--- > OK. Default is fine.

Install the main program

Curl https://packages.gitlab.com/gpg.key 2 > / dev/null | sudo apt-key add-& > / dev/nullecho "deb http://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/debian stretch main" > > / etc/apt/sources.list.d/gitlab-ce.listsudo apt-get updatesudo apt-get install gitlab-ce

Install gitlab-ce

Ubuntu 18.04LTS, add installation package address

Use the image of Tsinghua University to install the main program

First trust the GPG public key of GitLab

Modify configuration

Vim / etc/gitlab/gitlab.rb change external_url= http://47.244.126.85 (change IP to your local IP address, both internal and external)

Start the sshd and postfix services

Service sshd startservice postfix start

Add Firewall Rul

Sudo iptables-An INPUT-p tcp-m tcp-- dport 80-j ACCEPT

Start various services

Sudo gitlab-ctl reconfigure

View gitlab status

Sudo gitlab-ctl status

Gitlab Usage

Open a browser to access http://47.244.126.85

The default first access requires changing the initial password

The above is the editor for you to share how to use Gitlab to build a server warehouse, if you happen to have similar doubts, you might as well refer to the above analysis to understand. If you want to know more about it, you are 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

Internet Technology

Wechat

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

12
Report