github.com/secure-build/gitlab-runner@v12.5.0+incompatible/docs/install/linux-repository.md (about) 1 --- 2 last_updated: 2017-10-12 3 --- 4 5 # Install GitLab Runner using the official GitLab repositories 6 7 We provide packages for the currently supported versions of Debian, Ubuntu, Mint, RHEL, Fedora, and CentOS. 8 9 | Distribution | Version | End of Life date | 10 |--------------|----------------------------|-----------------------| 11 | Debian | stretch | approx. 2022 | 12 | Debian | jessie | June 2020 | 13 | Ubuntu | bionic | April 2023 | 14 | Ubuntu | xenial | April 2021 | 15 | Mint | sonya | approx. 2021 | 16 | Mint | serena | approx. 2021 | 17 | Mint | sarah | approx. 2021 | 18 | RHEL/CentOS | 7 | June 2024 | 19 | RHEL/CentOS | 6 | November 2020 | 20 | Fedora | 29 | approx. November 2019 | 21 22 ## Prerequisites 23 24 If you want to use the [Docker executor], make sure to install Docker before 25 using the Runner. [Read how to install Docker for your distribution](https://docs.docker.com/engine/installation/). 26 27 ## Installing the Runner 28 29 CAUTION: **Important:** 30 If you are using or upgrading from a version prior to GitLab Runner 10, read how 31 to [upgrade to the new version](#upgrading-to-gitlab-runner-10). If you want 32 to install a version prior to GitLab Runner 10, [visit the old docs](old.md). 33 34 To install the Runner: 35 36 1. Add GitLab's official repository: 37 38 ```bash 39 # For Debian/Ubuntu/Mint 40 curl -L https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.deb.sh | sudo bash 41 42 # For RHEL/CentOS/Fedora 43 curl -L https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.rpm.sh | sudo bash 44 ``` 45 46 NOTE: **Note:** 47 Debian users should use [APT pinning](#apt-pinning). 48 49 1. Install the latest version of GitLab Runner, or skip to the next step to 50 install a specific version: 51 52 ```bash 53 # For Debian/Ubuntu/Mint 54 sudo apt-get install gitlab-runner 55 56 # For RHEL/CentOS/Fedora 57 sudo yum install gitlab-runner 58 ``` 59 60 1. To install a specific version of GitLab Runner: 61 62 ```bash 63 # for DEB based systems 64 apt-cache madison gitlab-runner 65 sudo apt-get install gitlab-runner=10.0.0 66 67 # for RPM based systems 68 yum list gitlab-runner --showduplicates | sort -r 69 sudo yum install gitlab-runner-10.0.0-1 70 ``` 71 72 1. [Register the Runner](../register/index.md) 73 74 After completing the step above, the Runner should be started already being 75 ready to be used by your projects! 76 77 Make sure that you read the [FAQ](../faq/README.md) section which describes 78 some of the most common problems with GitLab Runner. 79 80 ### APT pinning 81 82 A native package called `gitlab-ci-multi-runner` is available in 83 Debian Stretch. By default, when installing `gitlab-runner`, that package 84 from the official repositories will have a higher priority. 85 86 If you want to use our package, you should manually set the source of 87 the package. The best way is to add the pinning configuration file. 88 89 If you do this, the next update of the Runner's package - whether it will 90 be done manually or automatically - will be done using the same source: 91 92 ```bash 93 cat <<EOF | sudo tee /etc/apt/preferences.d/pin-gitlab-runner.pref 94 Explanation: Prefer GitLab provided packages over the Debian native ones 95 Package: gitlab-runner 96 Pin: origin packages.gitlab.com 97 Pin-Priority: 1001 98 EOF 99 ``` 100 101 ## Updating the Runner 102 103 Simply execute to install latest version: 104 105 ```bash 106 # For Debian/Ubuntu/Mint 107 sudo apt-get update 108 sudo apt-get install gitlab-runner 109 110 # For RHEL/CentOS/Fedora 111 sudo yum update 112 sudo yum install gitlab-runner 113 ``` 114 115 ## Manually download packages 116 117 You can manually download the packages from the following URL: 118 <https://packages.gitlab.com/runner/gitlab-runner> 119 120 ## Upgrading to GitLab Runner 10 121 122 To upgrade GitLab Runner from a version prior to 10.0: 123 124 1. Remove the old repository: 125 126 ``` 127 # For Debian/Ubuntu/Mint 128 sudo rm /etc/apt/sources.list.d/runner_gitlab-ci-multi-runner.list 129 130 # For RHEL/CentOS/Fedora 131 sudo rm /etc/yum.repos.d/runner_gitlab-ci-multi-runner.repo 132 ``` 133 134 1. Follow the same steps when [installing the Runner](#installing-the-runner), 135 **without registering it** and using the new repository. 136 137 1. For RHEL/CentOS/Fedora, run: 138 139 ``` 140 sudo /usr/share/gitlab-runner/post-install 141 ``` 142 143 CAUTION: **Important:** If you don't run the above command, you will be left 144 with no service file. Follow [issue #2786](https://gitlab.com/gitlab-org/gitlab-runner/issues/2786) 145 for more information. 146 147 [docker executor]: ../executors/docker.md