1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

[GCP] Compute Engine の Linux 仮想マシンを作成について

Last updated at Posted at 2021-11-19

はじめに

GCP(Google Cloud Platform)に興味があってイジってみたので忘却録。
Compute Engine で Linux 仮想マシンを作成するまで。

Cloud プロジェクトで Compute Engine を有効にする

Compute Engine を有効にするには、Cloud プロジェクトを選択し、Compute Engine に必要な API を有効にします。

  • プロジェクトの選択
  • Compute Engine APIを有効にする

 2021-11-19 16.58.24.png

Ubuntu VM インスタンスを作成する

  • Cloud Console のナビゲーション メニューで、[Compute Engine] > [VM インスタンス] をクリックします。

  • 次のボタンをクリックすると、場所を確認できます。
     2021-11-19 16.58.04.png

  • [インスタンスを作成] をクリックします。

  • 後で新しいインスタンスを確認できるように、インスタンス名をメモしておきます。
     2021-11-19 16.58.45.png
     2021-11-19 16.58.57.png

  • [ブートディスク] セクションで、[変更] をクリックします。
     2021-11-19 17.11.34.png

  • [公開イメージ] タブで、次の設定を変更します。

    • [オペレーティング システム] を [Ubuntu] にします
    • [バージョン] を [Ubuntu 20.04 LTS] にします
  • [選択] をクリックします。
     2021-11-19 17.12.01.png
     2021-11-19 17.12.22.png

  • [ファイアウォール] セクションで [HTTP トラフィックを許可する] を選択します。

  • [作成] をクリックして VM インスタンスを生成します。
     2021-11-19 17.12.49.png

  • [VM インスタンス] ページに新しいインスタンスが表示されます。チェックマークが表示されたら、インスタンスに接続できます。
     2021-11-19 17.13.08.png
     2021-11-19 17.13.51.png

VM インスタンスに接続する

  • [VM インスタンス] ページの [名前] 列で、作成した VM インスタンスを見つけます。

  • VM インスタンスの [接続] 列で、[SSH] をクリックします。
     2021-11-19 17.13.51.png

  • 新しい cmd ウィンドウが開き、VM ターミナルに接続したことが示されます。
     2021-11-19 17.14.07.png
     2021-11-19 17.14.46.png

これで、Compute Engine で VM インスタンスを正常に作成して、そのインスタンスに接続しました。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?