1080*80 ad

Install gcloud CLI on CentOS 9

Installing the Google Cloud CLI on CentOS 9 is essential for managing your Google Cloud resources directly from your terminal. This guide walks you through the definitive steps to get it set up correctly.

First, you need to configure your system to access the official Google Cloud repository. This ensures you get the latest updates and stable versions. Create a new repository file using your preferred text editor:

sudo nano /etc/yum.repos.d/google-cloud-sdk.repo

Paste the following content into this file:

[google-cloud-cli]
name=Google Cloud CLI
baseurl=https://packages.cloud.google.com/yum/repos/cloud-sdk-el9-x86_64
enabled=1
gpgcheck=1
repo_gpgcheck=0
gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg
       https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg

Save the file and exit the editor.

Next, import the Google Cloud public keys. This verifies the authenticity of the packages you download from the repository.

sudo rpm --import https://packages.cloud.google.com/yum/doc/yum-key.gpg https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg

Now, you can install the Google Cloud CLI package using the dnf package manager, which is the standard for CentOS 9:

sudo dnf install google-cloud-cli

Confirm the installation when prompted. dnf will download and install the main CLI package along with any required dependencies.

Once the installation is complete, it’s highly recommended to initialize the gcloud environment. This involves configuring settings like your default project, region, and user account.

gcloud init

Follow the prompts provided by the gcloud init command. You will be asked to log in to your Google account, select a cloud project, and potentially configure other default settings.

After running gcloud init, your Google Cloud CLI is fully installed and configured on your CentOS 9 system, ready for you to start managing your cloud resources efficiently from the command line.

Source: https://infotechys.com/google-cloud-cli-on-centos-9/

900*80 ad

      1080*80 ad