banner



How To Install Google Sdk

In this tutorial, nosotros will larn to install Google Cloud SDK in Linux machines (Ubuntu, CentOS etc), merely before nosotros do that, we must know what Google Cloud SDK is & what prerequisites does the cloud SDK has.

Google Cloud SDK is used to manage the google deject platform using the CLI, command-line interface of your system's terminal. Google Cloud SDK is basically a drove of tools/commands like bq, gcloud, gsutil, etc for the management of our deject resource. It supports Linux, Mac & Windows as well.

So for prerequisites, Google cloud SDK needs to have python installed on our Linux. Information technology needs to have python version 2.7.9 or college or Python three.5 to 3.seven. You can also refer to the following tutorials to install python on Ubuntu & on CentOS .

Recommended Read: Easy fashion to install AWS CLI on Linux

Also Read: Simple guide to install TERRAFORM on Linux


Install Google Deject SDK on Ubuntu -Debian


For installing Google Cloud SDK on Ubuntu or Debian, we demand to add together google repository & and then install it using apt-get. So run the following command to add the google SDK URL as package source,

$ echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt deject-sdk primary" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.listing

Next, we need to install the apt-transport-https parcel, if non already installed,

$ sudo apt-go install apt-transport-https ca-certificates gnupg

At present, import the google deject public key with the following control,

$ gyre https://packages.cloud.google.com/apt/doc/apt-primal.gpg | sudo apt-key --keyring /usr/share/keyrings/cloud.google.gpg add -

& now as the last step, we need to install the google cloud sdk,

$ sudo apt-get update && sudo apt-get install google-cloud-sdk

Now nosotros have cloud SDK installed on our Ubuntu or Debian system, next we run the post-obit command to configure the SDK,

$ gcloud init

In one case yous run the command, you lot would exist asked to log in to your account, press 'y' to go along. And so we will be given a long URL as the output on the screen,

install google cloud sdk Ubuntu Centos

Copy the URL & open up in a web browser. We volition then be asked to enter the GCP account details (username & password), upon successful authentication we will exist given a verification code,

install google cloud sdk Ubuntu Centos

Paste this code to the last window & we will be logged in to Google-cloud-SDK on that arrangement. Google init command will and then ask to select the projection, region, etc. Select those & we are gear up to use the Google cloud sdk commands.


Install Google Cloud SDK on Redhat/CentOS/Fedora


Like to how nosotros did information technology for Ubuntu, we demand to add the Google deject repo on CentOS/RedHat/Fedora system with the following command,

$ sudo tee -a /etc/yum.repos.d/google-cloud-sdk.repo << EOM

[google-deject-sdk]

name=Google Cloud SDK

baseurl=https://packages.cloud.google.com/yum/repos/deject-sdk-el7-x86_64

enabled=1

gpgcheck=1

repo_gpgcheck=1

gpgkey=https://packages.cloud.google.com/yum/dr./yum-key.gpg

       https://packages.deject.google.com/yum/md/rpm-package-key.gpg

EOM

Now we can just install cloud sdk,

$ yum install google-deject-sdk

Now run the gcloud init command to configure the SDK,

$ gcloud init

Rest steps are the same as maintained to a higher place.


Install additional packages for Google Cloud SDK


There are many other packages that are non installed by default but can be installed manually later. Packages like,

  • 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-deject-sdk-cbt
  • google-cloud-sdk-cloud-build-local
  • google-cloud-sdk-datalab
  • google-cloud-sdk-datastore-emulator
  • google-cloud-sdk-firestore-emulator
  • google-cloud-sdk-pubsub-emulator
  • kubectl

To install any of these packages, we tin can run the post-obit commands,

Ubuntu/Debian

$ sudo apt-get install google-cloud-sdk-app-engine-python

RedHat/CentOS/Fedora

$ sudo yum install google-cloud-sdk-app-engine-python


Install Google SDK on Linux


For other Linux distributions that are non based on Debian or Redhat, we can also use the install script to install SDK on them. There are dissever scripts available for 32 & 64-bit machines, download them using the respective control mentioned beneath,

Linux 64 flake install script

$ wget https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-deject-sdk-307.0.0-linux-x86_64.tar.gz

Linux 32 bit Install script

$ wget https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-deject-sdk-307.0.0-linux-x86.tar.gz

Now excerpt the gz file with the post-obit control,

$ tar -xvzf google-cloud-sdk-307.0.0-linux-x86_64.tar.gz

& now we demand to run the install script located inside the extracted folder,

$ cd google-deject-sdk

$ ./install.sh

Open up the script has been completed, we tin open a new terminal to apply the installed sdk. To configure the sdk, execute the following command,

$ cd google-cloud-sdk

$ ./bin/gcloud init

Note :- Instances on Google Cloud come with Google cloud SDK installed past default.

And then that's it for our tutorial on the installation of Google Cloud sdk. Please feel free to transport in whatsoever questions/queries, or suggestions using the comment box beneath.

If y'all think we have helped you or but want to back up the states, please consider these:-

Connect to the states: Facebook | Twitter

Linux TechLab is thankful for your connected support.

Source: https://linuxtechlab.com/how-to-install-google-cloud-sdk-in-linux/

Posted by: edwardspacts1965.blogspot.com

0 Response to "How To Install Google Sdk"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel