1.下载安装包
wget -O /usr/local/bin/gitlab-runner https://gitlab-ci-multi-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-ci-multi-runner-linux-amd64
赋予执行权限
chmod +x /usr/local/bin/gitlab-runner
2.创建runner用户
useradd --comment 'GitLab Runner' --create-home gitlab-runner --shell /bin/bash
3.注册runner
https://docs.gitlab.com/runner/register/index.html
gitlab-runner相关配置位置
4.安装并启动服务
sudo gitlab-runner install --user=gitlab-runner --working-directory=/home/gitlab-runner
sudo gitlab-runner start
更新操作
1.停止服务
sudo gitlab-runner stop
2.下载新版本并设置执行权限
sudo wget -O /usr/local/bin/gitlab-runner https://gitlab-ci-multi-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-ci-multi-runner-linux-amd64
sudo chmod +x /usr/local/bin/gitlab-runner
3.启动服务
sudo gitlab-runner start