• Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial News Comments FAQ Related Articles

How to Install and configure GitLab runner on centos 7

  • 02:21 curl -L "https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.rpm.sh" | sudo bash
  • 03:31 sudo yum install gitlab-runner
  • 05:14 sudo gitlab-runner register
{{postValue.id}}

Method To Install and configure GitLab runner on centos 7

Introduction:

GitLab Runner is an application that works with GitLab CI/CD to run jobs in a pipeline. GitLab Runner is open-source and written in Go. It can be run as a single binary; no language-specific requirements are needed. GitLab Runner can also run inside a Docker container or be deployed into a Kubernetes cluster.

Installation Procedure:

Step 1 : Check the installed OS version by using the following command

linuxhelp@linuxhelp:~$ cat /etc/os-release
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"

Step 2: Login to your Gitlab account and go inside any project Snap1 snap1 (2)

Step 3: Navigate the project to find the settings and move to the CI/Cd section

snap2 (2)

Step 4: Follow the instruction given under the specific runners sections

snap3 (2)

snap4

Step 5 : To install GitLab Runner, Add the official GitLab repository

root@linuxhelp: curl -L "https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.rpm.sh" | sudo bash
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  6904  100  6904    0     0  11167      0 --:--:-- --:--:-- --:--:-- 11153
Detected operating system as centos/7.
Checking for curl...
Detected curl...
Downloading repository file: https://packages.gitlab.com/install/repositories/runner/gitlab-runner/config_file.repo?os=centos&dist=7&source=script
done.
Installing pygpgme to verify GPG signatures...
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirrors.piconets.webwerks.in
 * epel: mirrors.nipa.cloud
 * extras: mirrors.piconets.webwerks.in
 * updates: centosa7.centos.org
gitlab-ce/x86_64/signature                                                                                                                                                                 |  862 B  00:00:00
gitlab-ce/x86_64/signature                                                                                                                                                                 | 1.0 kB  00:00:00 !!!
runner_gitlab-runner-source/signature                                                                                                                                                      |  862 B  00:00:00
runner_gitlab-runner-source/signature                                                                                                                                                      |  951 B  00:00:00 !!!
Package pygpgme-0.3-9.el7.x86_64 already installed and latest version
Generating yum cache for runner_gitlab-runner...
Generating yum cache for runner_gitlab-runner-source...

The repository is setup! You can now install packages.

Step 6 : Install the latest version of GitLab Runner

root@linuxhelp:~# sudo yum install gitlab-runner
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: centos.excellmedia.net
 * epel: mirrors.nipa.cloud
 * extras: centos.excellmedia.net
 * updates: centosv8.centos.org
Resolving Dependencies
--> Running transaction check
---> Package gitlab-runner.x86_64 0:14.3.2-1 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==================================================================================================================================================================================================================
 Package                                             Arch                                         Version                                        Repository                                                  Size
Installing:
 gitlab-runner                                       x86_64                                       14.3.2-1                                       runner_gitlab-runner                                       433 M


Total download size: 433 M
Installed size: 472 M
Is this ok [y/d/N]: y
Downloading packages:
gitlab-runner-14.3.2-1.x86_64.rpm                                                                                                                                                          | 433 MB  00:00:47
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : gitlab-runner-14.3.2-1.x86_64                                                                                                                                                                  1/1
revision=e0218c92 version=14.3.2
INFO: Docker installation not found, skipping clear-docker-cache
  Verifying  : gitlab-runner-14.3.2-1.x86_64                                                                                                                                                                  1/1
Installed:
  gitlab-runner.x86_64 0:14.3.2-1
Complete!

Step 7 : Now its time to register the runner To register a runner under Linux: Run the following command:

root@linuxhelp:~# sudo gitlab-runner register
Enter the GitLab instance URL (for example, https://gitlab.com/):
http://192.168.6.115/
Enter the registration token:
azCS4D5nSBbLE9zjJ-R3
Enter a description for the runner:
[linuxhelp]: Ci
Enter tags for the runner (comma-separated):
cui pipeline
Registering runner... succeeded                     runner=azCS4D5n
Enter an executor: kubernetes, custom, docker, shell, docker+machine, docker-ssh+machine, docker-ssh, parallels, ssh, virtualbox:
shell
Runner registered successfully. Feel free to start it, but if it's running already the config should be automatically reloaded!.

snasp5

With this installation and configuration of Gitlab runner on centos 7 comes to end.

Tags:
isaac
Author: 

Comments ( 0 )

No comments available

Add a comment
{{postCtrl.cmtErrMsg}}

Frequently asked questions ( 5 )

Q

Why can’t I run more than one instance of GitLab Runner?

A

we can run, but not share the same config.toml file.

Q

What is GitLab runner used for?

A

GitLab runner is a build instance that is used to run the jobs over multiple machines and send the results to GitLab

Q

How do you check if a GitLab runner is running?

A

When you execute gitlab-runner commands, you see the mode it is running in: $ gitlab-runner run INFO[0000] Starting multi-runner from /Users/ayufan/. gitlab-runner/config.

Q

Where does GitLab runner store files?

A

The uploads are stored by default in /home/git/gitlab/shared/artifacts . Save the file and restart GitLab for the changes to take effect

Q

How do I disable GitLab runner?

A

On the top bar, select Menu > Projects and find your project. On the left sidebar, select Settings > General. Expand Visibility, project features, permissions. In the Repository section, turn on or off CI/CD as required.

Back To Top!
Rank
User
Points

Top Contributers

userNamenaveelansari
135850

Top Contributers

userNameayanbhatti
92510

Top Contributers

userNamehamzaahmed
32150

Top Contributers

1
userNamelinuxhelp
31040

Top Contributers

userNamemuhammadali
24500
Can you help Isaac ?
How to run windows application in linux

I need to run the windows application in my Linux machine, instead of installing from yum repo or any other repos. How to do that..??

Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2025 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.