Home > Operation and Maintenance > Linux Operation and Maintenance > How to set up gitlab server on linux server

How to set up gitlab server on linux server

王林
Release: 2023-05-17 11:52:25
forward
1722 people have browsed it

Environment preparation

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

  • A server with a Linux system installed.

  • Make sure 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 . When using cloud hosts such as Alibaba Cloud, you must first open port 80 on the cloud platform.


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


    You will see the welcome page of GitLab, as well as 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:

      You can manage the project on the project page, including adding members, managing branches, and viewing submission history. You can set access permissions when setting up project permissions to ensure the security of your project.

    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!

Related labels:
source:yisu.com
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