search
HomeDevelopment Toolsgitcentos7 installs the latest stable version of gitlab

In the development team, the version control tool Git has become an essential tool. GitLab is a Web platform based on Git. Based on Git, it provides multiple functions such as code hosting, issue tracking, and CI/CD pipelines, which can help teams develop software more efficiently. This article will introduce how to install the latest stable version of GitLab on CentOS 7 system.

Step one: Install the required dependent software

Before installing GitLab, we need to install several necessary software packages. Use the following command to install:

sudo yum install curl policycoreutils openssh-server openssh-clients postfix

Among them, Postfix is ​​a mail transfer agent software and must be installed first.

Step 2: Install GitLab

Before installing GitLab, you must first add the GitLab repository. Use the following command:

curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.rpm.sh | sudo bash

Now, we can use yum to install GitLab. Use the following command:

sudo EXTERNAL_URL="http://gitlab.example.com" yum install -y gitlab-ee

Please note that the "http://gitlab.example.com" in the above command is the actual hostname or IP address you are using. If you need to use HTTPS, just change the address to https and also configure the certificate for nginx.

Wait for the installation process to finish.

Step 3: Configure GitLab

After the installation is completed, we need to perform some necessary configurations on GitLab, including email service, Domain name configuration, etc.

  1. Configuring the email service

GitLab relies on the email service to send notification emails. You can use Postfix or SMTP server. Here we introduce how to use SMTP server.

Open the /etc/gitlab/gitlab.rb file and search for SMTP settings.

sudo vim /etc/gitlab/gitlab.rb

Add the following content at the end, save and exit:

gitlab_rails['smtp_enable'] = true
gitlab_rails['smtp_address'] = "smtp.gmail.com"
gitlab_rails['smtp_port'] = 587
gitlab_rails['smtp_user_name'] = "your-email@gmail.com"
gitlab_rails['smtp_password'] = "your-email-password"
gitlab_rails['smtp_authentication'] = "login"
gitlab_rails['smtp_enable_starttls_auto'] = true
gitlab_rails['smtp_tls'] = false

In the above code, we used Gmail as the SMTP server and configured your email address and password. You can change it according to your needs.

  1. Configuring the domain name

Before configuring the domain name, we need to confirm whether the firewall has been set up correctly. GitLab requires TCP ports 80 and 443 to be open.

sudo firewall-cmd --zone=public --add-port=80/tcp --permanent
sudo firewall-cmd --zone=public --add-port=443/tcp --permanent
sudo firewall-cmd --reload

Add the following content in the /etc/gitlab/gitlab.rb file:

external_url 'http://gitlab.example.com:9080'

We can also use HTTPS, just change the external_url configuration to https.

  1. Reconfigure GitLab

After completing the above configuration, we need to reconfigure GitLab for the changes to take effect. Use the following command to reconfigure:

sudo gitlab-ctl reconfigure

After the configuration is completed, you can use the browser to access the GitLab interface and start using it.

Summary

GitLab is a powerful Git-based team collaboration platform that can facilitate team development. In this article, we introduce how to install the latest stable version of GitLab on CentOS7, we hope it will be helpful to you.

The above is the detailed content of centos7 installs the latest stable version of gitlab. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Using GitHub: Sharing, Managing, and Contributing to CodeUsing GitHub: Sharing, Managing, and Contributing to CodeMay 05, 2025 am 12:12 AM

The methods of sharing, managing and contributing code on GitHub include: 1. Create a repository and push code, and write README and LICENSE files; 2. Use branches, tags and merge requests to manage code; 3. Fork the repository, modify and submit PullRequest contribution code. Through these steps, developers can effectively use GitHub to improve development efficiency and collaboration capabilities.

Git vs. GitHub: A Comparative AnalysisGit vs. GitHub: A Comparative AnalysisMay 04, 2025 am 12:07 AM

Git is a distributed version control system, and GitHub is a Git-based collaboration platform. Git is used for version control and code management, while GitHub provides additional collaboration features such as code review and project management.

Git vs. GitHub: Understanding the DifferenceGit vs. GitHub: Understanding the DifferenceMay 03, 2025 am 12:08 AM

Git is a distributed version control system, and GitHub is an online platform based on Git. Git is used for version control, branch management and merger, and GitHub provides code hosting, collaboration tools and social networking capabilities.

GitHub: The Frontend, Git: The BackendGitHub: The Frontend, Git: The BackendMay 02, 2025 am 12:16 AM

Git is a back-end version control system, and GitHub is a front-end collaboration platform based on Git. Git manages code version, GitHub provides user interface and collaboration tools, and the two work together to improve development efficiency.

The Ultimate Showdown: Git vs. GitHubThe Ultimate Showdown: Git vs. GitHubMay 01, 2025 am 12:23 AM

Git is a version control system, and GitHub is a Git-based code hosting platform. Git is used to manage code versions and history, and GitHub provides code hosting and collaboration capabilities. Git is suitable for all projects that require version control, GitHub is suitable for team collaboration and open source projects.

Git vs. GitHub: A Developer's PerspectiveGit vs. GitHub: A Developer's PerspectiveApr 30, 2025 am 12:14 AM

Git is a distributed version control system, and GitHub is an online platform based on Git. Git provides version control features such as branch management and commit history; GitHub provides collaboration tools such as code review and project management.

Git: The Version Control System, GitHub: The PlatformGit: The Version Control System, GitHub: The PlatformApr 29, 2025 am 12:31 AM

Git and GitHub are the core tools of modern software development. Git is a distributed version control system, while GitHub is a collaboration platform. Using Git and GitHub can improve development efficiency and enhance team collaboration.

Git: The Technology, GitHub: The PlatformGit: The Technology, GitHub: The PlatformApr 28, 2025 am 12:09 AM

Git is a distributed version control system created by Linus Torvaz in 2005, while GitHub is an online collaboration platform based on Git. Git records file changes through snapshots and supports branch models. GitHub provides tools such as PullRequest to improve collaboration efficiency.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),