REF https://docs.gitlab.com/runner/install/
curl -L https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.rpm.sh | sudo bash
yum list gitlab-runner --showduplicates | sort -r // show all version.
yum install gitlab-runner
yum install gitlab-runner-{13.0.2-1}
OR
curl -LJO https://gitlab-runner-downloads.s3.amazonaws.com/latest/rpm/gitlab-runner_{abc}.rpm
curl -LJO https://gitlab-runner-downloads.s3.amazonaws.com/v13.0.0/rpm/gitlab-runner_amd64.rpm. // for version
rpm -i gitlab-runner_{abc}.rpm
ln -s /usr/local/bin/gitlab-runner /usr/bin/gitlab-runner
If manually build, you need add
/usr/local/bin
to secure_path
cat /etc/sudoers
#Defaults secure_path = /sbin:/bin:/usr/sbin:/usr/bin
Defaults secure_path = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin
## Next comes the main part: which users can run what software on
## which machines (the sudoers file can be shared between multiple
## systems).
echo "gitlab-runner ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers