如何在 Linux Mint 20 上安装 Google Cloud SDK

Linux命令3年前 (2021)发布 AI观察员
168 0 0

Google Cloud SDK(软件开发工具包)提供了一组用于管理托管在 Linux Mint 上的资源的工具谷歌云平台 (GCP)。Good Cloud SDK 提供了许多重要的命令行工具,例如gcloud,gsutil并且bq可以有效管理 Google Cloud 中的应用程序和其他资源如何在 Linux Mint 20 上安装 Google Cloud SDK

Linux Mint 20 Ulyana 上安装 Google Cloud SDK

步骤 1. 在运行下面的教程之前,通过apt在终端中运行以下命令来确保您的系统是最新的很重要:

sudo apt updatesudo aptinstall apt-transport-https ca-certificates gnupg

步骤 2. 在 Linux Mint 20 上安装 Google Cloud SDK。

默认情况下,Google Cloud SDK 在 Linux Mint 基础存储库中不可用。现在我们使用以下命令将 Google Cloud 代码库添加到您的系统中:

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

接下来,导入 Google Cloud 公钥:

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

最后,使用以下命令安装 Google SDK:

sudo aptupdatesudo aptinstall google-cloud-sdk

(可选)安装以下任何附加组件

    • 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-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

例如,该组件可以如下安装:google-cloud-sdk-datastore-emulator

sudo aptinstallgoogle-cloud-sdk-datastore-emulator

在您的 Linux Mint 系统上成功安装 Google Cloud SDK 后,通过运行以下命令对其进行初始化:

$ gcloud init
Welcome! This command will take you through the configuration of gcloud.

Your current configuration has been set to: [default]

You can skip diagnostics next time by using the following flag:
  gcloud init --skip-diagnostics

Network diagnostic detects and fixes local network connection issues.
Checking network connection...done.                                            
Reachability Check passed.
Network diagnostic passed (1/1 checks passed).

You must log in to continue. Would you like to log in (Y/n)?

完成屏幕上的说明以初始化您的系统。有关更多详细信息,请阅读官方说明以初始化 Cloud SDK环境。

感谢您使用本教程在 Linux Mint 系统上安装最新版本的 Google Cloud SDK。如需其他帮助或有用信息,我们建议您查看官方 Google Cloud 网站

© 版权声明

相关文章

天猫U特购  京东优惠购        京东优惠    天猫优惠