Back to Opentofu

Installing OpenTofu on RHEL, openSUSE, AlmaLinux and other RPM-based distributions

website/docs/intro/install/rpm.mdx

1.11.61.9 KB
Original Source

import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import CodeBlock from '@theme/CodeBlock'; import RpmConvenienceScript from '!!raw-loader!./examples/rpm-convenience.sh' import YumRepoScript from '!!raw-loader!./examples/repo-yum.sh' import ZypperRepoScript from '!!raw-loader!./examples/repo-zypper.sh' import YumInstallScript from '!!raw-loader!./examples/install-yum.sh' import ZypperInstallScript from '!!raw-loader!./examples/install-zypper.sh' import Buildkite from "./buildkite";

Installing OpenTofu on RHEL, openSUSE, AlmaLinux and other RPM-based distributions

<Buildkite />

You can install OpenTofu from our RPM repository by following the step-by-step instructions below.

Installing using the installer

You can use the OpenTofu installer script to run the installation.

<CodeBlock language="bash">{RpmConvenienceScript}</CodeBlock>

Step-by-step instructions

The following steps explain how to set up the OpenTofu RPM repositories. These instructions should work on most RPM-based Linux systems.

Adding the OpenTofu repository

<Tabs> <TabItem value="redhat" label="Yum (RHEL/AlmaLinux/etc.)" default> Create the <code>/etc/yum.repos.d/opentofu.repo</code> file by running the following command: <CodeBlock language={"bash"}>{YumRepoScript}</CodeBlock> </TabItem> <TabItem value="opensuse-leap" label="Zypper (openSUSE)"> Create the <code>/etc/zypp/repos.d/opentofu.repo</code> file by running the following command: <CodeBlock language={"bash"}>{ZypperRepoScript}</CodeBlock> </TabItem> </Tabs>

Installing OpenTofu

Now you install OpenTofu by running:

<Tabs> <TabItem value="redhat" label="Yum (RHEL/AlmaLinux/etc)" default> <CodeBlock language={"bash"}>{YumInstallScript}</CodeBlock> </TabItem> <TabItem value="opensuse-leap" label="Zypper (openSUSE)"> <CodeBlock language={"bash"}>{ZypperInstallScript}</CodeBlock> </TabItem> </Tabs>