mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
71 lines
1.6 KiB
Plaintext
71 lines
1.6 KiB
Plaintext
// Module included in the following assemblies:
|
|
//
|
|
// * cli_reference/openshift_cli/getting-started.adoc
|
|
// * microshift_cli_ref/microshift_oc_cli_install.adoc
|
|
|
|
:_content-type: PROCEDURE
|
|
[id="cli-installing-cli-rpm_{context}"]
|
|
= Installing the OpenShift CLI by using an RPM
|
|
|
|
For {op-system-base-full}, you can install the OpenShift CLI (`oc`) as an RPM if you have an active {product-title} subscription on your Red Hat account.
|
|
|
|
.Prerequisites
|
|
|
|
* Must have root or sudo privileges.
|
|
|
|
.Procedure
|
|
|
|
. Register with Red Hat Subscription Manager:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
# subscription-manager register
|
|
----
|
|
|
|
. Pull the latest subscription data:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
# subscription-manager refresh
|
|
----
|
|
|
|
. List the available subscriptions:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
# subscription-manager list --available --matches '*OpenShift*'
|
|
----
|
|
|
|
. In the output for the previous command, find the pool ID for an {product-title} subscription and attach the subscription to the registered system:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
# subscription-manager attach --pool=<pool_id>
|
|
----
|
|
|
|
. Enable the repositories required by {product-title} {product-version}.
|
|
+
|
|
[source,terminal]
|
|
----
|
|
# subscription-manager repos --enable="rhocp-4.13-for-rhel-8-x86_64-rpms"
|
|
----
|
|
+
|
|
[NOTE]
|
|
====
|
|
It is not supported to install the OpenShift CLI (`oc`) as an RPM for {op-system-base-full} 9. You must install the OpenShift CLI for {op-system-base} 9 by downloading the binary.
|
|
====
|
|
|
|
. Install the `openshift-clients` package:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
# yum install openshift-clients
|
|
----
|
|
|
|
After you install the CLI, it is available using the `oc` command:
|
|
|
|
[source,terminal]
|
|
----
|
|
$ oc <command>
|
|
----
|