gitlab.com/jfprevost/gitlab-runner-notlscheck@v11.11.4+incompatible/docs/install/linux-manually.md (about)

     1  ---
     2  last_updated: 2017-10-09
     3  ---
     4  
     5  # Install GitLab Runner manually on GNU/Linux
     6  
     7  If you don't want to use a [deb/rpm repository](linux-repository.md) to install
     8  GitLab Runner, or your GNU/Linux OS is not among the supported ones, you can
     9  install it manually.
    10  
    11  Make sure that you read the [FAQ](../faq/README.md) section which describes
    12  some of the most common problems with GitLab Runner.
    13  
    14  ## Install
    15  
    16  CAUTION: **Important:**
    17  With GitLab Runner 10, the executable was renamed to `gitlab-runner`. If you
    18  want to install a version prior to GitLab Runner 10, [visit the old docs](old.md).
    19  
    20  1. Simply download one of the binaries for your system:
    21  
    22      ```sh
    23      # Linux x86-64
    24      sudo wget -O /usr/local/bin/gitlab-runner https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-linux-amd64
    25  
    26      # Linux x86
    27      sudo wget -O /usr/local/bin/gitlab-runner https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-linux-386
    28  
    29      # Linux arm
    30      sudo wget -O /usr/local/bin/gitlab-runner https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-linux-arm
    31      ```
    32  
    33      You can download a binary for every available version as described in
    34      [Bleeding Edge - download any other tagged release](bleeding-edge.md#download-any-other-tagged-release).
    35  
    36  1. Give it permissions to execute:
    37  
    38      ```sh
    39      sudo chmod +x /usr/local/bin/gitlab-runner
    40      ```
    41  
    42  1. Optionally, if you want to use Docker, install Docker with:
    43  
    44      ```sh
    45      curl -sSL https://get.docker.com/ | sh
    46      ```
    47  
    48  1. Create a GitLab CI user:
    49  
    50      ```sh
    51      sudo useradd --comment 'GitLab Runner' --create-home gitlab-runner --shell /bin/bash
    52      ```
    53  
    54  1. Install and run as service:
    55  
    56      ```sh
    57      sudo gitlab-runner install --user=gitlab-runner --working-directory=/home/gitlab-runner
    58      sudo gitlab-runner start
    59      ```
    60  
    61  1. [Register the Runner](../register/index.md)
    62  
    63  NOTE: **Note**
    64  If `gitlab-runner` is installed and run as service (what is described
    65  in this page), it will run as root, but will execute jobs as user specified by
    66  the `install` command. This means that some of the job functions like cache and
    67  artifacts will need to execute `/usr/local/bin/gitlab-runner` command,
    68  therefore the user under which jobs are run, needs to have access to the executable.
    69  
    70  ## Update
    71  
    72  1. Stop the service (you need elevated command prompt as before):
    73  
    74      ```sh
    75      sudo gitlab-runner stop
    76      ```
    77  
    78  1. Download the binary to replace Runner's executable:
    79  
    80      ```sh
    81      sudo wget -O /usr/local/bin/gitlab-runner https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-linux-386
    82      sudo wget -O /usr/local/bin/gitlab-runner https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-linux-amd64
    83      ```
    84  
    85      You can download a binary for every available version as described in
    86      [Bleeding Edge - download any other tagged release](bleeding-edge.md#download-any-other-tagged-release).
    87  
    88  1. Give it permissions to execute:
    89  
    90      ```sh
    91      sudo chmod +x /usr/local/bin/gitlab-runner
    92      ```
    93  
    94  1. Start the service:
    95  
    96      ```sh
    97      sudo gitlab-runner start
    98      ```