Cloud SDK is available in package format for installation on Red Hat Enterprise Linux 7, Red Hat
Enterprise Linux 8, and CentOS 7 systems. This package contains the gcloud
,
gcloud alpha
, gcloud beta
, gsutil
, and bq
commands only. It does not include kubectl
or the App Engine extensions required to
deploy an application using gcloud
commands, which can be
installed separately.
Note: If you are using an instance on Google Compute Engine, Cloud SDK is installed by default.
- Update YUM with Cloud SDK repo information:
sudo tee -a /etc/yum.repos.d/google-cloud-sdk.repo << EOM [google-cloud-sdk] name=Google Cloud SDK baseurl=https://packages.cloud.google.com/yum/repos/cloud-sdk-el7-x86_64 enabled=1 gpgcheck=1 repo_gpgcheck=1 gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg EOM
Important: The second line of
gpgkey
must be indented as shown. - Install the Cloud SDK:
yum install google-cloud-sdk
Note: For additionalyum
options, such as disabling prompts or dry runs, refer to theyum
man pages. - Optionally, install any of these
additional components:
google-cloud-sdk-app-engine-python
google-cloud-sdk-app-engine-python-extras
google-cloud-sdk-app-engine-java
google-cloud-sdk-app-engine-go
google-cloud-sdk-bigtable-emulator
google-cloud-sdk-datalab
google-cloud-sdk-datastore-emulator
google-cloud-sdk-cbt
google-cloud-sdk-cloud-build-local
google-cloud-sdk-pubsub-emulator
kubectl
For example, the
google-cloud-sdk-app-engine-java
component can be installed as follows:yum install google-cloud-sdk-app-engine-java
- Run
gcloud init
to get started:gcloud init
Downgrading Cloud SDK versions
If you'd like to revert to a specific version of Cloud SDK, where VERSION
is
of the form 123.0.0
, run:
sudo yum downgrade google-cloud-sdk-VERSION