Print
카테고리: [ Cloud Computing & MSA ]
조회수: 27534

1. 개요

yum을 통한 gcloud SDK 설치 방법이다.


2. yum 정보 업데이트

다음 명령어를 실행한다.

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

그러면 yum을 위한 저장소 정보가 추가된다.

# cat /etc/yum.repos.d/google-cloud-sdk.repo
[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

3. SDK 설치

yum 명령을 이용하여 SDK를 설치한다.

# yum install google-cloud-sdk
Loaded plugins: fastestmirror, langpacks
Determining fastest mirrors
 * base: mirror.kakao.com
 * extras: mirror.kakao.com
 * updates: ftp.iij.ad.jp
base                                                                                                                                                                                    | 3.6 kB  00:00:00
docker-ce-stable                                                                                                                                                                        | 3.5 kB  00:00:00
extras                                                                                                                                                                                  | 2.9 kB  00:00:00
google-cloud-sdk/signature                                                                                                                                                              |  454 B  00:00:00
Retrieving key from https://packages.cloud.google.com/yum/doc/yum-key.gpg
Importing GPG key 0xA7317B0F:
 Userid     : "Google Cloud Packages Automatic Signing Key <이 이메일 주소가 스팸봇으로부터 보호됩니다. 확인하려면 자바스크립트 활성화가 필요합니다.>"
 Fingerprint: d0bc 747f d8ca f711 7500 d6fa 3746 c208 a731 7b0f
 From       : https://packages.cloud.google.com/yum/doc/yum-key.gpg
Is this ok [y/N]: Y
Retrieving key from https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
google-cloud-sdk/signature                                                                                                                                                              | 1.4 kB  00:00:02 !!!
kubernetes/signature                                                                                                                                                                    |  454 B  00:00:00
kubernetes/signature                                                                                                                                                                    | 1.4 kB  00:00:00 !!!
updates                                                                                                                                                                                 | 2.9 kB  00:00:00
(1/2): updates/7/x86_64/primary_db                                                                                                                                                      | 6.7 MB  00:00:01
(2/2): google-cloud-sdk/primary                                                                                                                                                         | 149 kB  00:00:01
google-cloud-sdk                                                                                                                                                                                     1079/1079
Resolving Dependencies
--> Running transaction check
---> Package google-cloud-sdk.noarch 0:279.0.0-1 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===============================================================================================================================================================================================================
 Package                                               Arch                                        Version                                         Repository                                             Size
===============================================================================================================================================================================================================
Installing:
 google-cloud-sdk                                      noarch                                      279.0.0-1                                       google-cloud-sdk                                       37 M

Transaction Summary
===============================================================================================================================================================================================================
Install  1 Package

Total download size: 37 M
Installed size: 182 M
Is this ok [y/d/N]:
최종 설치가 완료되면 gcloud 명령어를 사용할 수 있게 된다.