Home > Development Tools > git > body text

How to set up gitlab server on linux server

PHPz
Release: 2023-03-31 09:40:48
Original
685 people have browsed it

With the continuous development of informatization, git is no longer an exclusive tool for programmers' productivity. More and more enterprises and project teams are choosing to use git to collaborate on development projects to ensure the traceability and security of the code. Therefore, many teams will choose to use private git servers to manage development history. This article will introduce how to set up a gitlab server on a linux server.

Environment preparation

This article uses ubuntu 18.04. If you are using other distributions, please ensure that the following preparations have been completed:

  • One installation A server with a linux system.
  • Make sure that the server's network is connected and you can access the external network.
  • Make sure you have installed the necessary dependent libraries: openssh-server, ca-certificates, curl, postfix. You can use the following command to install dependent libraries:
sudo apt-get install -y openssh-server ca-certificates curl postfix
Copy after login

Install GitLab

  1. Add GitLab Community Edition software source:

    curl https://packages.gitlab.com/gpg.key 2>&1 | sudo apt-key add -
    sudo curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash
    Copy after login
  2. Install GitLab:

    sudo apt-get install gitlab-ce
    Copy after login

    The installation process may take some time. After the installation is successful, you can enter the following command in the terminal to start GitLab:

    sudo gitlab-ctl reconfigure
    Copy after login
  3. Access GitLab in the browser:

    By default, the port GitLab listens to is 80, so you can enter the address of your server plus port 80 in the browser to access the GitLab page. If your server uses a cloud host such as Alibaba Cloud, you need to open port 80 on the cloud platform first.

    http://<server IP>:80/
    Copy after login

    You will see GitLab’s welcome page and some information about GitLab.

Configuring GitLab

You can configure GitLab through the following steps:

  1. Register an administrator account:

    On the GitLab welcome page, click "Register a new GitLab administrator account", fill in your administrator information, and then click "Create account" to register an administrator account.

  2. Change administrator password:

    After registration is completed, click the administrator avatar in the upper right corner, then select "Settings" and select "Account" on the left "Password" to change the administrator password.

  3. Create a project:

    Click the " " icon in the upper right corner, select "New project", fill in the name and description of the project, and then click "Create project" ” to create a project.

  4. Manage projects:

    In the project page, you can manage the project, including adding members, managing branches and submission history, etc. To ensure the security of the project, you can choose to set access permissions for the project and set permissions in the project settings.

Summary

Through the introduction of this article, you can already set up a GitLab server on a Linux server, and successfully create and manage projects. GitLab is a powerful collaboration tool based on git that can help teams better manage projects and improve development efficiency. We hope this article was helpful and wish you success in using GitLab!

The above is the detailed content of How to set up gitlab server on linux server. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!