Linux 環境へ https://sdk.cloud.google.com からインストールするには以下を実行します。
1
curl https://sdk.cloud.google.com | bash
実行中に幾つか、確認事項があります。
12345
Installation directory (this will create a google-cloud-sdk subdirectory) (/root):
Do you want to help improve the Google Cloud SDK (y/N)?
Do you want to continue (Y/n)?
Enter a path to an rc file to update, or leave blank to use
[/root/.bashrc]:
インストールが完了したら ~/.bashrc に下記が追加されていました。
12345
# The next line updates PATH for the Google Cloud SDK.if[ -f '/root/google-cloud-sdk/path.bash.inc']; then . '/root/google-cloud-sdk/path.bash.inc'; fi# The next line enables shell command completion for gcloud.if[ -f '/root/google-cloud-sdk/completion.bash.inc']; then . '/root/google-cloud-sdk/completion.bash.inc'; fi
# ./google-cloud-sdk/install.sh --help
Welcome to the Google Cloud SDK!
WARNING: You appear to be running this script as root. This may cause
the installation to be inaccessible to users other than the root user.
usage: install.py [-h][--usage-reporting USAGE_REPORTING][--screen-reader SCREEN_READER][--rc-path RC_PATH][--command-completion COMMAND_COMPLETION][--path-update PATH_UPDATE][--disable-installation-options][--override-components [OVERRIDE_COMPONENTS [OVERRIDE_COMPONENTS ...]]][--additional-components ADDITIONAL_COMPONENTS [ADDITIONAL_COMPONENTS ...]][--quiet][--install-python INSTALL_PYTHON]
optional arguments:
-h, --help show this help message and exit
--usage-reporting USAGE_REPORTING
(true/false) Enable anonymous usage reporting.
--screen-reader SCREEN_READER
(true/false) Enable screen reader mode.
--rc-path RC_PATH Profile to update with PATH and completion. If given
without --command-completion or --path-update in"quiet" mode, a line will be added to this profile for
both command completion and path updating.
--command-completion COMMAND_COMPLETION, --bash-completion COMMAND_COMPLETION
(true/false) Add a line forcommand completion in the
profile. In "quiet" mode, if True and you do not
provide--rc-path, the default profile will be updated.
--path-update PATH_UPDATE
(true/false) Add a line for path updating in the
profile. In "quiet" mode, if True and you do not
provide --rc-path, the default profile will be
updated.
--disable-installation-options
DEPRECATED. This flag is no longer used.
--override-components [OVERRIDE_COMPONENTS [OVERRIDE_COMPONENTS ...]]
Override the components that would be installed by
default and install these instead.
--additional-components ADDITIONAL_COMPONENTS [ADDITIONAL_COMPONENTS ...]
Additional components to install by default. These
components will either be added to the default install
list, or to the override-components (if provided).
--quiet, -q Disable all interactive prompts. If input is required,
defaults will be used or an error will be raised
--install-python INSTALL_PYTHON
(true/false) Attempt to install Python. MacOs only.