mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 21:46:22 +01:00
139 lines
5.1 KiB
Plaintext
139 lines
5.1 KiB
Plaintext
// Module included in the following assemblies:
|
|
//
|
|
// * cli_reference/openshift_cli/getting-started.adoc
|
|
// * installing/installing_aws/installing-aws-user-infra.adoc
|
|
// * installing/installing_aws/installing-aws-customizations.adoc
|
|
// * installing/installing_aws/installing-aws-default.adoc
|
|
// * installing/installing_aws/installing-aws-network-customizations.adoc
|
|
// * installing/installing_aws/installing-aws-private.adoc
|
|
// * installing/installing_aws/installing-aws-vpc.adoc
|
|
// * installing/installing_azure/installing-azure-customizations.adoc
|
|
// * installing/installing_azure/installing-azure-default.adoc
|
|
// * installing/installing_azure/installing-azure-private.adoc
|
|
// * installing/installing_azure/installing-azure-vnet.adoc
|
|
// * installing/installing_azure/installing-azure-user-infra.adoc
|
|
// * installing/installing_bare_metal/installing-bare-metal.adoc
|
|
// * installing/installing_gcp/installing-gcp-customizations.adoc
|
|
// * installing/installing_gcp/installing-gcp-private.adoc
|
|
// * installing/installing_gcp/installing-gcp-default.adoc
|
|
// * installing/installing_gcp/installing-gcp-vpc.adoc
|
|
// * installing/installing_gcp/installing-gcp-user-infra.adoc
|
|
// * installing/install_config/installing-restricted-networks-preparations.adoc
|
|
// * installing/installing_vsphere/installing-vsphere.adoc
|
|
// * installing/installing_ibm_z/installing-ibm-z.adoc
|
|
// * openshift_images/samples-operator-alt-registry.adoc
|
|
// * installing/installing_rhv/installing-rhv-customizations.adoc
|
|
// * installing/installing_rhv/installing-rhv-default.adoc
|
|
//
|
|
// AMQ docs link to this; do not change anchor
|
|
|
|
[id="cli-installing-cli_{context}"]
|
|
= Installing the CLI by downloading the binary
|
|
|
|
You can install the OpenShift CLI (`oc`) in order to interact with {product-title} from a
|
|
command-line interface. You can install `oc` on Linux, Windows, or macOS.
|
|
|
|
[IMPORTANT]
|
|
====
|
|
If you installed an earlier version of `oc`, you cannot use it to complete all
|
|
of the commands in {product-title} {product-version}. Download and
|
|
install the new version of `oc`.
|
|
====
|
|
|
|
[id="cli-installing-cli-on-linux_{context}"]
|
|
== Installing the CLI on Linux
|
|
|
|
You can install the OpenShift CLI (`oc`) binary on Linux by using the following procedure.
|
|
|
|
.Procedure
|
|
|
|
ifdef::openshift-origin[]
|
|
. Navigate to https://mirror.openshift.com/pub/openshift-v4/clients/oc/latest/ and choose the folder for your operating system and architecture.
|
|
. Download `oc.tar.gz`.
|
|
endif::[]
|
|
ifndef::openshift-origin[]
|
|
. Navigate to the link:https://cloud.redhat.com/openshift/install[Infrastructure Provider] page on the {cloud-redhat-com} site.
|
|
. Select your infrastructure provider, and, if applicable, your installation type.
|
|
. In the *Command-line interface* section, select *Linux* from the drop-down menu and click *Download command-line tools*.
|
|
endif::[]
|
|
. Unpack the archive:
|
|
+
|
|
----
|
|
$ tar xvzf <file>
|
|
----
|
|
. Place the `oc` binary in a directory that is on your `PATH`.
|
|
+
|
|
To check your `PATH`, execute the following command:
|
|
+
|
|
----
|
|
$ echo $PATH
|
|
----
|
|
|
|
After you install the CLI, it is available using the `oc` command:
|
|
|
|
----
|
|
$ oc <command>
|
|
----
|
|
|
|
[id="cli-installing-cli-on-windows_{context}"]
|
|
== Installing the CLI on Windows
|
|
|
|
You can install the OpenShift CLI (`oc`) binary on Windows by using the following procedure.
|
|
|
|
.Procedure
|
|
|
|
ifdef::openshift-origin[]
|
|
. Navigate to https://mirror.openshift.com/pub/openshift-v4/clients/oc/latest/ and choose the folder for your operating system and architecture.
|
|
. Download `oc.zip`.
|
|
endif::[]
|
|
ifndef::openshift-origin[]
|
|
. Navigate to the link:https://cloud.redhat.com/openshift/install[Infrastructure Provider] page on the {cloud-redhat-com} site.
|
|
. Select your infrastructure provider, and, if applicable, your installation type.
|
|
. In the *Command-line interface* section, select *Windows* from the drop-down menu and click *Download command-line tools*.
|
|
endif::[]
|
|
. Unzip the archive with a ZIP program.
|
|
. Move the `oc` binary to a directory that is on your `PATH`.
|
|
+
|
|
To check your `PATH`, open the command prompt and execute the following command:
|
|
+
|
|
----
|
|
C:\> path
|
|
----
|
|
|
|
After you install the CLI, it is available using the `oc` command:
|
|
|
|
----
|
|
C:\> oc <command>
|
|
----
|
|
|
|
[id="cli-installing-cli-on-macos_{context}"]
|
|
== Installing the CLI on macOS
|
|
|
|
You can install the OpenShift CLI (`oc`) binary on macOS by using the following procedure.
|
|
|
|
.Procedure
|
|
|
|
ifdef::openshift-origin[]
|
|
. Navigate to https://mirror.openshift.com/pub/openshift-v4/clients/oc/latest/ and choose the folder for your operating system and architecture.
|
|
. Download `oc.tar.gz`.
|
|
endif::[]
|
|
ifndef::openshift-origin[]
|
|
. Navigate to the link:https://cloud.redhat.com/openshift/install[Infrastructure Provider] page on the {cloud-redhat-com} site.
|
|
. Select your infrastructure provider, and, if applicable, your installation type.
|
|
. In the *Command-line interface* section, select *MacOS* from the drop-down menu and click *Download command-line tools*.
|
|
endif::[]
|
|
. Unpack and unzip the archive.
|
|
. Move the `oc` binary to a directory on your PATH.
|
|
+
|
|
To check your `PATH`, open a terminal and execute the following command:
|
|
+
|
|
----
|
|
$ echo $PATH
|
|
----
|
|
|
|
After you install the CLI, it is available using the `oc` command:
|
|
|
|
----
|
|
$ oc <command>
|
|
----
|