github.com/hugorut/terraform@v1.1.3/website/docs/cli/install/yum.mdx (about)

     1  ---
     2  page_title: 'Yum Packages for Red Hat Enterprise Linux, Fedora, and Amazon Linux'
     3  description: >-
     4    The HashiCorp Yum repositories contain distribution-specific Terraform
     5    packages for Red Hat Enterprise Linux, Fedora, and Amazon Linux systems.
     6  ---
     7  
     8  # Yum/DNF Packages for RHEL, CentOS, and Fedora
     9  
    10  The primary distribution packages for Terraform are `.zip` archives containing
    11  single executable files that you can extract anywhere on your system. However,
    12  for easier integration with configuration management tools and other systematic
    13  system configuration strategies, we also offer package repositories for
    14  RedHat Enterprise Linux, Fedora, and Amazon Linux systems, which allow you to
    15  install Terraform using the `yum install` or `dnf install` commands.
    16  
    17  If you are instead using Debian or Ubuntu, you
    18  might prefer to [install Terraform from our APT repositories](/cli/install/apt).
    19  
    20  -> **Note:** The Yum repositories discussed on this page are generic HashiCorp
    21  repositories that contain packages for a variety of different HashiCorp
    22  products, rather than just Terraform. Adding these repositories to your
    23  system will, by default, therefore make a number of other non-Terraform
    24  packages available for installation. That might then mask the packages that are
    25  available for some HashiCorp products in the main distribution repositories.
    26  
    27  ## Repository Configuration
    28  
    29  Before adding a repository you must determine which distribution you are using.
    30  The following command lines refer to a placeholder variable `$release` which
    31  you must replace with the appropriate value from the following list:
    32  
    33  * Red Hat Enterprise Linux: `RHEL`
    34  * Fedora: `fedora`
    35  * Amazon Linux: `AmazonLinux`
    36  
    37  If you are using a Yum-based distribution, add the repository using
    38  `yum-config-manager` as follows:
    39  
    40  ```bash
    41  sudo yum install -y yum-utils
    42  sudo yum-config-manager --add-repo https://rpm.releases.hashicorp.com/$release/hashicorp.repo
    43  ```
    44  
    45  If you are using a DNF-based distribution, add the repository using
    46  `dnf config-manager` as follows:
    47  
    48  ```bash
    49  sudo dnf install -y dnf-plugins-core
    50  sudo dnf config-manager --add-repo https://rpm.releases.hashicorp.com/$release/hashicorp.repo
    51  ```
    52  
    53  In both cases, the Terraform package name is `terraform`. For example:
    54  
    55  ```bash
    56  yum install terraform
    57  ```
    58  
    59  ## Supported Architectures
    60  
    61  The HashiCorp Yum/DNF server currently has packages only for the `x86_64`
    62  architecture, which is also sometimes known as `amd64`.
    63  
    64  There are no official packages available for other architectures, such as
    65  `aarch64`. If you wish to use Terraform on a non-`x86_64` system,
    66  [download a normal release `.zip` file](/downloads) instead.
    67  
    68  ## Supported Distribution Releases
    69  
    70  The HashiCorp Yum server currently contains release repositories for the
    71  following distribution releases:
    72  
    73  * AmazonLinux 2
    74  * Fedora 29
    75  * Fedora 30
    76  * Fedora 31
    77  * Fedora 32
    78  * Fedora 33
    79  * RHEL 7 (and CentOS 7)
    80  * RHEL 8 (and CentOS 8)
    81  
    82  No repositories are available for other versions of these distributions or for
    83  any other RPM-based Linux distributions. If you add the repository using
    84  the above commands on other systems then you will see a 404 Not Found error.
    85  
    86  Over time we will change the set of supported distributions, including both
    87  adding support for new releases and ceasing to publish new Terraform versions
    88  under older releases.
    89  
    90  ## Choosing Terraform Versions
    91  
    92  The HashiCorp Yum repositories contain multiple versions of Terraform, but
    93  because the packages are all named `terraform` it is impossible to install
    94  more than one version at a time, and `yum install` or `dnf install` will
    95  default to selecting the latest version.
    96  
    97  It's often necessary to match your Terraform version with what a particular
    98  configuration is currently expecting. You can use the following command to
    99  see which versions are currently available in the repository index:
   100  
   101  ```bash
   102  yum --showduplicate list terraform
   103  ```
   104  
   105  You can select a specific version to install by including it in the
   106  `yum install` command line, as follows:
   107  
   108  ```bash
   109  yum install terraform-0.14.0-2.x86_64
   110  ```
   111  
   112  If you are using a DNF-based distribution, similar use `dnf` instead of `yum`
   113  when following the above steps.
   114  
   115  If your workflow requires using multiple versions of Terraform at the same
   116  time, for example when working through a gradual upgrade where not all
   117  of your configurations are upgraded yet, we recommend that you use the
   118  official release `.zip` files instead of the Yum packages, so you can install
   119  multiple versions at once and then select which to use for each command you
   120  run.