# For Debian/Ubuntu/Mintcurl-Lhttps://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.deb.sh|sudobash# For RHEL/CentOS/Fedoracurl-Lhttps://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.rpm.sh|sudobash# install# For Debian/Ubuntu/Mintsudoapt-getinstallgitlab-runner# For RHEL/CentOS/Fedorasudoyuminstallgitlab-runner# for DEB based systemsapt-cachemadisongitlab-runnersudoapt-getinstallgitlab-runner=10.0.0# for RPM based systemsyumlistgitlab-runner--showduplicates|sort-rsudoyuminstallgitlab-runner-10.0.0-1
方法二: FreeBSD 安装(推荐)
# Linux x86-64sudowget-O/usr/local/bin/gitlab-runnerhttps://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-linux-amd64# Linux x86sudowget-O/usr/local/bin/gitlab-runnerhttps://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-linux-386# Linux armsudowget-O/usr/local/bin/gitlab-runnerhttps://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-linux-arm# 添加执行权限sudochmod+x/usr/local/bin/gitlab-runner# 创建一个gitlab-ci用户sudouseradd--comment'GitLab Runner'--create-homegitlab-runner--shell/bin/bash# 安装并启动服务sudogitlab-runnerinstall--user=gitlab-runner--working-directory=/home/gitlab-runnersudogitlab-runnerstart
方法三: 通过 deb 安装 可能大家在使用方法一安装提示:无法定位到软件包 gitlab-runner , 那么可以使用这种方式手动安装 地址
# For Debian/Ubuntu/Mintdpkg-igitlab-runner_<arch>.deb# For RHEL/CentOS/Fedorarpm-igitlab-runner_<arch>.rpm
# 可以在log看到如下提示# Tip: built files are meant to be served over an HTTP server.# Opening index.html over file:// won't work.# 全局安装http-servernpminstall-ghttp-server# 进入dist目录,启用cddist&&hs