0 votes
116 views
in DevOps by
edited by

How to install GitLab Runner using the official GitLab repositories

1 Answer

0 votes
by
edited by

To install GitLab Runner using the official GitLab repositories, follow these steps:

  1. Add the GitLab package repository:

    For Debian/Ubuntu:
    
    curl -L https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.deb.sh | sudo bash
    
    For CentOS/RHEL:
    
    curl -L https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.rpm.sh | sudo bash
  2. Install GitLab Runner:

    For Debian/Ubuntu:
    
    sudo apt-get install gitlab-runner
    
    For CentOS/RHEL:
    
    sudo yum install gitlab-runner
  3. Configure GitLab Runner:

    After the installation, you need to register the Runner with your GitLab instance. Obtain the registration token from your GitLab project or administrator before proceeding. Run the following command:

    sudo gitlab-runner register

    Follow the prompts and provide the necessary information, such as the GitLab instance URL, registration token, description for the Runner, and any specific Runner tags or executor configuration required.

  4. Start the GitLab Runner:

    After successful registration, start the GitLab Runner service:

    For systemd-based systems:

    sudo systemctl start gitlab-runner

    For sysvinit-based systems:

    sudo service gitlab-runner start

    The Runner will now be available to execute jobs for your GitLab projects.

...